Beaglebone Black and Wifi

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
ColdFire
 
Posts: 26
Joined: Sun Apr 06, 2014 1:14 pm

Beaglebone Black and Wifi

Post by ColdFire »

Hello!

Would like to know if the product: "Miniature WiFi (802.11b/g/n) Module: For Raspberry Pi and more" is compatible with the new BEAGLEBONE Black REV. C ?


Thank you !

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Beaglebone Black and Wifi

Post by adafruit_support_rick »

According to the product page, it is:

"If using with a Beagle Bone: Because of the high power required by WiFi, a 5V 2A power adapter is required to power both the Bone and WiFi. Flaky behavior and crashes may result if this is not followed! We have a tutorial for using this module with the Beagle Bone:"
http://learn.adafruit.com/beaglebone/wifi

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Beaglebone Black and Wifi

Post by paulf8080 »

I bought the one with external antenna. I found several different multi-step installation instructions, including the product web page. The steps sometimes add/modified files that were already modded. It turns out that latest Debian OS has that model built in out of the box and works with the WiCD wifi manager. I bought the antenna because I plan on connecting from my car parked outside hotspots (I want to download my podcasts while on the road) . So far it works great.

Image

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Beaglebone Black and Wifi

Post by adafruit_support_rick »

Great! Thanks for posting

User avatar
paulf8080
 
Posts: 208
Joined: Sat Jan 18, 2014 10:25 pm

Re: Beaglebone Black and Wifi

Post by paulf8080 »

I thought I was putting in a blank SD card and it was the debian emmc flasher. So out of the box again. :-) I had to un-comment the wifi example in /etc/network/iinterfaces and change the interface to ra0 and went from dhcp to static.

Code: Select all

# WiFi Example
auto ra0
iface ra0 inet static
   address 192.168.1.17
   netmask 255.255.255.0
   gateway 192.168.1.1
"iwlist scanning" could scan the hotspots, but wicd didn't work. wicd needed the ra0 in the drop down menu "Preferences". "Out of the box" was a slight exaggeration. :-)

User avatar
ColdFire
 
Posts: 26
Joined: Sun Apr 06, 2014 1:14 pm

Re: Beaglebone Black and Wifi

Post by ColdFire »

Hello !


The tutorial "Miniature WiFi (802.11b/g/n) Module: For Raspberry Pi and more" is compatible with the new Black REV.C BEAGLEBONE ??


Thanks !

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Beaglebone Black and Wifi

Post by tdicola »

You can sort of follow that guide, the info on changing /etc/network/interfaces is what you should look at. Make sure you're using the latest Debian operating system and not the older Angstrom image. If you're using Debian the Realtek-based adapters in the store should work without the need to install any modules. The Debian image also includes a commented out configuration in /etc/network/interfaces that you can uncomment and use. If you edit the file with a text editor like nano, for example by running:

sudo nano /etc/network/interfaces

You can scroll down and make sure this section is uncommented and set to your wireless network name and password:

# WiFi Example
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "YOUR AP NAME"
wpa-psk "YOUR AP PASSWORD"

Where YOUR AP NAME and YOUR AP PASSWORD should be set to the right values for your wirless network. This configuration also assumes you're getting an IP assigned from your router. Save the file and then bring up the wireless network by running:

sudo ifup wlan0

After a short time the wifi connection should be made with your network.

The only weird thing I've noticed is that the wireless connection is not automatically brought up when the BeagleBone Black is rebooted. I have to manually log in and run ifup wlan0 again to get it working.

I've tried the wicd tool that PaulF8080 mentioned but for some reason can't get it to connect to my network--you might look into that tool since it's supposed to make the wireless setup a little easier. In general wifi setup on the BeagleBone Black is unfortunately not as easy as the Raspberry Pi right now. Your best bet if you run into trouble is to ping the BeagleBone Black google group as there are a lot of knowledgeable BeagleBone Black folks that can help.

User avatar
JSCros
 
Posts: 4
Joined: Thu Jul 17, 2014 2:46 pm

Re: Beaglebone Black and Wifi

Post by JSCros »

Hi,
Thanks for the help and information. I have a rev C. beaglebone black and one of the mini usb WiFi (802.11b/g/n). I've gotten it to connect to my network and show up on the router, by following the instructions here. But I can't seem to connect to it from another computer, either SSH in or even just ping it. Would you happen to have any thoughts or suggestions? I'm kind of at a loss for another step.
Thank you,

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Beaglebone Black and Wifi

Post by tdicola »

One thing to check would be what IP address is getting assigned to the device. If you run the command:

ifconfig -a

What does the output look like? Hopefully there's a wlan0 device with an IP address that you can try accessing from another machine. If there's not a wlan0 device or the IP address isn't there then it might not actually be setup correctly. You might need to double check the configuration in /etc/network/interfaces

User avatar
JSCros
 
Posts: 4
Joined: Thu Jul 17, 2014 2:46 pm

Re: Beaglebone Black and Wifi

Post by JSCros »

Thank you for that, I'm new to this stuff and often miss things.

After ssh'ing in over USB, I run ifconfig -a and do get a line for the wlan0 device:

wlan0 Link encap:Ethernet HWaddr 00:13:ef:d0:23:e8
inet6 addr: fe80::213:efff:fed0:23e8/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:91 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11839 (11.5 KiB) TX bytes:19671 (19.2 KiB)


I don't see an IP address there, though the board is getting assigned an IP address from the router (I can log into the router and see what is connected). Though I can't connect with that address from another computer (either ssh or pinging).

I've tried a couple different configurations in /etc/network/interfaces, so far this has gotten me the closest:

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


iface usb0 inet static
    address 192.168.7.2
    netmask 255.255.255.0
    network 192.168.7.0
    gateway 192.168.7.1

The wpa_supplicant.conf file, holds the network information:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
 ssid="MY NETWORK NAME"
 scan_ssid=1
 psk="MY ALPHANUMERIC PASSKEY"
 proto=RSN
 key_mgmt=WPA-PSK
 pairwise=CCMP
 auth_alg=OPEN
}
Anyway, thank you again for your help, let me know if anything obviously wrong jumps out at you.

Best
Jeff

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Beaglebone Black and Wifi

Post by tdicola »

Interesting, from the ifconfig output it looks like there's only an ipv6 address and not an ipv4 address (like 192.168.1.x) assigned. For example here's an ifconfig output for my BBB connected to wifi:

Code: Select all

wlan0     Link encap:Ethernet  HWaddr 80:1f:02:70:91:fb  
          inet addr:192.168.1.118  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::821f:2ff:fe70:91fb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:549 errors:0 dropped:0 overruns:0 frame:0
          TX packets:234 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:145937 (142.5 KiB)  TX bytes:31177 (30.4 KiB)
The difference is the addition of the 'inet addr' line above the inet6 addr line. I wonder is you router configured to only give ipv6 addresses perhaps?

User avatar
TronDD
 
Posts: 3
Joined: Wed Sep 10, 2014 10:27 pm

Re: Beaglebone Black and Wifi

Post by TronDD »

fe80:* ipv6 addresses are self assigned. It means DHCP failed to get an IP address. You're not connecting to your router.

I'm currently at the same point...

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Beaglebone Black and Wifi

Post by tdicola »

Actually try checking out this recent guide I wrote on setting up WiFi on the BeagleBone Black: https://learn.adafruit.com/setting-up-w ... k/overview I found the Realtek drivers in the stock Debian OS are kind of old so it helps to run a kernel update script to get the latest 3.8 kernel. I also found even with the more up to date kernel WiFi is a little flakey on boot and it helps to add a script that resets the adapter at startup. Check out the tutorial for more information on getting both to work.

User avatar
TronDD
 
Posts: 3
Joined: Wed Sep 10, 2014 10:27 pm

Re: Beaglebone Black and Wifi

Post by TronDD »

Thanks, good writeup. I updated everything but still had the same problem.

Found a suggestion to modify /etc/dhcp/dhclient.conf and change (or add) the timeout to 100. Worked immediately after that.

Tim.

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: Beaglebone Black and Wifi

Post by tdicola »

Oh good to know, thanks for the tip on increasing DHCP timeout.

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

Return to “Beagle Bone & Adafruit Beagle Bone products”