NanoPi Neo first boot with wifi

Hi,

I’m trying NanoPi Neo again with V145 hoping that things would now work smoothly. Unfortunately that hasn’t been the case. Seems to be a problem with wifi

After copying img files to the sd card and editing dietpi.txt to use wifi and not ethernet, added wifi pw/ssid etc. And also AUTO_Install_Enable=1 with dropbear and proftp enabled. Plugged it in and got a steady green light and a repeating blue light with 2 quick flashes and a short pause.

The wifi dongle led light was not turned on and no connection made. Looking back at the sd card, the wifi stuff had been added to etc/network/interfaces so the device booted somewhat. The file system partition had also been expanded.

I replugged the nanopi a few time to see if it was a reboot issue and got same blue flashing light. :cry:

After a lot of searching around it appears you have gone back to the 3.4.x kernal from the 4.9 kernal that was working with wifi. We had a discussion about that here - https://dietpi.com/forum/t/solved-nanopi-neo-wireless-connection/791/1

Does wifi work for you on Nanopi Neo?

In Dec I gave up with Nanopi as there was too many problems with wifi and ethernet working together and moved all my work to rPi 2 and 3 because I had a deadline to meet. I would now like to salvage the rPis and get the code onto the Nanopis that I bought for the purpose.

Thanks,
Gordon Williams

I tried the Armbian nanopineo 4.10.3-sun8i nightly build and wifi and ethernet work on that.

After booting the board connected to ethernet I used nmtui-connect to activate the wifi. Dongle is attached to the USB and that seems to be working as expected.

Gordon Williams

Edit - I should say though that wlan0 has been renamed as shown below

wlx6cfdb90a99bd Link encap:Ethernet HWaddr 6c:fd:b9:0a:99:bd
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e29f:ff2a:11fd:b451/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:62 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5017 (5.0 KB) TX bytes:1278 (1.2 KB)

Hi Gordon,

After a lot of searching around it appears you have gone back to the 3.4.x kernal from the 4.9 kernal that was working with wifi. We had a discussion about that here - viewtopic.php?f=11&t=1038

Yep, the 4.9 kernel with NanoPi Neo WiFi was excellent, really improved its stability. The issue is 4.x is under dev branch of ARMbian, regular updates via their repo/apt. When an update came out for 4.10, it broke basic USB detection. This was too unstable/unpredictable, so we reverted back to stable 3.x images.

The only issue with 3.x, WiFi isn’t great, but it should be functional at limited range. Mine does give the odd “temporary delay” over SSH, but it is functional.

I’ll make another 4.x dev image and put it under our “unsupported” images:

Ticket:
https://github.com/Fourdee/DietPi/issues/847

Edit - I should say though that wlan0 has been renamed as shown below

Should be fine if this does not change after boot, DietPi will pick up the active index during boot.

Hi Gordon,

4.x image now available, let us know if this improves WiFi:
EDIT: REMOVED OBSOLETE LINK

I downloaded the NanoPi Neo (not air) and found that it was kernel 4.10.0 and not 4.10.3 which was Armbian package that I used.

I see that you created the air version yesterday, but the non-air version dates back to end of Feb.

Since I have already got the 4.10.0 flashed on the SD card, I will see it I can get it started with wifi.

Gordon Williams

Edit: So I did as in message 1 of this thread - plugged the dongle in and changed dietpi.txt to use wifi. The wifi dongle led did not light and no connection made. :frowning:

I think 4.10.3 would be a better bet.

Bump

I think there is a misunderstanding. :open_mouth:

Can the dietpi version for Nanopi Neo Air be used for Nanopi Neo??? I don’t have the AIR version. What you supplied was for the AIR version.

Gordon

Hi Gordon,

Ah yes there is, apologies. I assumed you were using Neo AiR with onboard WiFi.

On the NR (no release) 4.x image for NEO below:
EDIT: REMOVED OBSOLETE LINK
apt-get upgrade / apt-get dist-upgrade should pull in the latest kernel from ARMbian repo, however, if this is not the case, let me know and i’ll generate a 4.10.3+ image.

What I did:

  1. Connected to router via cable and plugged in power
  2. ssh into device
  3. After clicking GPL OK, it went through update and click Ok for reboot. V147
  4. Click OK for GPL again. Got Setup screen and clicked exit to get back to command prompt.
  5. apt-get upgrade, tzdata upgrade yes.
  6. Tested to see what kernel
    root@DietPi:~# uname -a
    Linux DietPi 4.10.0-sun8i #3 SMP Thu Feb 23 19:57:03 CET 2017 armv7l GNU/Linux
  7. root@DietPi:~# apt-get dist-upgrade
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Calculating upgrade… Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So nothing happened …

hmm,
8. dietpi-software
9. set locale, timezone
10. went to install, nothing selected, OK anyway
11. Update & upgrade APT mode, nothing to install, then automatic reboot
12. ssh into again
13. test kernel
root@DietPi:~# uname -a
Linux DietPi 4.10.0-sun8i #3 SMP Thu Feb 23 19:57:03 CET 2017 armv7l GNU/Linux

No change.

Gordon

PS. Side note:

root@DietPi:~# cpu

─────────────────────────────────────────────────────
DietPi CPU Info
Use dietpi-config to change CPU / performance options
─────────────────────────────────────────────────────
Architecture | armv7l
Temp | 26’c | Who put me in the freezer!
Governor | ondemand
Throttle up | 50% CPU usage

Current Freq Min Freq Max Freq
CPU0 | 1008 MHz 120 MHz 1008 MHz
CPU1 | 1008 MHz 120 MHz 1008 MHz
CPU2 | 1008 MHz 120 MHz 1008 MHz
CPU3 | 1008 MHz 120 MHz 1008 MHz

CPU is not throttling back to 120 Mhz with top showing 1 cpu with 2% usage.

Thanks Gordon,

Looks like 4.10.3 has not reached the ARMbian repo as an update yet. So i’ll need to compile/build a new image with it:
https://github.com/Fourdee/DietPi/issues/864

I’ll try and get that done today, will let you know once ready.

CPU3 | 1008 MHz 120 MHz 1008 MHz

CPU is not throttling back to 120 Mhz with top showing 1 cpu with 2% usage.

The bash script will most likely trigger ondemand to scale up clocks, due to cpu load required for the script execution. Unfortunately, there is nothing we can do to avoid that in bash AFAIK. 80%+ ondemand up scaling may do it (50% default), but will hinder system performance and response time.

Try obtaining the raw value, without script execution:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq

Hi Gordon,

Image updated, please let me know results:
https://github.com/Fourdee/DietPi/issues/864#issuecomment-292521358

  1. Put image on SD
  2. Edited dietpi.txt to use wifi and added ssid and pw. Left it dhcp
  3. Had wifi dongle plugged in. Plugged in sd card and powered up.
  4. Green light went from dim to bright and repeating blue double flash light started.
  5. Ethernet plug (no cable inserted) have green and orange lights continuously lit

Then nothing.

Dongle LED did not light and no connection to router.

powered down and up and same thing.

I’m guessing your wifi/ethernet script is not working.

edited dietpi.txt
Ethernet_Enabled=1
Wifi_Enabled=0

booted and ssh in.

Execute armbian-config to change some system settings quickly shown before dietpi license.

set up locale and time - all OK

went install with nothing selected to get out of menu system without warning that nothing was installed and get back to command prompt. Goes through install but nothing happens - I don’t know if this is what you intended …

Got to command prompt and tried “armbian-config” to see what that was about.

root@DietPi:~# armbian-config
Warning. Configurator can’t work properly without internet connection. Press CTRL C to stop to stop or any key to ignore and continue.Downloading dependencies …
/usr/bin/armbian-config: line 54: lsb_release: command not found
/usr/bin/armbian-config: line 55: lsb_release: command not found

Stalled at this point. ^C to stop.

root@DietPi:~# lsmod
Module Size Used by
evdev 9979 0
ath9k_htc 45420 0
ath9k_common 22917 1 ath9k_htc
ath9k_hw 386734 2 ath9k_htc,ath9k_common
ath 17628 3 ath9k_htc,ath9k_hw,ath9k_common
mac80211 325145 1 ath9k_htc
cfg80211 192770 4 ath9k_htc,mac80211,ath,ath9k_common
rfkill 10928 1 cfg80211
sun8i_codec_analog 13766 0
snd_soc_core 115473 1 sun8i_codec_analog
snd_pcm_dmaengine 4221 1 snd_soc_core
sun8i_ths 3134 0
snd_pcm 70145 2 snd_pcm_dmaengine,snd_soc_core
cpufreq_dt 3522 0
uio_pdrv_genirq 3354 0
thermal_sys 43232 2 cpufreq_dt,sun8i_ths
gpio_keys 8517 0
uio 8012 1 uio_pdrv_genirq
g_serial 3737 0
libcomposite 34692 1 g_serial
fuse 70718 1


root@DietPi:~# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Go back to dietpi menu to try and start wifi.

enabled wifi

now says
Ethernet : Available | Enabled | Connected │
Wifi : Not Found | Enabled | Disconnected

Wifi not found :open_mouth: Though lsmod and lsusb show it is there :frowning:

Cant enter ssid or pw through menu system.

Change wired ethernet to static - wifi didn’t come up

disabled ethernet - both wired ethernet lights came on. SSH connection lost - wifi didn’t come up. Bricked. :thinking:

Gordon

I edited the SD and etc/network/interfaces to uncomment the eth0 hotplug and put in the ssid and pw for the wireless. Now able to ssh through ethernet. wifi does not work.

root@DietPi:~# iwconfig
eth0 no wireless extensions.

lo no wireless extensions.

root@DietPi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 72:df:35:6e:37:45
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::70df:35ff:fe6e:3745/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:106 errors:0 dropped:0 overruns:0 frame:0
TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15350 (14.9 KiB) TX bytes:12064 (11.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Armbian uses network manager to control wifi – nmtui is the tool that they use. Dietpi doesn’t have that.

Welchen USB-Wifi Stick verendet du denn?

Atheros AR9271



Schau mal hier: https://wikidevi.com/wiki/Atheros_AR9271

Linux support[edit]
Built-in Linux kernel support:

Linux kernel module: ath9k_htc

Linux kernel version: v2.6.35
Linux kernel date: 2010-08-01
Firmware: Open Firmware

In Debian:
apt-get install firmware-atheros
(in Debian the firmware-atheros package includes files:
/lib/firmware/ar9271.fw /lib/firmware/htc_9271.fw
Without these modprobe ath9k_htc does not create wlan0 device and dmesg shows:
=> Failed to load firmware )


root@NanoPi-Neo:~# ls -la /lib/firmware/
insgesamt 660
drwxr-xr-x 12 root root   4096 Apr  8 13:06 .
drwxr-xr-x 19 root root   4096 Mär  4 21:20 ..
drwxr-xr-x  2 root root   4096 Feb  3 14:09 ap6210
drwxr-xr-x  2 root root   4096 Feb  3 14:09 ap6212
drwxr-xr-x  2 root root   4096 Feb  3 14:09 brcm
-rw-r--r--  1 root root   1976 Feb  3 14:06 dvb-demod-mn88472-02.fw
-rw-r--r--  1 root root   8192 Feb  3 14:06 dvb-usb-tbs5520.fw
drwxr-xr-x  4 root root   4096 Feb  3 14:09 imx
-rw-r--r--  1 root root  45412 Feb  3 14:06 mt7601.bin
-rw-r--r--  1 root root  45412 Feb  3 14:06 mt7601u.bin
-rw-r--r--  1 root root   8192 Feb  3 14:06 rt2870.bin
drwxr-xr-x  2 root root   4096 Feb  3 14:09 RTL8192SU
drwxr-xr-x  2 root root   4096 Feb  3 14:09 rtlwifi
drwxr-xr-x  2 root root   4096 Feb  3 14:09 sdma
drwxr-xr-x  2 root root   4096 Feb  3 14:09 ti-connectivity
-rw-r--r--  1 root root 253952 Feb  3 14:06 v4l-coda960-imx6dl.bin
-rw-r--r--  1 root root 253952 Feb  3 14:06 v4l-coda960-imx6q.bin
drwxr-xr-x  2 root root   4096 Feb  3 14:09 vpu
drwxr-xr-x  2 root root   4096 Feb  3 14:09 xr819



Benötigt Dietpi nicht, da es dietpi-config verwendet.




@Fourdee: apt-get install firmware-atheros ?

Afraid the above is not in a language that I speak …

Armbian 4.10.3 does work for me with wifi dongle being used along with ethernet.

I suspect that Armbian uses a different method to make wifi work than dietpi.

Gordon



@Fourdee: apt-get install firmware-atheros ?

Yep, maybe the ARMbian image has their full firmware installed.

Gordon,

Try installing full ARMbian firmware package:

apt-get install armbian-firmware-full
reboot

Failing that, we’ll need to debug the adapter:

dmesg | grep wlan
dmesg | grep ath

before full firmware
root@DietPi:~# dmesg | grep wlan

… nothing …

root@DietPi:~# dmesg | grep ath
[ 8.817712] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 8.817826] usbcore: registered new interface driver ath9k_htc
[ 8.819332] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[ 8.946064] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 8.948106] usb 1-1: ath9k_htc: Failed to get firmware htc_9271.fw
[ 8.948509] usb 1-1: ath9k_htc: USB layer deinitialized


after firmware and reboot.

root@DietPi:~# dmesg | grep wlan
[ 11.452560] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 12.919521] wlan0: authenticate with 64:66:b3:f4:35:f8
[ 13.123003] wlan0: send auth to 64:66:b3:f4:35:f8 (try 1/3)
[ 13.125422] wlan0: authenticated
[ 13.125557] ath9k_htc 1-1:1.0 wlan0: disabling HT/VHT due to WEP/TKIP use
[ 13.129569] wlan0: associate with 64:66:b3:f4:35:f8 (try 1/3)
[ 13.131800] wlan0: RX AssocResp from 64:66:b3:f4:35:f8 (capab=0x411 status=18 aid=40)
[ 13.131818] wlan0: 64:66:b3:f4:35:f8 denied association (code=18)
[ 14.674946] wlan0: authenticate with 64:66:b3:f4:35:f8
[ 14.851733] wlan0: send auth to 64:66:b3:f4:35:f8 (try 1/3)
[ 14.853538] wlan0: authenticated
[ 14.860644] wlan0: associate with 64:66:b3:f4:35:f8 (try 1/3)
[ 14.863174] wlan0: RX AssocResp from 64:66:b3:f4:35:f8 (capab=0x411 status=0 aid=3)
[ 14.870576] wlan0: associated
[ 14.870807] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready


root@DietPi:~# dmesg | grep ath
[ 9.569060] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 9.571860] usbcore: registered new interface driver ath9k_htc
[ 9.871036] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[ 10.121829] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 10.373454] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.4
[ 10.373467] ath9k_htc 1-1:1.0: FW RMW support: On
[ 10.373472] ath: EEPROM regdomain: 0x809c
[ 10.373475] ath: EEPROM indicates we should expect a country code
[ 10.373480] ath: doing EEPROM country->regdmn map search
[ 10.373483] ath: country maps to regdmn code: 0x52
[ 10.373487] ath: Country alpha2 being used: CN
[ 10.373490] ath: Regpair used: 0x52
[ 13.125557] ath9k_htc 1-1:1.0 wlan0: disabling HT/VHT due to WEP/TKIP use
root@DietPi:~#

Looks like everything works!! Dongle light flashing!!

Will play with it more later when I have some time.

Thanks,
Gordon Williams

Excellent, looks good.

We dont install the full ARMbian firmware package by default, its over 120MB in size and increases image filesize drastically. The default firmware is fine for common adapters (eg: rtl 8188 etc).



Have a look below. It looks like it only increased the size a small amount - ““After this operation, 1,024 B of additional disk space will be used.””

Is firmware going from 5.27 → 5.25 i.e. down graded?

root@DietPi:~# apt-get install armbian-firmware-full
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
armbian-firmware-full
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.9 MB of archives.
After this operation, 1,024 B of additional disk space will be used.
Get:1 http://apt.armbian.com/ jessie/main armbian-firmware-full armhf 5.25 [46.9 MB]
Fetched 46.9 MB in 1min 17s (608 kB/s)
Selecting previously unselected package armbian-firmware-full.
(Reading database … 17090 files and directories currently installed.)
Preparing to unpack …/armbian-firmware-full_5.25_armhf.deb …
Unpacking armbian-firmware-full (5.25) …
Replacing files in old package armbian-firmware (5.27) …
Setting up armbian-firmware-full (5.25) …

Gordon

nope with the (NR_4.x)_DietPi_v147_NanoPiNEOAir-armv7-(Jessie).img image on a nanopi neo air, the wifi does not work
the ethernet usb dongle does not work either (no dhcp offers received)