Jump to content

Nanopi-neo, kernel: 3.4.112-sun8i, hostapd wont start


mariusco

Recommended Posts

Hi,

Board: nanopi neo, running xenial ubuntu server from:
http://www.armbian.com/donate/?f=Armbian_5.20_Nanopineo_Ubuntu_xenial_3.4.112.7z

 

I am trying to enable the hostapd for  nanopi neo, on

Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

 

The default drivers

cocam@nanopineo:~$ lsmod
Module                  Size  Used by
rtl8192cu              61143  0
rtlwifi                45784  1 rtl8192cu
rtl8192c_common        33420  1 rtl8192cu
snd_usb_audio          80300  0
mac80211              358429  3 lrtlwifi,rtl8192c_common,rtl8192cu

 

came with 3.4.112-sun8i looks ok and my wlan0 is AP-advertised,

 

wlan0     Link encap:Ethernet  HWaddr ec:08:6b:1d:10:20  
          inet addr:10.5.5.1  Bcast:10.5.5.255  Mask:255.255.255.0
          inet6 addr: fe80::ee08:6bff:fe1d:1020/64 Scope:Link

 

As soon I connect a device to the AP I get a kernel crash:

 

[  264.757288] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[  264.757288] Modules linked in: rtl8192cu rtlwifi rtl8192c_common mac80211 snd_usb_audio uvcvideo snd_hwdep snd_usbmidi_lib snd_rawmidi
[  264.757288] CPU: 0    Not tainted  (3.4.112-sun8i #14)
[  264.757288] PC is at __queue_work+0x23c/0x3d8
[  264.757288] LR is at __queue_work+0x204/0x3d8
[  264.757288] pc : [<c0044c9c>]    lr : [<c0044c64>]    psr: 00030093
[  264.757288] sp : d50c1a58  ip : d50c1a58  fp : d50c1a8c
[  264.757288] r10: 00000000  r9 : 40030013  r8 : d50c1b98
[  264.757288] r7 : d581d0c0  r6 : d5069438  r5 : c0ff4a00  r4 : c0fef5c0
[  264.757288] r3 : d506943c  r2 : 00000000  r1 : d581d0c0  r0 : c0ff4a00
[  264.757288] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  264.757288] Control: 10c5387d  Table: 5512806a  DAC: 00000015
[  264.757288]
[  264.757288] PC: 0xc0044c1c:
[  264.757288] 4c1c  e5933004 e1570003 01a04005 0a00000a e1a01009 e1a00005 eb193046 e1a00004
[[[[ ....  oitted ...]]]

[  264.757288] 1fc0: 01c7c638 0000012c bec3f678 00000004 bec3f5f4 00000002 bec3fdbc bec3fd94
[  264.757288] 1fe0: 00000000 bec3f5d4 000510d9 b6d0e1d6 00030030 00000005 003ff001 1c03f81a
[  264.757288] [<c0044c9c>] (__queue_work+0x23c/0x3d8) from [<c0044e7c>] (queue_work_on+0x44/0x54)
[  264.757288] [<c0044e7c>] (queue_work_on+0x44/0x54) from [<c0044ec8>] (queue_work+0x3c/0x64)
[  264.757288] [<c0044ec8>] (queue_work+0x3c/0x64) from [<c0044f14>] (schedule_work+0x24/0x2c)
[  264.757288] [<c0044f14>] (schedule_work+0x24/0x2c) from [<bf0d307c>] (rtl_is_special_data+0xdc/0x100 [rtlwifi])
Every 0.1s: dmesg | tail -n -6                          Mon Oct 17 20:17:21 2016

[   14.289970] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   17.600243] PHY: gmac0-0:00 - Link is Up - 100/Full
[   33.232108] rtl8192cu: MAC auto ON okay!
[  264.757288] [<bf0d307c>] (rtl_is_special_data+0xdc/0x100 [rtlwifi]) from [<bf0d7f44>] (rtl_get_rate+0x8c/0x158 [rtlwifi])
[  264.757288] [<bf0d7f44>] (rtl_get_rate+0x8c/0x158 [rtlwifi]) from [<bf05d75c>] (rate_control_get_rate+0xa4/0x240 [mac80211])
[  264.757288] [<bf05d75c>] (rate_control_get_rate+0xa4/0x240 [mac80211]) from [<bf067d38>] (invoke_tx_handlers+0x8d4/0x11e4 [mac80211])
[  264.757288] [<bf067d38>] (invoke_tx_handlers+0x8d4/0x11e4 [mac80211]) from [<bf0686e4>] (ieee80211_tx+0x9c/0xd0 [mac80211])
[  264.757288] [<bf0686e4>] (ieee80211_tx+0x9c/0xd0 [mac80211]) from [<bf0690ec>] (ieee80211_xmit+0xdc/0xe4 [mac80211])
[  264.757288] [<bf0690ec>] (ieee80211_xmit+0xdc/0xe4 [mac80211]) from [<bf069c98>] (ieee80211_subif_start_xmit+0x8dc/0x9f4 [mac80211])

 

 

 

I built against the /usr/src/linux-headers-3.4.112-sun8i kernel the rtl8192cu-fixes

and I blacklisted /etc/modprobe/blacklist.conf the old drivers, allowing the new driver.

 

blacklist rtl8192cu
#blacklist rtl8192c_common
#blacklist 8192cu

 

But now I cannot start the hostapd service

 

ifconfig

...

wlan0     Link encap:Ethernet  HWaddr ec:08:6b:1d:10:20  
          inet addr:10.5.5.1  Bcast:10.5.5.255  Mask:255.255.255.0

 

sudo iwlist scanning is OK

 sudo iwlist scanning
lo        Interface doesn't support scanning.

tunl0     Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: 00:22:75:18:F9:18
                    ESSID:"Dyx"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)......   omitted...

 

sudo hostapd -B /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
nl80211 driver initialization failed.
wlan0: interface state UNINITIALIZED->DISABLED
wlan0: AP-DISABLED
hostapd_free_hapd_data: Interface wlan0 wasn't started

 

 

My hostapd.conf and interfaces

 

cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=mynanopi
hw_mode=g
channel=6
macaddr_acl=0
ignore_broadcast_ssid=0

 

cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

 

allow-hotplug wlan0
iface wlan0 inet static
address 10.5.5.1
netmask 255.255.255.0
network 10.5.5.0
broadcast 10.5.5.255



What can I try next. I am kind of stuck.

 

 

Link to comment
Share on other sites

There are two versions of hostapd, hostapd and hostapd-realtek, both accessible from our repository ... try both, since it's try to match which goes where, and make sure you use proper config, check power supply that it gives 5V and not 4.7 or something, under load. Check following, tested but prepared for bridged mode.

ssid=BOARD
interface=wlan0
hw_mode=g
channel=5 
driver=nl80211
bridge=br0
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=2
preamble=1
wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
#ht_capab=[HT40-][SHORT-GI-40][SHORT-GI-40][DSSS_CCK-40]
#country_code=SI
#ieee80211d=1
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=orangepi
channel=5
noscan=1
wpa=2
wpa_passphrase=12345678
bridge=br0
wmm_enabled=1
driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-40][HT40+][HT40-][DSSS_CCK-40]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400
Link to comment
Share on other sites

For me , after compiling hostapd with go.sh

( note ; add pkg-config into dependances and i'm not sure that the deb was made , i made a copie hostapd* by hands)

it's the same

hostapd run with wlan5 , it began to talk and crash the machine just before dnsmasq

i have an extern power for a usb hub and make tests with 3 differents usb WIFI

 

i notice that for me driver=rtl871xdrv make an error

Link to comment
Share on other sites

in fact , it run :-)

my dnsmasq.conf and network/interfaces was wrong

then after all ( may be the apt-get update/upgrade are also important ) with driver=nl80211 it's ok

I have a captiv portal with nginx/php/dokuwiki to share information, data, etc   where i want  for 12$ .. cool

I 'll put documentation for that next week ;)

Link to comment
Share on other sites

I can't succeed with "NanoPi Air" Armbian_5.24_Nanopiair_Debian_jessie_3.4.113)

Hostpapd starts but I have no wifi, iwconfig show empty ESSID !

I tried go.sh but it tells me that some packages are held, event if I found nothing when "dpkg --get-selections | grep hold"

Chip is an AP6212 on my board, so I use hostapd (I tested hostapd-realtek one time)

 

/etc/hostapd/hostapd.conf 

 

 

interface=wlan0

driver=nl80211
ssid=ap6210_ap_test
channel=6
hw_mode=g
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

 

/etc/network/interfaces

 

 

auto lo

iface lo inet loopback
 
auto wlan0
iface wlan0 inet static
address 192.168.101.1
netmask 255.255.255.0
dns-nameservers 192.168.101.1

 

output

 

 

â— hostapd.service - LSB: Advanced IEEE 802.11 management daemon

   Loaded: loaded (/etc/init.d/hostapd)
   Active: active (running) since Wed 2016-11-02 11:03:26 CET; 2s ago
  Process: 938 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/hostapd.service
           â””─941 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostap...
 
Nov 02 11:03:26 nanopiair hostapd[938]: Starting advanced IEEE 802.11 manage....
Nov 02 11:03:26 nanopiair systemd[1]: Started LSB: Advanced IEEE 802.11 man...n.
Hint: Some lines were ellipsized, use -l to show in full.

 

root@nanopiair:~# hostapd /etc/hostapd/hostapd.conf 

Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not re-add multicast membership for vendor events: -2 (No such file or directory)
Using interface wlan0 with hwaddr 94:a1:a2:a4:29:28 and ssid "ap6210_ap_test"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED 
Link to comment
Share on other sites

Yes "It works" :D Haha !!! :D

I did not see anything with lsmod..... and tried to add wrong things in /etc/modules

Thank you master

 

The next step for me will be to switch between AccesPoint and Default connection

(I think I will need to reload kernel modules)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines