NanoPi Neo first boot with wifi

Having issues with your DietPi installation, or, found a bug? Post it here.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: NanoPi Neo first boot with wifi

Post by Gord_W »

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 :o Though lsmod and lsusb show it is there :(

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. :?

Gordon
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: NanoPi Neo first boot with wifi

Post by Gord_W »

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.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: NanoPi Neo first boot with wifi

Post by k-plan »

Gord_W wrote:Bus 001 Device 002: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n

lsmod
Module Size Used by

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_commo

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 )

Code: Select all

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
Gord_W wrote:-- nmtui is the tool that they use. Dietpi doesn't have that.
Benötigt Dietpi nicht, da es dietpi-config verwendet.

--------------------------


@Fourdee: apt-get install firmware-atheros ?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: NanoPi Neo first boot with wifi

Post by Gord_W »

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: NanoPi Neo first boot with wifi

Post by Fourdee »

Gord_W wrote: 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:

Code: Select all

apt-get install armbian-firmware-full
reboot
Failing that, we'll need to debug the adapter:

Code: Select all

dmesg | grep wlan
dmesg | grep ath
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: NanoPi Neo first boot with wifi

Post by Gord_W »

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: NanoPi Neo first boot with wifi

Post by Fourdee »

Gord_W wrote:
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).
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: NanoPi Neo first boot with wifi

Post by k-plan »

Gord_W wrote:.... 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
k-plan wrote: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 )
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Gord_W
Posts: 134
Joined: Sat Oct 24, 2015 6:30 pm

Re: NanoPi Neo first boot with wifi

Post by Gord_W »

Fourdee wrote:
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
anemos

Re: NanoPi Neo first boot with wifi

Post by anemos »

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)
Post Reply