January 23, 2020, 03:26:39 am


Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/

wpa roam, wpa supplicant help

Started by doct, July 23, 2013, 12:39:28 pm

Previous topic - Next topic


   I am trying to set up my Cubieboard to connect to one of 3 wifi networks that I use around my home and office. I have used wpa_supplicant in the past with the Raspi and followed similar steps to get my cubie up and going. I've been running into some interesting issues. After a few days of plugging away at this, I've managed to get my wlan0 interface to obtain an IP address. # ifconfig
wlan0     Link encap:Ethernet  HWaddr 80:1f:02:a2:c5:12 
          inet addr:  Bcast:  Mask:
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1952 (1.9 KB)  TX bytes:1012 (1.0 KB)
What I am confused about is the output of # iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any 
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr=2347 B   Fragment thr:off
          Encryption key:off
          Power Management:off
and # iwlist wlan0 scan
wlan0     No scan results

Something doesn't seem right to me. I ssh-ed into my cubie board using so it seems like its transmitting and receiving packets, but I've been sshed into the machine for about an hour since the last reboot and I guess I was expecting to see more traffic in the RX and TX packets, but that's only a guess. I would like to be able to scan the networks around me and also verify I am connected to the network I would like my cubie to be wirelessly connected to using iwconfig. Also, I don't have wicd or network manager installed.  This is just so bizzare to me.... 

Alright, so some relevant information [uname -r, lsmod, /etc/network/interfaces, dmesg, lsusb]
# uname -r

# lsmod
Module                  Size  Used by
tun                    13664  2
gpio_sunxi              6982  0
mali_drm                2608  0
drm                   205858  1 mali_drm
rtl8192cu              62353  0
rtl8192c_common        42070  1 rtl8192cu
rtlwifi                49192  1 rtl8192cu
mali                  109342  0
mac80211              212807  3 rtl8192cu,rtl8192c_common,rtlwifi
ump                    50773  1 mali
hdmi                   22262  0
lcd                     4663  0
disp                  248522  3 hdmi,lcd
cfbcopyarea             2844  1 disp
cfbimgblt               2127  1 disp
cfbfillrect             3227  1 disp


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

#aded by user
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

Here is the output of some seemingly related dmesgs

rtl8192cu: Chip version 0x10
wemac wemac.0: WARNING: no IRQ resource flags set.
rtl8192cu: MAC address: 80:1f:02:a2:c5:12
rtl8192cu: Board Type 0
rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
usbcore: registered new interface driver rtl8192cu
[drm] Initialized drm 1.1.0 20060810
wemac wemac.0: eth0: link down
Mali DRM initialize, driver name: mali_drm, version 2.1
[drm] Initialized mali_drm 2.1.1 20101111 on minor 0
Mali DRM initialize, driver name: mali_drm, version 2.1
ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[drm] Initialized mali_drm 2.1.1 20101111 on minor 1
rtlwifi: wireless switch is on
sunxi_gpio driver init ver 1.3
gpiochip_add: registered GPIOs 1 to 34 on device: A1X_GPIO
Error: Driver 'rtl8192cu' is already registered, aborting...
wemac wemac.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
rtl8192cu: MAC auto ON okay!
rtl8192cu: Tx queue select: 0x05
init: failsafe main process (296) killed by TERM signal
wlan0: authenticate with 00:21:29:9e:46:18
wlan0: send auth to 00:21:29:9e:46:18 (try 1/3)
wlan0: authenticated
wlan0: associate with 00:21:29:9e:46:18 (try 1/3)
wlan0: RX AssocResp from 00:21:29:9e:46:18 (capab=0x411 status=0 aid=8)
wlan0: associated

Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
So why if ifconfig shows my wireless network has obtained an IP address, does iwconfig not show the name of the network? The cubieboard is sitting right next to the wirless router.


I'm running a cubieboard on my wifi at home and the office.  iwconfig wlan0 shows me associated with my router, and iwlist scan shows a bunch of APs in the building. The main difference is that I am running the 8192cu driver, which I believe it different from the rtl8192cu, as it doesn't pull in any other modules when loaded:
/root: lsmod
Module                  Size  Used by
cpufreq_stats           2808  0
sun4i_ir                3684  0
8192cu                596203  0
mali_drm                2600  0
drm                   208170  1 mali_drm
mali                  108179  0
ump                    48339  1 mali
gpio_sunxi              7222  3


Very good. Thank you. I blacklisted the rtl modules and the 8192cu module loaded in their place. Works like a charm now.