2

I am new to Linux so thanks for your help. This WiFi adapter isn't commonly used in the BeagleBone/Raspberry Pi world, but it is useful because it will allow me to attach a custom directional antenna for long-distance communication with the BeagleBone.

To start:

I can easily log into my beaglebone as root by connecting to it through the USB interface and ssh. When I type sudo cat /var/log/messages I get the output below (partial), which indicates to me that usb1-1 is connected to the USB WiFi adapter. Indeed, the chipset used by this USB WiFi device is the Realtek RTL8187.

I have learned that Ubuntu supplies the drivers for this Realtek chip as standard, but I know that Beaglebone uses a different type of linux.

How can I go about diagnosing the system and connecting to my wifi network, and if I cannot, how can I get this driver and proceed? The driver will likely be the same driver used by Ubuntu for the Realtek 8187 chip.

Also -- I have heard of something called 'network manager' - is this something that I need to get started? If so, how can I download and install it through the terminal on this embedded linux system?

Apr 23 20:24:04 beaglebone systemd-logind[700]: Linked /tmp/.X11-unix/X0 to /run/user/debian/X11-display.
Apr 23 20:24:07 beaglebone systemd[1]: Startup finished in 2s 663ms 344us (kernel) + 14s 900ms 121us (userspace) = 17s 563ms 465us.
Apr 23 20:24:14 beaglebone kernel: [   25.164174] net eth0: initializing cpsw version 1.12 (0)
Apr 23 20:24:14 beaglebone kernel: [   25.168656] net eth0: phy found : id is : 0x7c0f1
Apr 23 20:24:14 beaglebone kernel: [   25.190080] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 23 20:44:41 beaglebone kernel: [ 1251.610969] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
Apr 23 20:44:41 beaglebone kernel: [ 1251.611096] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 23 20:44:55 beaglebone kernel: [ 1265.814467] net eth0: initializing cpsw version 1.12 (0)
Apr 23 20:44:55 beaglebone kernel: [ 1265.817260] net eth0: phy found : id is : 0x7c0f1
Apr 23 20:44:55 beaglebone kernel: [ 1265.833067] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 23 20:44:55 beaglebone kernel: [ 1266.187458] net eth0: initializing cpsw version 1.12 (0)
Apr 23 20:44:55 beaglebone kernel: [ 1266.190295] net eth0: phy found : id is : 0x7c0f1
Apr 23 20:44:55 beaglebone kernel: [ 1266.205991] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 23 20:44:57 beaglebone kernel: [ 1268.197080] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
Apr 23 20:44:57 beaglebone kernel: [ 1268.197237] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Oct 15 03:24:43 beaglebone kernel: [ 1528.071391] usb 1-1: new high-speed USB device number 2 using musb-hdrc
Oct 15 03:24:43 beaglebone kernel: [ 1528.197461] usb 1-1: New USB device found, idVendor=0bda, idProduct=8187
Oct 15 03:24:43 beaglebone kernel: [ 1528.197501] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 15 03:24:43 beaglebone kernel: [ 1528.197536] usb 1-1: Product: RTL8187_Wireless
Oct 15 03:24:43 beaglebone kernel: [ 1528.197570] usb 1-1: Manufacturer: Manufacturer_Realtek_RTL8187_
Oct 15 03:24:43 beaglebone kernel: [ 1528.197603] usb 1-1: SerialNumber: 00C0CA6D703D
Oct 15 03:24:44 beaglebone kernel: [ 1528.378502] cfg80211: Calling CRDA to update world regulatory domain
Oct 15 03:24:44 beaglebone kernel: [ 1528.812425] ieee80211 phy0: hwaddr 00:c0:ca:6d:70:3d, RTL8187vB (default) V1 + rtl8225z2, rfkill mask 2
Oct 15 03:24:44 beaglebone kernel: [ 1528.829906] rtl8187: Customer ID is 0xFF
Oct 15 03:24:44 beaglebone kernel: [ 1528.852966] rtl8187: wireless switch is on
Oct 15 03:24:44 beaglebone kernel: [ 1528.853874] usbcore: registered new interface driver rtl8187

When I type ifup wlan0 I get:

root@beaglebone:/# ifup wlan0
Ignoring unknown interface wlan0=wlan0

When I type iwconfig I get:

root@beaglebone:/# iwconfig
wlan0     IEEE 802.11bg  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on

lo        no wireless extensions.

eth0      no wireless extensions.

usb0      no wireless extensions.

root@beaglebone:/# 

I appreciate any help. I think the answer will be helpful to both me and others trying to use this sort of USB WiFi w/ their BeagleBone.

UPDATE: I learned a little bit from here and edited my interfaces file via sudo nano /etc/network/interfaces. I uncommented the wifi section .. added the network name and password ... then see below. Any ideas what is happening?

root@beaglebone:/# ifup wlan0
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/00:c0:ca:6d:70:3d
Sending on   LPF/wlan0/00:c0:ca:6d:70:3d
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
receive_packet failed on wlan0: Network is down
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9


Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.594437] Internal error: Oops: 817 [#1] SMP THUMB2

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.676479] Process wpa_supplicant (pid: 2276, stack limit = 0xd5988240)

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.683943] Stack: (0xd5989da8 to 0xd598a000)

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.688819] 9da0:                   d5a3f520 00000000 11111111 d5989da8 d5a3f50c d5924548

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.697880] 9dc0: d5a3f500 d5924000 00008914 d5ac680c d5ac6800 c045a3db d5a3e400 bf9dc255

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.706919] 9de0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.715986] 9e00: d5a3f50c 00000000 00000000 d5a3e400 d5924548 00000000 d5924000 00008914

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.725032] 9e20: d5ac680c d5ac6800 00000000 bf958b2b 0000000d 00000000 00000001 00000000

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.734092] 9e40: d5ac680c d5924000 bf981034 00000000 d592402c 00008914 d5ac680c d5ac6800

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.743128] 9e60: 00000000 bf9591ff d5924000 c03bfd63 c03bfd03 d5924000 00001003 00001002

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.752177] 9e80: 00000001 c03bfeed 00008914 d5924000 00001002 d5924000 bea2aa54 c03bffa9

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.761223] 9ea0: 00000000 00000001 d5924000 c03f87a1 00000000 01000000 6e616c77 00000030

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.770279] 9ec0: 00000000 00000000 00001003 00000000 00000000 00000000 00000000 00008914

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.779332] 9ee0: bea2aa54 c081c740 d5060e40 00000007 00000000 00000000 00000005 c03b1cfd

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.788405] 9f00: c03b1bb1 d5060e60 bea2aa54 d5957800 00000007 c00b36ab d5060220 c00b58bf

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.797422] 9f20: d5150f60 00000000 d5150f60 00000000 d5150fb4 c00b5d13 00002710 d5904b40

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.806479] 9f40: 00000000 d5060c80 00000000 bea2a914 00000129 c000c1c4 d5988000 d5957800

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.815514] 9f60: 00000000 bea2aa54 00008914 00000007 00000000 00000000 00000005 c00b3727

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.824556] 9f80: 00000007 00000000 bea2aa54 000a5ae0 00000001 00000007 00000036 c000c1c4

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.833563] 9fa0: d5988000 c000c021 000a5ae0 00000001 00000007 00008914 bea2aa54 00001003

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.842606] 9fc0: 000a5ae0 00000001 00000007 00000036 00000007 bea2ab4c 000a5ae0 00000005

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.851646] 9fe0: 000a85c4 bea2aa50 0006a87b b6ce1f6c 60000010 00000007 00000000 00000000

Message from syslogd@beaglebone at Oct 15 04:05:13 ...
 kernel:[ 3957.985588] Code: 61a2 f8cd 8000 9301 (601a) 9702 
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
send_packet: Network is down


DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
send_packet: Network is down




^Xc^Z
[1]+  Stopped                 ifup wlan0

Now this time I typed ifconfig wlan0 (getting somewhere):

root@beaglebone:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:c0:ca:6d:70:3d  
          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)

Now tried this based on a hint here:

root@beaglebone:~# ip link set wlan0 up
RTNETLINK answers: Operation not possible due to RF-kill
root@beaglebone:~# 

Now trying to solve this RF-kill error based on this feed.

Uhoh -- I am being "hard blocked"

root@beaglebone:~# rfkill list all
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: yes
root@beaglebone:~# 
  • 2
    Perhaps try removing auto wlan0. – Dbo Oct 15 '14 at 5:29
  • that worked! i rebooted several times, and now it is automatically finding my wireless network and connecting to it. any idea why removing auto wlan0 from the /etc/network/interfaces file would remove the hard block? – user391339 Oct 17 '14 at 1:10
2

In the end this was quite straightforward, thanks to help from Dbo. I can't confirm if wpa_supplicant was necessary for this working, as I had already installed it by the time this started working (aptitude install wpasupplicant).

This is what I did:

1. sudo nano /etc/network/interfaces

  • Edit the WiFi Example part, removing comments
  • Add the allow-hotplug wlan0 (or make sure it is there and uncommented)
  • Keep auto wlan0 commented (thanks to Dbo for this suggestion)
  • Add your wireless network name in plain text (wpa-ssid)
  • Add your password in plain text (wpa-psk)

enter image description here

2. reboot (optional, but for some reason I had to, and it worked on all subsequent reboots)

3. iwconfig enter image description here

This link ended up providing a lot of useful information, but for whatever reason I am not needing to type ip a, ip link set wlan0 up. I can't confirm if that is because I already did it previously or because it "just works". Every time the BeagleBone boots it now automatically detects the WiFi network. I type curl www.google.com to confirm.

UPDATE: So, I wanted to test the ip link set wlan0 up/down issue. To shut it off you need to set it to down twice for whatever reason. This shuts the dongle's blue light off. Setting wlan0 back to up brings it back, and autoconnects to the network (blinking).

enter image description here

Then, to test further I set wlan0 to down and rebooted. This time when it restarted the usb dongle light blinked briefly then stayed off.
enter image description here The "hard block" from before had returned as I found out when I tried to type ip link set wlan0 up, and rfkill list all.

I rebooted the BeagleBone and this went away.

So: to summarize the update, don't shut it down with wlan0 down, and if you do, you may need to set wlan0 it to up (which fails) then reboot.

Finally, note that this WiFi USB dongle runs HOT! It's great in that it has a powerful antenna that you can switch out for a custom one, but it's at least 5X hotter than the BeagleBone itself, which means several Watts of heat being wasted. Since I will be using this for a remote solar battery powered setup I will need to learn how to reliably turn this WiFi dongle on and off. I'm not sure if ip link set wlan0 down will be good enough for this. Indeed the command worked for disconnect, causing the blue status light on the USB dongle to go solid (from blinking previously), but power consumption remains to be tested (will go by heat produced for now).

UPDATE2: for some reason this all stopped working. I ended up needing to use the command ifup (part of wpa_supplicant i think). ifup wlan0, ifdown wlan0, ifquery ... etc. in the end ifdown -a (all down) shut everything down, and ifup wlan0 allowed me to turn it on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.