WiFi USB Adapter Issues with BeagleBone Black 4.4.54-ti-r93

221 views
Skip to first unread message

agm

unread,
Mar 15, 2019, 9:28:39 AM3/15/19
to BeagleBoard
Hi All,

When I was working with 3.X kernel versions, integrating WiFi USB Adapter was straightforward. I'm facing issues setting up WiFi with 4.4.54-ti-r93
I'm trying with Edimax N150 (EW-7811Un). 

I started off with something simple -- by connecting the WiFi adapter module and adding the following code to
/etc/network/interfaces

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
#    wpa-ssid "myESSID"
#    wpa-psk  "myPass"


I tried to restart and this did not work. I see the below when I do iwconfig


wlan0     IEEE
802.11bgn  ESSID:off/any  
         
Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm  
         
Retry short limit:7   RTS thr=2347 B   Fragment thr:off
         
Power Management:off

and the following when I do ifconfig

wlan0     Link encap:Ethernet  HWaddr 74:da:38:8d:1c:54  
          UP BROADCAST MULTICAST DYNAMIC  MTU
:1500  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)


Here is the dmesg output

[   16.810320] LUN: removable file: (no medium)
[   17.026254] usb0: HOST MAC 88:c2:55:83:f9:50
[   17.027770] usb0: MAC 88:c2:55:83:f9:51
[   17.039688] usb1: HOST MAC 88:c2:55:83:f9:53
[   17.041967] usb1: MAC 88:c2:55:83:f9:54
[   17.617982] configfs-gadget gadget: high-speed config #1: c
[   19.781294] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   19.781387] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   19.897785] 8021q: 802.1Q VLAN Support v1.8
[   19.897863] 8021q: adding VLAN 0 to HW filter on device eth0
[   35.242189] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[   38.011535] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[   38.054682] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[   38.664760] rtl8192cu: Chip version 0x10
[   40.929253] rtl8192cu: MAC address: 74:da:38:8d:1c:54
[   40.929291] rtl8192cu: Board Type 0
[   40.929517] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   40.929696] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   41.032215] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   41.050562] usbcore: registered new interface driver rtl8192cu
[   41.053732] rtl8192cu: MAC auto ON okay!
[   41.113660] rtl8192cu: Tx queue select: 0x05
[   42.497838] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready


Here is my lsbusb output

Bus 001 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Here is lsmod output

Module                  Size  Used by
ft6236                  
6004  0
fb_ili9341              
3929  2
fbtft_device          
39391  0
fbtft                  
37977  2 fb_ili9341,fbtft_device
arc4                    
2211  2
rtl8192cu              
64049  0
rtl_usb                
11220  1 rtl8192cu
rtl8192c_common        
47080  1 rtl8192cu
rtlwifi                
68709  3 rtl_usb,rtl8192c_common,rtl8192cu
omap_sham              
26513  0
omap_aes_driver        
23912  0
mac80211              
626271  3 rtl_usb,rtlwifi,rtl8192cu
omap_rng                
5544  0
rng_core                
9066  1 omap_rng
joydev                
10372  0
spi_omap2_mcspi        
12952  0
evdev                  
13511  3
uio_pdrv_genirq        
3923  0
uio                    
10524  1 uio_pdrv_genirq
8021q                  23043  0
garp                    
7049  1 8021q
mrp                    
8967  1 8021q
stp                    
2430  1 garp
llc                    
5903  2 stp,garp
usb_f_mass_storage    
49849  2
usb_f_acm              
8361  2
u_serial              
13753  3 usb_f_acm
usb_f_ecm              
11064  2
usb_f_rndis            
25865  2
u_ether                
14349  2 usb_f_ecm,usb_f_rndis
libcomposite          
53618  16 usb_f_acm,usb_f_ecm,usb_f_rndis,usb_f_mass_storage
cfg80211              
532333  2 mac80211,rtlwifi
rfkill                
21386  4 cfg80211
spidev                  
8860  0
tieqep                  
9981  0
pwm_tiehrpwm            
5883  0
pru_rproc              
15431  2
pruss_intc              
8603  1 pru_rproc
pruss                  
12026  1 pru_rproc


Here is the /boot/uEnv.txt


#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0


uname_r
=4.4.54-ti-r93
#uuid=
#dtb=


##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..)


##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb
=am335x-boneblack-emmc-overlay.dtb


##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb


##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb


##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb


##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb


##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb


###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
#enable_uboot_overlays=1
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###Custom Cape
#dtb_overlay=/lib/firmware/<file4>.dtbo
###Disable auto loading of virtual capes (emmc/video/wireless)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
###Cape Universal Enable
#enable_uboot_cape_universal=1
###U-Boot fdt tweaks...
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###


cmdline
=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable


#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable video=HDMI-A-1:1024x768@60e


##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=


##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
cape_enable
=bone_capemgr.enable_partno=BB-SPIDEV0,BB-I2C1-Touch,BB-UART4
cape_disable
=bone_capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN


##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
####cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh


#uuid=dd4673d1-eeda-4dea-82ea-1a0233046486
###cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
##cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

I tried to do this wpa_supplicant

I created a file wpa_supplicant.conf in /etc/wpa_supplicant with the following code 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config
=1
country
=US

 Then I executed this command, 
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Successfully initialized wpa_supplicant
nl80211
: deinit ifname=wlan0 disabled_11b_rates=0
wlan0
: Failed to initialize driver interface

Then I read that nl80211 might not work with old adapters. So I tried with wext

wpa_supplicant -B -i wlan0 -D -wext -c /etc/wpa_supplicant/wpa_supplicant.conf

I get the following errors


ioctl
[SIOCSIWENCODEEXT]: Invalid argument
ioctl
[SIOCSIWENCODEEXT]: Invalid argument
ctrl_iface exists
and seems to be in use - cannot override it
Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Failed to initialize control interface '/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file was
left
by an unclean termination of wpa_supplicant in which case you will need
to manually remove
this file before starting wpa_supplicant again.


Then I tried to make wpa_supplicant do everything. I modified the /etc/network/interfaces file as follows 


auto wlan0
iface wlan0 inet dhcp
wpa
-conf /etc/wpa_supplicant/wpa_supplicant.conf



My /etc/wpa_supplicant/wpa_supplicant.conf as follows 

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config
=1
country
=US
     
network
={
    ssid
="my_ESSID"
    psk
="my_Pass"
    scan_ssid
=1
}

I get the following log when I do sudo systemctl status networking.service


Mar 15 18:53:12 beaglebone wpa_supplicant[844]: Successfully initialized wpa_supplicant
Mar 15 18:53:14 beaglebone wpa_supplicant[844]: Could not read interface wlan0 flags: No such device
Mar 15 18:53:14 beaglebone wpa_supplicant[844]: nl80211: Driver does not support authentication/association or connect commands
Mar 15 18:53:14 beaglebone ifup[667]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot cr
Mar 15 18:53:14 beaglebone ifup[667]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Mar 15 18:53:14 beaglebone ifup[667]: Failed to bring up wlan0.
Mar 15 18:53:23 beaglebone systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 15 18:53:23 beaglebone systemd[1]: Failed to start Raise network interfaces.
Mar 15 18:53:23 beaglebone systemd[1]: networking.service: Unit entered failed state.
Mar 15 18:53:23 beaglebone systemd[1]: networking.service: Failed with result 'exit-code'


I feel I've run out of options. What else can I do? Am I missing something trivial here? I want to avoid kernel upgrade/downgrade. 

Thanks for your help. 

agm

unread,
Mar 15, 2019, 11:08:09 AM3/15/19
to BeagleBoard
I have a typo in the first section. It should actually be (without the comments)

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid "myESSID"
    wpa-psk  "myPass"
Reply all
Reply to author
Forward
0 new messages