Hello everyone,
I am tyring to find a way to connect my Banana Pi M5 to a WiFi knowing the SSID and the password a priori on boot.
Since the Banana Pi M5 does not have a wifi card I’m using a USB dongle and I possess a root shell on the device.
The only way I’ve found is to use wpa_cli
and wpa_supplicant.conf
but no matter my wpa_supplicant.conf
I can’t seem to get it to connect. It just doesn’t with no errors displayed. Also it says that wpa_supplicant
command is not found, even tho I have wpa_cli
. Am I missing something? Is there another way?
I was considering writing a small standalone binary in C that programmatically connects to a given wifi but I don’t really know where to start as I haven’t found useful articles online, how could I achieve this behavior? I know how to compile for the right target, I’d just like some guidance on which libraries to look at.
Hopefully the questions are not too broad, I’ll be open to expand on the topics. Thanks