Page 1 of 1

wifi enabling on first boot from sd card

Posted: Wed Aug 09, 2017 9:36 pm
by seth
I have been using neo air for about 9 months in a machine vision/drone application.
Initially i brought up 9 nanoPi NEO Airs, booting from sd card, with console over wifi using ssh by writing a valid wpa_supplicant.conf in the /rootfs/etc/wpa_supplicant on the sd card image. This worked like a charm.

I now need to configure some more nanoPis - but I cannot get them to come up on wifi.

The website now shows that the radio must be enabled with a straightforward 'nmcli r wifi on' command. Unfortunately, I cannot seem to get this to work on the initial boot from an sd card. I have added '/usr/bin/nmcli r wifi on' to rc.local, and of course written a valid wpa_supplicant.conf. But it is not working.

Can anyone tell me how to accomplish this? I need to be able ssh over wifi on the initial boot from sd card. I am pretty sure that the missing piece with new images is enabling wifi with the nmcli command. But how do I get this to work from the initial boot?

thanks,

seth

Re: wifi enabling on first boot from sd card

Posted: Thu Aug 10, 2017 12:46 am
by seth
I did solve this. Both of the current (today is August 9, 2017) 3.4.39 images, and the 4.11.2 non eflasher image do not have wlan0 enabled. In order to do so at first boot:

For a typical dhcp served wifi lan, add these lines to rootfs/etc/network/interfaces on the bootable sd card:

Code: Select all

allow-hotplug wlan0
iface wlan0 inet dhcp
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


And add a valid wpa_supplicant.conf file in rootfs/etc/wpa_supplicant/. For most WPA2/WPA Personal networks as are typical, it will be this:

Code: Select all

network={
   ssid="YourWifiNetworkName"
   psk="YourWifiNetworkPassword"
}


The 4.11.2 eflasher image does have wlan0 enabled. It will still need a valid wpa_supplicant.conf file.

Re: wifi enabling on first boot from sd card

Posted: Mon Sep 18, 2017 1:58 pm
by zer02
Hello,

I have the same problem.
I now used the eflasher and non-eflasher (3.4.39) .img and added a valid wpa_supplicant.conf.
It still won't connect to my router. My raspberry PI zero works the same way.
What am I doing wrong?

Thanks!

EDIT:

I have used rc.local to WIFI r on. Now it works.

Re: wifi enabling on first boot from sd card

Posted: Tue Sep 19, 2017 12:24 pm
by guidol
You could try to disable the Network Manager and configure manually like on the NanoPi Duo:
http://wiki.friendlyarm.com/wiki/index. ... _Static_IP