BeagleBone / Belkin Wireless USB (N150) configuration

I purchased a new wireless adapter for the BeagleBone because my old one was less than stable and not natively supported. It works great on my Ubuntu laptop. Hopefully some one can shed some light on my wireless configuration problems with the BeagleBone with my new adapter. Here’s what I know:

  1. The USB device is “Belkin Components”

root@beaglebone:/etc# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 007: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 008: ID 050d:945a Belkin Components
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  1. The driver that loads is the r8712u driver. I copied the firmware file from my Ubuntu machine…

root@beaglebone:/etc# lsmod
Module Size Used by
g_ether 28856 0
r8712u 119278 0
spidev 3888 0
ip_tables 7830 0
x_tables 14348 1 ip_tables
rfcomm 24259 0
ircomm_tty 14073 0
ircomm 8407 1 ircomm_tty
irda 85557 2 ircomm_tty,ircomm
hidp 10152 0
bluetooth 109714 4 rfcomm,hidp
rfkill 14605 2 bluetooth
ipv6 210466 16

  1. Following a reboot I have a wlan0:

root@beaglebone:/etc# ifconfig
eth0 Link encap:Ethernet HWaddr D4:94:A1:32:30:42
UP BROADCAST MULTICAST 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)

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:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:744 (744.0 B) TX bytes:744 (744.0 B)

usb0 Link encap:Ethernet HWaddr 36:9C:94:51:21:AA
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::349c:94ff:fe51:21aa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1748 errors:0 dropped:0 overruns:0 frame:0
TX packets:1034 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:142673 (139.3 KiB) TX bytes:143710 (140.3 KiB)

wlan0 Link encap:Ethernet HWaddr :::::
UP BROADCAST MULTICAST 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)

  1. Scanning for access points works great. (WIN_ea80 is my access point… I’ve deleted the info for all the others it found.)

root@beaglebone:/etc# iwlist wlan0 scanning
wlan0 Scan completed :

Cell 02 - Address: 2C:E4:12:40:EA:7F
ESSID:“WIN_ea80”
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD7B0050F204104A00011010440001021041000100103B00010310470010FD4D3543A18D68A1193D3C306FA24EAA1021000842726F6164636F6D1023000842726F6164636F6D1024000631323334353610420004313233341054000800060050F20400011011000A42726F6164636F6D4150100800020088103C000101
Signal level=100/100

  1. Here is the /etc/network/interfaces file I created:

root@beaglebone:/etc/network# cat interfaces
#auto wlan0
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf

  1. Here is the wpa_supplicant.conf file I’m using (slightly redacted):

root@beaglebone:/etc# cat wpa_supplicant.conf
#/etc/wp_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid=WIN_ea80
scan_ssid=1
auth_alg=OPEN
proto=WPA2
pairwise=CCMP
key_mgmt=WPA-PSK
#psk=*************
psk=*************************************************************************************
priority=1
}

  1. When I try to associate I get the following:

root@beaglebone:/etc# ifup wlan0
udhcpc (v1.19.4) started
Sending discover…
Sending discover…
Sending discover…
No lease, failing

  1. Here the dmesg output:

root@beaglebone:/etc# dmesg

[ 2422.133789] ADDRCONF(NETDEV_UP): wlan0: link is not ready

  1. I can see the access point from connman

root@beaglebone:/etc# /usr/lib/connman/test/test-connman services

WIN_ea80 { wifi_*******************_57494e5f65613830_managed_psk }

So here are my questions:

  1. What am I missing to make this thing work?

  2. Is there a “right” way (or at least a better/easier way) to manage wireless connection on the BeagleBone rather than go through all this?

  3. Is there a way to connect to a WPA2-PSK access point from the command line? It seems like “connect SSID PSK” should be easy enough to accomplish since I can just select my access point an type a password to connect in Ubuntu. Surely someone at least has a script that does this.

  4. I know I’m using Network Manager in Ubuntu and connman on the BeagleBone. Is there some difference between the two that is causing a problem?

  5. Why isn’t this easier?

Thanks.
Jerrill

Some additional information:

root@beaglebone:/etc# wpa_supplicant -D wext -c wpa_supplicant.conf -i wlan0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 2c:e4:12:40:ea:7f
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0

I’m right there with you
same adapter
same problem
same question - this should not be this difficult

raygeeknyc,

Have you come across a list of wireless adapters that are supported “out of the box” with the BeagleBone? It seems like there would be such a list somewhere, but I haven’t had much luck in finding it.

Jerrill

Can you try the instructions for this module :
http://www.adafruit.com/products/814

Can you try the instructions for this module :
http://www.adafruit.com/products/814

raygeeknyc,

Have you come across a list of wireless adapters that are supported “out of the box” with the BeagleBone? It seems like there would be such a list somewhere, but I haven’t had much luck in finding it.

Jerrill

I’m right there with you
same adapter
same problem
same question - this should not be this difficult

I purchased a new wireless adapter for the BeagleBone because my old one was less than stable and not natively supported. It works great on my Ubuntu laptop. Hopefully some one can shed some light on my wireless configuration problems with the BeagleBone with my new adapter. Here’s what I know:

  1. The USB device is “Belkin Components”

root@beaglebone:/etc# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 007: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 008: ID 050d:945a Belkin Components
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

  1. The driver that loads is the r8712u driver. I copied the firmware file from my Ubuntu machine…

root@beaglebone:/etc# lsmod
Module Size Used by
g_ether 28856 0
r8712u 119278 0
spidev 3888 0
ip_tables 7830 0
x_tables 14348 1 ip_tables
rfcomm 24259 0
ircomm_tty 14073 0
ircomm 8407 1 ircomm_tty
irda 85557 2 ircomm_tty,ircomm
hidp 10152 0
bluetooth 109714 4 rfcomm,hidp
rfkill 14605 2 bluetooth
ipv6 210466 16

  1. Following a reboot I have a wlan0:

root@beaglebone:/etc# ifconfig
eth0 Link encap:Ethernet HWaddr D4:94:A1:32:30:42
UP BROADCAST MULTICAST 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)

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:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:744 (744.0 B) TX bytes:744 (744.0 B)

usb0 Link encap:Ethernet HWaddr 36:9C:94:51:21:AA
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::349c:94ff:fe51:21aa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1748 errors:0 dropped:0 overruns:0 frame:0
TX packets:1034 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:142673 (139.3 KiB) TX bytes:143710 (140.3 KiB)

wlan0 Link encap:Ethernet HWaddr :::::
UP BROADCAST MULTICAST 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)

  1. Scanning for access points works great. (WIN_ea80 is my access point… I’ve deleted the info for all the others it found.)

root@beaglebone:/etc# iwlist wlan0 scanning
wlan0 Scan completed :

Cell 02 - Address: 2C:E4:12:40:EA:7F
ESSID:“WIN_ea80”
Protocol:IEEE 802.11bg
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD7B0050F204104A00011010440001021041000100103B00010310470010FD4D3543A18D68A1193D3C306FA24EAA1021000842726F6164636F6D1023000842726F6164636F6D1024000631323334353610420004313233341054000800060050F20400011011000A42726F6164636F6D4150100800020088103C000101
Signal level=100/100

  1. Here is the /etc/network/interfaces file I created:

root@beaglebone:/etc/network# cat interfaces
#auto wlan0
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf

  1. Here is the wpa_supplicant.conf file I’m using (slightly redacted):

root@beaglebone:/etc# cat wpa_supplicant.conf
#/etc/wp_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid=WIN_ea80
scan_ssid=1
auth_alg=OPEN
proto=WPA2
pairwise=CCMP
key_mgmt=WPA-PSK
#psk=*************
psk=*************************************************************************************
priority=1
}

  1. When I try to associate I get the following:

root@beaglebone:/etc# ifup wlan0
udhcpc (v1.19.4) started
Sending discover…
Sending discover…
Sending discover…
No lease, failing

  1. Here the dmesg output:

root@beaglebone:/etc# dmesg

[ 2422.133789] ADDRCONF(NETDEV_UP): wlan0: link is not ready

  1. I can see the access point from connman

root@beaglebone:/etc# /usr/lib/connman/test/test-connman services

WIN_ea80 { wifi_*******************_57494e5f65613830_managed_psk }

So here are my questions:

  1. What am I missing to make this thing work?

  2. Is there a “right” way (or at least a better/easier way) to manage wireless connection on the BeagleBone rather than go through all this?

  3. Is there a way to connect to a WPA2-PSK access point from the command line? It seems like “connect SSID PSK” should be easy enough to accomplish since I can just select my access point an type a password to connect in Ubuntu. Surely someone at least has a script that does this.

  4. I know I’m using Network Manager in Ubuntu and connman on the BeagleBone. Is there some difference between the two that is causing a problem?

  5. Why isn’t this easier?

Thanks.
Jerrill

Some additional information:

root@beaglebone:/etc# wpa_supplicant -D wext -c wpa_supplicant.conf -i wlan0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 2c:e4:12:40:ea:7f
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0
Trying to associate with 2c:e4:12:40:ea:7f (SSID=‘WIN_ea80’ freq=2462 MHz)
Associated with 00:00:00:00:00:00
CTRL-EVENT-DISCONNECTED bssid=2c:e4:12:40:ea:7f reason=0

– To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:
beagleboard+unsubscribe@googlegroups.com
Frequently asked questions: http://beagleboard.org/faq

Jason,

Thank you for posting that link. It gave me a little more information on connman than I had before. UNFORTUNATELY, it did NOT resolve my problem. Is step #20 buy the Adafruit adapter?

Here’s what happened!

  1. Start over with the latest Angstrom demo image from the following site so I know that none of my previous attempts to get it working had broken anything:

http://www.angstrom-distribution.org/demo/beaglebone/

Here’s the image I loaded:

jerrill@JerrillUbuntuLT:~/Downloads$ sudo -s
[sudo] password for jerrill:
root@JerrillUbuntuLT:~/Downloads# xz -dkc Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.06.18.img.xz > /dev/sdb

  1. I know that I won’t have any power issues with the wireless adapter. I have a 25 W power supply running the BeagleBone and a powered USB hub hosting the wireless adapter.

  2. Boot the beagle bone with the new image.

  3. Check my ethernet configuration:

root@beaglebone:~# ping www.google.com
PING www.l.google.com (74.125.227.114) 56(84) bytes of data.
64 bytes from www.google.com (74.125.227.114): icmp_req=1 ttl=52 time=53.6 ms
64 bytes from www.google.com (74.125.227.114): icmp_req=2 ttl=52 time=52.4 ms
64 bytes from www.google.com (74.125.227.114): icmp_req=3 ttl=52 time=52.5 ms

  1. Update the package list from the internet:

root@beaglebone:~# opkg update

  1. Upgrade as per the instructions:

root@beaglebone:~# mkdir /home/root/tmp
root@beaglebone:~# opkg -t /home/root/tmp upgrade

  1. I noticed that everything was getting upgraded to kernel version 3.2.23 from the images original 3.2.18. (NOTE: This takes a while… I hope you have a fast SD card…) So, after the update I rebooted to make sure that the new kernel and upgraded modules were correctly loading…

root@beaglebone:~# uname -r
3.2.23
root@beaglebone:~# lsmod
Module Size Used by
g_ether 28892 0
spidev 3912 0
ip_tables 7854 0
x_tables 14548 1 ip_tables
rfcomm 24371 0
ircomm_tty 14101 0
ircomm 8435 1 ircomm_tty
irda 85617 2 ircomm_tty,ircomm
hidp 10240 0
bluetooth 110070 4 rfcomm,hidp
rfkill 14637 2 bluetooth
ipv6 210864 16

Thank goodness… This hasn’t always worked in the past…

  1. List the available firmware packages:

root@beaglebone:~# opkg list linux-firmware-rt*
linux-firmware-rtl8192ce - 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1 - linux-firmware version 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1
Firmware files for use with Linux kernel
linux-firmware-rtl8192cu - 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1 - linux-firmware version 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1
Firmware files for use with Linux kernel
linux-firmware-rtl8192su - 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1 - linux-firmware version 0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1
Firmware files for use with Linux kernel

  1. Load the specified firmware package:

root@beaglebone:~# opkg install linux-firmware-rtl8192cu
Installing linux-firmware-rtl8192cu (0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1) to root…
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.05/ipk/eglibc/all/linux-firmware-rtl8192cu_0.0+git1+15888a2eab052ac3d3f49334e4f6f05f347a516e-r1_all.ipk.
Configuring linux-firmware-rtl8192cu.

  1. Verify that the wireless dongle is plugged in and reboot.

  2. Check dmesg and ifconfig for wireless. At this point is where we head off into a ditch again. No wlan0.

root@beaglebone:~# dmesg | tail -6
[ 14.940673] hub 2-0:1.0: 1 port detected
[ 15.068725] ADDRCONF(NETDEV_UP): usb0: link is not ready
[ 15.520843] gadget: high-speed config #1: CDC Ethernet (ECM)
[ 15.523590] ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[ 18.923736] eth0: no IPv6 routers present
[ 26.303741] usb0: no IPv6 routers present
root@beaglebone:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr D4:94:A1:32:30:42
inet addr:192.168.254.9 Bcast:192.168.254.255 Mask:255.255.255.0
inet6 addr: fe80::d694:a1ff:fe32:3042/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13739 (13.4 KiB) TX bytes:9361 (9.1 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:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:175 (175.0 B) TX bytes:175 (175.0 B)

usb0 Link encap:Ethernet HWaddr C6:AD:55:D8:4D:94
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::c4ad:55ff:fed8:4d94/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:290 errors:0 dropped:0 overruns:0 frame:0
TX packets:216 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26960 (26.3 KiB) TX bytes:47974 (46.8 KiB)

I tried the reboot a couple of time and changed the position of the adapter and eventually got the following:

root@beaglebone:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 003: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 004: ID 050d:945a Belkin Components
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@beaglebone:~# dmesg | tail -17
[ 34.053436] usb 1-1.3: new full-speed USB device number 4 using musb-hdrc
[ 34.154083] usb 1-1.3: not running at top speed; connect to a high speed hub
[ 34.156463] usb 1-1.3: New USB device found, idVendor=050d, idProduct=945a
[ 34.156463] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 34.156494] usb 1-1.3: Product: Basic Wireless USB Adapter
[ 34.156494] usb 1-1.3: Manufacturer: Manufacturer Realtek
[ 34.156524] usb 1-1.3: SerialNumber: 00e04c000001
[ 34.190307] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
[ 34.199432] r8712u: DriverVersion: v7_0.20100831
[ 34.199523] r8712u: register rtl8712_netdev_ops to netdev_ops
[ 34.199554] r8712u: USB_SPEED_LOW with 4 endpoints
[ 34.202270] r8712u: Boot from EFUSE: Autoload OK
[ 34.708892] r8712u: CustomerID = 0x0000
[ 34.708923] r8712u: MAC Address from efuse = 94:44:52:9e:4c:c5
[ 34.708923] r8712u: Loading firmware from “rtlwifi/rtl8712u.bin”
[ 34.709228] usbcore: registered new interface driver r8712u
[ 34.721710] r8712u: Firmware request failed

Ok… so it wants to use another driver than the one I download firmware for. (MENTAL NOTE: If this doesn’t work just buy the Adafruit wireless adapter and be done with this…)

  1. I copied the needed firmware files over to the BeagleBone from my Ubuntu machine:

root@beaglebone:~# ls /lib/firmware/rtlwifi/
LICENCE.rtlwifi_firmware.txt rtl8192cufw.bin rtl8712u.bin

  1. Another reboot:

root@beaglebone:~# dmesg

[ 5.737274] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.746429] r8712u: DriverVersion: v7_0.20100831
[ 5.746520] r8712u: register rtl8712_netdev_ops to netdev_ops
[ 5.746551] r8712u: USB_SPEED_LOW with 4 endpoints
[ 5.961334] r8712u: Boot from EFUSE: Autoload OK
[ 6.984008] PHY: 0:00 - Link is Up - 100/Full
[ 6.984191] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 9.256439] r8712u: CustomerID = 0x0000
[ 9.256469] r8712u: MAC Address from efuse = 94:44:52:9e:4c:c5
[ 9.256469] r8712u: Loading firmware from “rtlwifi/rtl8712u.bin”
[ 9.262908] usbcore: registered new interface driver r8712u
[ 11.014007] r8712u: 1 RCR=0x153f00e
[ 11.014709] r8712u: 2 RCR=0x553f00e
[ 11.133941] ADDRCONF(NETDEV_UP): wlan0: link is not ready

root@beaglebone:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr D4:94:A1:32:30:42
inet addr:192.168.254.9 Bcast:192.168.254.255 Mask:255.255.255.0
inet6 addr: fe80::d694:a1ff:fe32:3042/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:115 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16106 (15.7 KiB) TX bytes:9556 (9.3 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:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:175 (175.0 B) TX bytes:175 (175.0 B)

usb0 Link encap:Ethernet HWaddr 1A:72:F7:4D:F6:45
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::1872:f7ff:fe4d:f645/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:294 errors:0 dropped:0 overruns:0 frame:0
TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25554 (24.9 KiB) TX bytes:53197 (51.9 KiB)

wlan0 Link encap:Ethernet HWaddr 94:44:52:9E:4C:C5
UP BROADCAST MULTICAST 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)

Ok! I have wlan0 now… back to the instructions from Adafruit…

  1. Configure connman to automatically manage wifi:

root@beaglebone:~# nano -w /var/lib/connman/settings

In my case the wifi setting was already set to ‘true’ so I left it alone…

[WiFi]
Enable=true

  1. Create the wifi settings file per the instructions:

root@beaglebone:~# nano -w /var/lib/connman/wifi.config

root@beaglebone:~# cat /var/lib/connman/wifi.config
[service_home]
Type = wifi
Name = WIN_ea80
Security = wpa2
Passphrase = ***************************

  1. Restart connman to get it to accept the new settings:

root@beaglebone:~# systemctl restart connman.service

  1. Check to see if wlan0 connected:

root@beaglebone:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr 94:44:52:9E:4C:C5
UP BROADCAST MULTICAST 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)

Hmmm… no connection… not even after a reboot!

  1. I went ahead and installed the wireless tools again:

root@beaglebone:~# opkg install wireless-tools

  1. I tried iwconfig to see what it tells me:

root@beaglebone:~# iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

wlan0 unassociated Nickname:“rtl_wifi”
Mode:Managed Access Point: Not-Associated Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.

Ok… so here I am… stuck again. Any ideas?

Thanks.
Jerrill

I have the adafruit one - it gets further along but it fails
authentication with my WAP. (wep2, dd-wrt)
(I am going to try it with another, insecure AP just to eliminate that factor)

Everyone,

I think we can mark this one SOLVED actually!

I found the following post:

https://plus.google.com/u/0/105557068601771362265/posts/93rBVxskh9G

It suggested that connman was not capable of configuring the wireless adapter while the ethernet was connected. (WTF!?)

So I unplugged the ethernet cable and rebooted and lo and behold…

root@beaglebone:~# iwconfig
lo no wireless extensions.

usb0 no wireless extensions.

wlan0 IEEE 802.11bg ESSID:“WIN_ea80” Nickname:“rtl_wifi”
Mode:Managed Frequency:2.412 GHz Access Point: 2C:E4:12:40:EA:7F
Bit Rate:54 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:------- Security mode:open
Power Management:off
Link Quality=96/100 Signal level=72/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.

root@beaglebone:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr 94:44:52:9E:4C:C5
inet addr:192.168.254.202 Bcast:192.168.254.255 Mask:255.255.255.0
inet6 addr: fe80::9644:52ff:fe9e:4cc5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:397 errors:0 dropped:5 overruns:0 frame:0
TX packets:72 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:65391 (63.8 KiB) TX bytes:14358 (14.0 KiB)

root@beaglebone:~# ping www.google.com
PING www.l.google.com (173.194.37.80) 56(84) bytes of data.
64 bytes from www.google.com (173.194.37.80): icmp_req=1 ttl=55 time=53.1 ms
64 bytes from www.google.com (173.194.37.80): icmp_req=2 ttl=55 time=52.7 ms
64 bytes from www.google.com (173.194.37.80): icmp_req=3 ttl=55 time=52.7 ms
64 bytes from www.google.com (173.194.37.80): icmp_req=4 ttl=55 time=54.9 ms

Thank you, Jason for the link that got me 99% of the way there.

So, what is this connman crap anyway? There has to be a more mature command line base network management software out there…

Jerrill

To ask the obvious question: have you shared your problems with the connman people? They are very receptive to feedback unlike the competing brands.

I’ll definitely do that. Thanks.

I’ve had a conversation with some folks on the connman mailing list. It turns out the they think this should work and after examining my connmand logs commented that the version of connman that is part of the current BeagleBone image is downlevel. They recommended upgrading and reporting back, but it had the feel of “I’m just guessing here…” Where is the best place to request that the connman Angstrom package be upgraded?

I’ve also learned that while connman doesn’t support ad hoc mode (which my wireless USB device supports) it does support wireless tethering via master mode (which my wireless USB device chip set does not support). However, this leaves me without a solution to set up a peer-to-peer connection with a smartphone. So, is there another network manager that people have successfully used with Angstrom on BeagleBone that DOES support ad hoc?

Alternatively, does anyone know (or know how to find out) which wireless USB devices support master mode and work with connman?

I’m not married to any particular solution, I just want one that works.

Thanks,
Jerrill