0

Beaglebone Green with wifi dongle
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Beaglebone Green with wifi dongle

by abowers on Sat Feb 11, 2017 1:45 am

So I have been at this for quite some time now. The goal is to get an LB-Link model No: BL-LW05-AR5 wireless usb adapter working on my Beaglebone Green. I have been goggling a lot but mostly I have followed:
http://crunchbang.org/forums/viewtopic.php?id=40015 and https://learn.adafruit.com/setting-up-w ... figuration. As of right now I feel that I am very close. When following the adafruit page I get all the way to the "ifup" command. Where I get:

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

Bind socket to interface: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at http://www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging..

exiting.
Failed to bring up wlxe0b94db0801d.

Oh,yeah.The name of my wifi usb is wlxe0b94db0801d (instead of wlan0)... working on that on too.I have followed http://askubuntu.com/questions/824376/f ... g-to-16-04, with no luck.

The output from systemctl is that I have 2 failed services:

● networking.service loaded failed failed Raise network interfaces

● wifi-reset.service loaded failed failed Wireless Network Reset

The status of networking.services is:

root@beaglebone:/etc# systemctl status networking.service

● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)

Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: failed (Result: exit-code) since Sat 2017-02-11 04:20:34 UTC; 30min ago

Docs: man:interfaces(5)
Main PID: 2089 (code=exited, status=1/FAILURE)

Feb 11 04:20:33 beaglebone ifup[2089]: Failed to bring up wlx08863b723e4f.
Feb 11 04:20:33 beaglebone wpa_supplicant[2111]: wlxe0b94db0801d: WPA: Key negotiation completed with 00:1c:df:f8:22:b2 [PTK=CCMP GTK=TKIP]

Feb 11 04:20:33 beaglebone wpa_supplicant[2111]: wlxe0b94db0801d: CTRL-EVENT-CONNECTED - Connection to 00:1c:df:f8:22:b2 completed [id=0 id_str=]
Feb 11 04:20:34 beaglebone systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE

Feb 11 04:20:34 beaglebone wpa_supplicant[2111]: ioctl[SIOCSIWAP]: Operation not permitted
Feb 11 04:20:34 beaglebone wpa_supplicant[2111]: wlxe0b94db0801d: CTRL-EVENT-DISCONNECTED bssid=00:1c:df:f8:22:b2 reason=3 locally_generated=1

Feb 11 04:20:34 beaglebone wpa_supplicant[2111]: ioctl[SIOCSIWAP]: Operation not permitted

Feb 11 04:20:34 beaglebone systemd[1]: Failed to start Raise network interfaces.

Feb 11 04:20:34 beaglebone systemd[1]: networking.service: Unit entered failed state.

Feb 11 04:20:34 beaglebone systemd[1]: networking.service: Failed with result 'exit-code'.

So thats the bad. The Good is :

root@beaglebone:~# ifconfig

wlxe0b94db0801d Link encap:Ethernet HWaddr e0:b9:4d:b0:80:1d
inet6 addr: fe80::e2b9:4dff:feb0:801d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:988 errors:0 dropped:2 overruns:0 frame:0
TX packets:17 errors:0 dropped:10 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:410413 (400.7 KiB) TX bytes:5404 (5.2 KiB)

Which means that I am connect to the wifi router and I am getting data Tx and Rx. I just can't get an IP address.

abowers
 
Posts: 3
Joined: Sat Feb 11, 2017 1:37 am

Re: Beaglebone Green with wifi dongle

by drewfustini on Sat Feb 11, 2017 3:38 am

I'd like to know more about what system software is running on your BeagleBone.

Please paste the output of:

cat /etc/dogtag

cat /etc/debian_version

uname -a


Also I'd like to know Vendor ID and Product ID of the USB WiFi adapter. Please paste the output of:

lsusb

drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Beaglebone Green with wifi dongle

by abowers on Sun Feb 12, 2017 3:59 pm

cat /etc/dogtag
BeagleBoard.org Debian Image 2016-10-02
cat /etc/debian_version
8.6
uname -a
Linux beaglebone 4.4.22-ti-r49 #1 SMP Thu Sep 29 17:20:44 UTC 2016 armv7l GNU/Linux
lsusb
Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Product is:
https://www.adafruit.com/products/1030
I have also found out that on the newer kernals, wlan0 is being replaced with wlx(mac address) I don't know if the x is for hex or if it is suppose to be a numeric listing.
I also learned that entering :
ifconfig wlxe0b94db0801d 192.168.2.20 netmask 255.255.255.0
gives me an ip address; however. when I unplug the Ethernet cable I lose the connection( so I connects through a static Ethernet not wifi).
I have been going through the CD that came with the product. There recommendation is that a connection should be done solely through wpa_supplicant because iwconfig doesn't support WPA-PSK.
however; when I enter
wpa_supplicant -Dwext -iwlxe0b94db0801d -c /etc/network/wpa.conf -B
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
root@beaglebone:~# cat /etc/network/wpa.conf
ctrl_interface=/var/run/wpa_supplicant

network={
ssid="my network name"
psk="my password"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

abowers
 
Posts: 3
Joined: Sat Feb 11, 2017 1:37 am

Re: Beaglebone Green with wifi dongle

by abowers on Sun Feb 12, 2017 9:29 pm

Solved
Although I believe that an update may remove changes, a start-script may be needed. The problem is that in Kali they changed how usb wifi devices are named, and that the driver that comes generic driver doesn't work. This is what I did to correct. If anyone has a better solution please let me know.

#install driver

Realtek RTL8188CUS and RTL8192CU chipsets (0bda:8176 and 0bda:8178)

2. Wireless Realtek chipsets that are running on the default rtl8192cu driver, often lose connection and run below their proper speed. That's because of a bug in the rtl8192cu driver.

For instance, such a Realtek chipset is present in the Medion MD 86498 USB wireless dongle. The chipsets involved, are the RTL8192CU and the RTL8188CUS.

Luckily there's a solution that'll make such a chipset run stable and fast, namely replacing the defective driver by a better one. This solution is necessary for the following operating systems:
- Ubuntu 14.04
- Linux Mint 17.2
- Ubuntu 12.04
- Linux Mint 13

This is how to do it:


a. First check whether the buggy driver rtl8192cu is active in your operating system:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Use copy/paste to transfer the following line into the terminal:

lsmod | grep rtl

Press Enter.

When you see one or more times rtl8192cu in the terminal output, then it's active. In that case proceed with step 2.


b. Disconnect your wireless connection (unplug the USB adapter that contains the Realtek chipset), and temporarily connect to the internet by means of an ethernet cable (or by means of another wireless chipset that does function well).


Intermediary step, only necessary for Linux Mint 17, 17.1 and 17.2: install the latest kernel within the 3.13, 3.16 or 3.19 series, in the following way (item 3, right column)


c. Now install some applications for building the right driver:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Type (use copy/paste):

sudo apt-get install linux-headers-$(uname -r) build-essential dkms git

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

Wait until the installation has completed.


d. Now download the source code of the right driver as follows. Copy and paste the following command line into the terminal:

git clone https://github.com/pvaret/rtl8192cu-fixes.git

Press Enter.


e. Set it up as a DKMS module:

Copy and paste into the terminal:

sudo dkms add ./rtl8192cu-fixes

Press Enter and if prompted, submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.


f. Build and install the new driver:

Copy and paste into the terminal:

sudo dkms install 8192cu/1.10

Press Enter.


g. Refresh the module list:

Copy and paste into the terminal:

sudo depmod -a

Press Enter.


h. Blacklist the faulty driver:

Copy and paste into the terminal:

sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

Press Enter.


i. Reboot your computer.


j. The problem should now be solved: disconnect the temporary ethernet cable and insert the Realtek device again.

With the following terminal command you can check whether the right driver is active now (copy and paste it into the terminal):

lsmod | grep 8192

Press Enter.

In the terminal output you should see that the new driver 8192cu is active. You should see no mention anymore of the old driver rtl8192cu.

Note: a possibly surprising side effect might be, that the light on your wireless card is blinking constantly now. That's normal: the light is blinking whenever data are being sent or received.

Note (2): do NOT install newer kernels, because then you'll probably lose the driver again! In Linux Mint you never get a newer kernel by default, so that's OK. But in Ubuntu you do. So I advise to pin Ubuntu to the current kernel (item 6, right column).

Source: https://github.com/pvaret/rtl8192cu-fixes

#Reboot
reboot


#update /etc/network/interfaces

nano /etc/network/interfaces

# Paste:
auto wlan0
iface wlan0 inet dhcp
wpa-essid your network name
wpa-psk your password

# Changing WL(Mac) to wlan0
nano /lib/udev/rules.d/73-usb-net-by-mac.rules

#change Names:
#From:
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
ATTR{address}=="?[014589cd]:*", \
IMPORT{builtin}="net_id", NAME="$env{ID_NET_NAME_MAC}"

#To:
ACTION=="add", SUBSYSTEM=="net", SUBSYSTEMS=="usb", NAME=="", \
ATTR{address}=="?[014589cd]:*", \
IMPORT{builtin}="net_id", NAME="wlan0"

#install wpa_supplicant
apt-get install wpasupplicant

#Reboot
reboot

abowers
 
Posts: 3
Joined: Sat Feb 11, 2017 1:37 am

Please be positive and constructive with your questions and comments.