Page 1 of 1

problems with wifi after using eflasher

Posted: Sat Feb 18, 2017 8:53 pm
by seth
I am failing to get the system to use wifi on boot after using eflasher.

I have been developing with nanoPi NEO Air for several months, and have only had this problem since trying to update to the latest ROM, and using eflasher.

I do NOT use a serial connection - wifi only. I use these boards in a weight sensitive application, and don't want to solder and unsolder if I can avoid it.

Here are the steps:
build bootable sd microcard from latest rom file nanopi-air-eflasher-sd8g-20170121.img.zip.
edit /rootfs/etc/wpa_supplicant/wpa_supplicant.conf on the sd card image for my ssid and psk.
insert sd microcard into NEO Air, and power on. use nmap to discover dhcp assigned address. ssh to root at that address.
At this point everything works fine - and exactly as it did before.
use eflasher to copy the image. power down. remove sd card. repower.
HERE is where things go wrong.
leds indicate system has booted - blinking blue, solid green.
but nmap never shows an address for the NEO Air. It as if eflasher did not copy the wpa_supplicant.conf file.
I can't check this, because I don't have a serial connection setup.
This did work fine the old way - prior to eflasher.
Hardware is fine - comes up on wifi as expected if I reinsert sd card, and reboot.
I did try adding ifup/ifdown commands to sd card image /rootfs/etc/bash.bashrc. did not help.

Thoughts?

Re: problems with wifi after using eflasher

Posted: Sun Feb 19, 2017 8:01 am
by meisam
seth wrote:
I am failing to get the system to use wifi on boot after using eflasher.

I have been developing with nanoPi NEO Air for several months, and have only had this problem since trying to update to the latest ROM, and using eflasher.

I do NOT use a serial connection - wifi only. I use these boards in a weight sensitive application, and don't want to solder and unsolder if I can avoid it.

Here are the steps:
build bootable sd microcard from latest rom file nanopi-air-eflasher-sd8g-20170121.img.zip.
edit /rootfs/etc/wpa_supplicant/wpa_supplicant.conf on the sd card image for my ssid and psk.
insert sd microcard into NEO Air, and power on. use nmap to discover dhcp assigned address. ssh to root at that address.
At this point everything works fine - and exactly as it did before.
use eflasher to copy the image. power down. remove sd card. repower.
HERE is where things go wrong.
leds indicate system has booted - blinking blue, solid green.
but nmap never shows an address for the NEO Air. It as if eflasher did not copy the wpa_supplicant.conf file.
I can't check this, because I don't have a serial connection setup.
This did work fine the old way - prior to eflasher.
Hardware is fine - comes up on wifi as expected if I reinsert sd card, and reboot.
I did try adding ifup/ifdown commands to sd card image /rootfs/etc/bash.bashrc. did not help.

Thoughts?


Your problem is simple. eflasher uses image files in a third partition while you have updated the wpa_supplicant.conf on
the booted partitions .ie rootfs.
so please pay attention that eflasher does not copy the mounted kernel.

to solve your problem , you can make an script that runs eflasher with #systemd("eflasher") command , then mount the
emmc partition :
mkdir -p /media/emmc
mount -t auto /dev/mmcblk1p1 /media/emmc
cp /etc/wpa_supplicant/wpa_supplicant.conf /media/emmc/etc/wpa_supplicant/wpa_supplicant.conf
poweroff


then remove sd card and reboot your board.

Re: problems with wifi after using eflasher

Posted: Sun Feb 19, 2017 7:29 pm
by seth
I understand. Thank you. Is it possible to just run eflasher, then mount the correct mmc partion, and copy in the wpa_supplicant.conf and then reboot. Just seems easier than sorting out a correct systemd service script.

Follow up This hand done approach did work - though the correct partition was mmcblk1p2 for what become the rootfs in emmc.

Thanks again!

Re: problems with wifi after using eflasher

Posted: Mon Feb 20, 2017 11:22 am
by meisam
seth wrote:
I understand. Thank you. Is it possible to just run eflasher, then mount the correct mmc partion, and copy in the wpa_supplicant.conf and then reboot. Just seems easier than sorting out a correct systemd service script.

Follow up This hand done approach did work - though the correct partition was mmcblk1p2 for what become the rootfs in emmc.

Thanks again!



Hi
Thanks for your correction.
Glad to help you.

thanks

Re: problems with wifi after using eflasher

Posted: Fri Aug 04, 2017 11:10 pm
by seth
Sorry - this no longer seems to work with latest eflasher (4.11.2/3.4.39). It correctly mounts the partition, copies wpa_supplicant.conf, but on reboot does not connect over wifi. Am I missing something?

seth