Connecting to wifi

I have a bootable sd card created using the instructions in
https://github.com/96boards/documentation/blob/master/ConsumerEdition/DragonBoard-410c/Configuration/GPT.md

but with rootfs and boot partitions loaded with images I created by running “bitbake rpb-console-image” on the source from https://github.com/96boards/oe-rpb-manifest

now I can’t connect to wireless.
I have a WPA wireless so I added /etc/wpa_supplicant.conf as instructed in several places:

network={ ssid="mywifi" psk="mypassword" } then running: root@dragonboard-410c:~# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf

I get authentication failure though I’m 100% sure I the psk is correct:

Successfully initialized wpa_supplicant wlan0: SME: Trying to authenticate with e0:ce:c3:8c:fa:0b (SSID='mywifi' freq=2437 MHz)[ 10b

[ 1069.545506] wlan0: send auth to e0:ce:c3:8c:fa:0b (try 1/3)
[ 1069.563110] wlan0: authenticated
wlan0: Trying to associate with e0:ce:c3:8c:fa:0b (SSID=‘mywifi’ freq=2437 MHz)[ 1069.58053)

[ 1069.602456] wlan0: RX AssocResp from e0:ce:c3:8c:fa:0b (capab=0x1411 status=0 aid=2)
[ 1069.660818] wlan0: associated
wlan0: Associated with e0:ce:c3:8c:fa:0b[ 1069.676119] wlan0: deauthenticating from e0:ce:c3)

wlan0: CTRL-EVENT-DISCONNECTED bssid=e0:ce:c3:8c:fa:0b reason=3 locally_generated=1
wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid=“mywifi” auth_failures=1 duration=10 reason=Y

hi ,

the psk is not supposed to be your passphrase, but the output of wpa_passphrase, is that what you did?

e.g.

wpa_passphrase <insert SSID> <your passphrase>

at first I did
psk=“password”
then when it didn’t work
I put in psk the hexa value as in the output of passphrase and didn’t work either.

hi,

sorry, forgot to mention that we have Network Manager installed (and started by default), so you need to stop it first:

systemctl stop NetworkManager

then it should work. if you don’t need/want NM, you can remove it completely from the image, or you can disable the service.

Or you can use NM to manage your network, you have the nmcli and nmtui tools in the images.

1 Like

Hi ndec.

I am able to stop the NetworkManager and use the wpa_supplicant command to submit the wifi authentication successfully. We can see the wlan0 authenticated and associated log.

[10182.543563] wcn36xx: ERROR hal_remove_bsskey response failed err=16
[10233.920372] wlan0: authenticate with f0:29:29:60:42:11
[10233.968372] wlan0: send auth to f0:29:29:60:42:11 (try 1/3)
[10234.169748] wlan0: send auth to f0:29:29:60:42:11 (try 2/3)
[10234.373758] wlan0: send auth to f0:29:29:60:42:11 (try 3/3)
[10234.375241] wlan0: authenticated
[10234.381835] wlan0: associate with f0:29:29:60:42:11 (try 1/3)
[10234.385461] wlan0: RX AssocResp from f0:29:29:60:42:11 (capab=0x431 status=0 aid=11)
[10234.421076] wlan0: associated

But there is no ip address assigned to wlan0.

h-4.3# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 02:00:95:52:20:B0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4320 errors:0 dropped:7 overruns:0 frame:0
TX packets:224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:663496 (647.9 KiB) TX bytes:33065 (32.2 KiB)

Which command should I use to get an ip address for it? I guess we may need some dhcpd command, but not sure which one to use and how to use it exactly. Can you please help?

By default Network Manager takes care all the network stuff for you, you can add a WiFI connection with:
$ nmcli dev wifi connect "mywifi" password "mypassword"
Then Network Manager detects the interface and run dhcp client, configure route, etc for you.
In this case AP info is stored by network-manager (/etc/NetworkManager/system-connections/) and no more in /etc/wpa_supplicant.conf, Network-manager then communicates the requested ssid/password to wpa_supplicant via dbus.

However if you stop Network Manager and run wpa_supplicant manually with your config file, you will need to manually run dhcp-client or assign an IP to your wlan interface.
$ dhclient wlan0

1 Like