WiFi Module compatibility

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
rishik
 
Posts: 5
Joined: Thu Mar 06, 2014 5:12 pm

WiFi Module compatibility

Post by rishik »

Hi,
I had ordered a WiFi USB device from Adafruit earlier this year in March, assuming that I would be able to use it on my BBB. ("Miniature WiFi (802.11b/g/n) Module: For Raspberry Pi and more" for $11.95). But after I ordered, the blog post for that device changed to state that it does not work for BBB. Now, I don't even see that device on the list of products. Is this device compatible with the Beaglebone Black? How can I install it on my device? My OS is Ubuntu.
Thank you!

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: WiFi Module compatibility

Post by adafruit2 »

It ought to work, it works great with just about every other computer! but we don't have a tutorial for it - if your OS has drivers for the RTL8192 or RTL8188 then this dongle is compatible

rishik
 
Posts: 5
Joined: Thu Mar 06, 2014 5:12 pm

Re: WiFi Module compatibility

Post by rishik »

Hi,

I have installed the Debian version onto my Beaglebone Black version B that is at this link: http://debian.beagleboard.org/images/bo ... 2gb.img.xz

I am still having problems connecting to my internet.
I believe my internet (Verizon Fios) is a WEP connection, since on the side of the router, it has the information for the "MAC ID", "WEP KEY", and "ESSID". (I am not sure how else to know what kind of connection I have.)

I am working via ssh to setup the wireless connection.

I know that the drivers for this wifi dongle are installed on the OS, and the command "iwlist wlan0 scan" returns:


root@beaglebone:/home/debian# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:1F:90:E1:48:39
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=40/70 Signal level=-70 dBm
Encryption key:on
ESSID:"SCC48"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000001c1d047ca
Extra: Last beacon: 74ms ago
IE: Unknown: 00055343433438
IE: Unknown: 010882848B0C12961824
IE: Unknown: 030101
IE: Unknown: 0706555320010B1B
IE: Unknown: 200100
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
IE: Unknown: DD180050F2020101830003A4000027A4000042435E0062322F00



I know that "wicd" is the only network connection service running. However, when I run "wicd-curses" to select "SCC48", it cannot find any wireless connections.

I have already looked at several links and blog posts, including:
http://www.wirelessdefence.org/Contents ... N%20(DHCP)

Following that link, I ran:


root@beaglebone:/home/debian# iwconfig wlan0 mode managed key WEP_KEY
root@beaglebone:/home/debian# iwconfig wlan0 essid "SCC48"
root@beaglebone:/home/debian# dhclient wlan0


But the dhclient never returns anything.

Is there anything I could try to solve this issue? Let me know if you need any other information!

Thank you!

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: WiFi Module compatibility

Post by tintar »

I've had weird results with 8188 and 8192 devices on ubuntu x64 laptops and desktops. part of it was needing to install firmware-realtek. otherwise the cards would appear to be working but never connect.

but it looks like my bbb debian came with firmware-realtek installed by default.
oh wait you are on ubuntu. try e.g.
$ dmesg | grep -i firm
and see if there are any errors about missing firmware files.

but part of it was also - I've owned a handful of 8188 as well as 8192 having different hardware revisions, but you wouldn't know it because they would still have exactly the same hardware id. all bought years ago from the same mfg. but then a couple more bought here and there, a year after that. and then some more, 2 years after that. same mfg, same price, same FCC ID, same hardware ID.

some worked perfectly, but others not so much. probably the manufacturers redesign the pcb after a while and start to skimp on the antenna or other components to save money, or maybe their original supplier of a specific component is out of stock or out of business, and so they have to re-source the component, or redesign, re-fab etc.

one thing to try when these realtek cards act flaky is to unload the module and then reload it.

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: WiFi Module compatibility

Post by tintar »

this is the kludge that always worked for me on a laptop with 8192se (not a usb variant, but still possibly one of the worst realtek wireless ever made)

Code: Select all

#!/bin/sh
/usr/bin/sudo /sbin/modprobe -r rtl8192se
/bin/sleep 1
/usr/bin/sudo /sbin/modprobe rtl8192se
/bin/sleep 1
/usr/bin/sudo /sbin/iw reg set US
I forget why setting the country/frequencies was necessary, but the script only started to work 100% of the time after I added that line. I think the realtek module or maybe something in the firmware blob, resets to a frequency table that may not be valid for where some of us live.

I tried the mini adapter in bbb and had the same - I could auth with my AP, but yeah dhclient would try and fail (btw try dhclient -v if you want to see what it thinks is happening). but then I entered the 'reg set US' and got an IP. yay.

give this a try:

Code: Select all

sudo iwconfig wlan0 key some_key
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid some_ssid
# at this point, it is actually successfully associated. but...
sudo dhclient -v wlan0
# nada
sudo pkill dhclient
sudo /sbin/iw reg set US
sudo dhclient -v wlan0
# success yay!
not sure about ubuntu, but for bbb debian "iw" was not installed by default. and, naturally, pick your own country/region for the iw reg set :-)

device #1 - adafruit usb stick, page says compatible with rpi and bbb.
says "ourlink 150M 802.11n wireless usb adapter" on the cover. and a green LED.
Bus 001 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN

94% signal.

Module Size Used by
rtl8192cu 103277 0
rtl8192c_common 75767 1 rtl8192cu
rtlwifi 111269 1 rtl8192cu
mac80211 506862 3 rtl8192cu,rtl8192c_common,rtlwifi
cfg80211 205774 2 rtlwifi,mac80211


device #2 - adafruit mini usb doodad. probably the same one you have.
says "802.11n" on it, and green LED hidden inside the metal conector
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN

74% signal at first, but dropped to 52%

Module Size Used by
rtl8192cu 103277 0
rtl8192c_common 75767 1 rtl8192cu
rtlwifi 111269 1 rtl8192cu
mac80211 506862 3 rtl8192cu,rtl8192c_common,rtlwifi
cfg80211 205774 2 rtlwifi,mac80211




I only tried the mini one in the bbb. powered hub if that makes any difference. I may try the stick at some point, but all 4 ports are permanently needed for other stuff :-)

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: WiFi Module compatibility

Post by tintar »

btw there should probably be a commented out example for auto wireless in /etc/network/interfaces. it will be auto run by /etc/init.d/networking on boot. just uncomment and edit to your needs.

one slightly odd thing -

even though the wireless was eventually successful, dhclient showed that it send about 6 or 7 tries, which is odd, usually it needs 3 at most. could be the weak signal. or the router is flaky, can't tell for certain since I don't have access to any logs just the status page.

but the odd thing isn't even the number of dhcp requests it sent, it's that the router responded offering an IP address already in use - the same IP as the ethernet interface on the bbb. huh??!? luckily dhclient then sent another request, and was rewarded with a unique IP.

rishik
 
Posts: 5
Joined: Thu Mar 06, 2014 5:12 pm

Re: WiFi Module compatibility

Post by rishik »

Thank you for your help!

I do get a response now, after using the "iw" command you suggested, but it is still unable to connect to a network. Here is the log I receive:


root@beaglebone:/home/debian# iw reg set US

root@beaglebone:/home/debian# dhclient -v 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:13:ef:c0:0b:8b
Sending on LPF/wlan0/00:13:ef:c0:0b:8b
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

root@beaglebone:/home/debian# ping http://www.google.com
ping: unknown host http://www.google.com


I have no idea what I should do with this information.

And yes, my original post was for ubuntu, but it was giving me some problems so I installed Debian afterwards.

rishik
 
Posts: 5
Joined: Thu Mar 06, 2014 5:12 pm

Re: WiFi Module compatibility

Post by rishik »

Also, my wireless chip reads (from "lsusb"):

ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

tintar
 
Posts: 24
Joined: Tue Jun 24, 2014 2:00 pm

Re: WiFi Module compatibility

Post by tintar »

there's an earlier post about someone with the same mini adapter and similar problem.

turned out that once they moved closer than 10 feet to the router/ap, the adapter could get an IP.

I don't find this too surprising - the antenna in that thing has to be tiny. also, given the size, I'd have to wonder how much tx/rx power it truly has.

when I was testing and it finally worked, my adapter was only about 5 feet from the AP. could be the iw command was not the reason for success, only a coincidence!

btw it quickly got SUPER HOT, so its lifetime may not be all that long...

User avatar
drjohnmarino
 
Posts: 6
Joined: Wed May 13, 2015 12:12 pm

Re: WiFi Module compatibility

Post by drjohnmarino »

I'm new with the pi community. I purchased a 802.11n wifi module from adafruit to connect my pi wirelessly and been having major difficulty in getting it to operate. I followed the instructions that came with the module. I tried to run the driver setup.exe that I downloaded from realtek and the pi just connects me to the raspberry website. I also tried following the installation instructions on the adafruit site including copying the code. infact I tried all of them and still got fail messages on the bootup. the messages were:

FAIL not running dhcpcd because /etc/network/interfaces...Failed
&
Fail defines some interfaceswith will use a DHCP client...Failed

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: WiFi Module compatibility

Post by adafruit_support_mike »

Can you get a network connection if you set the wifi adapter up as a regular client?

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”