Thursday, January 3, 2013

Beaglebone: Using an USB WiFi dongle to connect to wireless networks at boot.

I'll cover how I configured my BeagleBone so it now (automagically) connects to wireless networks at boot.

Note: I assume you are running Ubuntu 12.10 in your Beaglebone.

Manual connection


First, let's check whether the Beaglebone can use the WiFi dongle by setting up a manual connection.

Before starting the test, let's install some software with the ethernet cable plugged in:
#On the beaglebone
sudo apt-get install lshw
sudo apt-get install wpasupplicant
Now unplug the Ethernet cable from the Beaglebone. And start a connection using the USB emulated Serial connection.
# On the PC
screen /dev/<ttyUSBx> 115200
Now let's check if the Beaglebone has recognized the WiFi dongle.
# On the beaglebone
lshw -C network
I got this:
*-network:1 DISABLED
description: Wireless interface
physical id: 2
bus info: usb@1:1
logical name: wlan0
serial: d8:eb:97:12:e4:c0
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8192cu driverversion=3.2.33-psp26 firmware=N/A multicast=yes wireless=IEEE 802.11bgn
If you see something similar, it means your device has been detected by the Linux kernel and an appropriate driver has been loaded.

Remember the logical name, in this case is wlan0.

Now, turn on the WiFi dongle. (Use the logical name obtained from the last command)
# On the beaglebone
sudo ifconfig wlan0 up

Blue LED indicates that the WiFi dongle has been turned ON.

Scan for visible WiFi networks.
# On the beaglebone
sudo iwlist wlan0 scanning
You should see your network in the list:
wlan0     Scan completed :
          Cell 01 - Address: 00:13:49:CA:F5:10
                    Channel:4
                    Frequency:2.427 GHz (Channel 4)
                    Quality=56/70  Signal level=-54 dBm
                    Encryption key:on
                    ESSID:"your-ssid"
                    ...
Now, let's connect to your network.
# On the beaglebone
sudo nano /etc/network/interfaces
Append or modify the file to include the following text (I'm assuming your network it's WEP protected):
auto wlan0
iface wlan0 inet dhcp
    wireless-essid <ssid>
    wireless-key s:<ascii key>
Next, start the connection
# On the beaglebone
sudo ifup wlan0
And finally, test the connection
# On the beaglebone
ping www.google.com

Congratulations, you have connected to a wireless network.

Going automatic


We'll use wpa_supplicant to automate the connections to wireless networks.

wpa_supplicant is a daemon that manages unsecure, WEP and WPA wireless connections.

wpa_supplicant stores the information about the wireless networks that it can connect to in a .conf file, usually named wpa_supplicant.conf.

You can create/edit it, using:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
This is how it should look like:
ctrl_interface=/var/run/wpa_supplicant

# Unsecure Network
network={
    ssid="<ssid>"
    key_mgmt=NONE
    priority=<unsecure_priority>
}

# WEP Network
network={
    ssid="<ssid>"
    key_mgmt=NONE
    wep_key0="<key>"
    priority=<wep_priority>
}

# WPA Network
network={
    ssid="<ssid>"
    psk="<passphrase>"
    priority=<wpa_priority>
}

For more examples about the .conf file, check this website.

Let's reconfigure the network interface to add support for wpa_supplicant.
sudo nano /etc/network/interfaces
Change the wlan0 part to match the following text:
auto wlan0
iface wlan0 inet dhcp
    wpa-driver wext
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Finally reboot the BeagleBone to see the changes.
sudo reboot
Done!

19 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. Verified=Tools=Available

      Kali Linux Master Class
      D33p/D@rk Web Complete Course
      Spamming Tools/Tutorials
      BTC Cracker/Flasher
      Key LOggers
      Hacking Stuff/Books/Tuts
      SMTP's
      RDP's
      C-panel's
      Shells
      Web-mailers
      Mailers/Senders/Bomber
      Combos
      Carding Cashout/Spamming Methods
      Brutes
      Premium Cracked Versions
      Viruses/RAT's
      Scam Page Scripting

      7528 22040 I.C.Q
      @killhacks Tel Gr

      Fresh Spammed & Legit Fullz/Pros/Leads

      High CS Fullz (700+)
      CC Fullz
      SSN+DOB FULLZ
      SSN+DOB+DL+Emp Details Fullz
      Premium Fullz
      Dumps With Pin Codes 101/202 (Good Balanced)
      Business Fullz with EIN

      7528 22040 I.C.Q
      @killhacks Tel Gr

      All stuff will be legit & Verified
      Invalid found will be replace instantly
      Just hit me up Guys

      Delete
  2. Excellent tutorial, thanks! I used a Edimax EW-7811Un with no problems at all.

    ReplyDelete
  3. Which wireless dongle have you used?

    ReplyDelete
    Replies
    1. Hello Hyon,

      For this tutorial I used a Trendnet dongle, the model is TEW-648UBM, a.k.a. N150 Micro Wireless USB Adapter.

      It's based on the rtl8192cu chipset.

      Delete
  4. can this tutorial be followed for beagle board xm rev C as well?

    ReplyDelete
  5. and one more thing is that 12.10 version is important to setup wireless connection?? cuz i have ubuntu 11.10 running on my beagle board,12.10 was quite slow so i had to change it

    ReplyDelete
  6. hi can i use a wifi data stick on an Ångström image? and can u help me setup my bone on a lan network?

    ReplyDelete
  7. how can i do the same if i hav an angstrom image on my beagle bone black.. Guess al the commands above wont wrk! please let me know

    ReplyDelete
  8. forget the rtl8192cu chipset with Angstrom, it will not work reliably. Using Ubuntu is the right choice

    ReplyDelete
  9. Thanks for this tutorial - information is spot-on and it helped me a lot.

    ReplyDelete
  10. Thank you for posting the great content…I was looking for something like this…I found it quiet interesting, hopefully you will keep posting such blogs… cell phone detection

    ReplyDelete
  11. Excellent tutorial. I have a LB-Link running on a BBB rev. B w/ Ubuntu 3.10 now with no issues. Cheers for posting!

    ReplyDelete
  12. Misi gan, izin share ya...

    ONE 14-Z1401-C2H9 (320GB)
    Price Rp 3.499.000

    Learn more about

    Brief Specs :
    Intel 2840, 2 GB DDR3, 320 GB HDD,NIC, Intel HD Graphics, 14" WXGA, Non OS


    Pusat Belanja Komputer

    Terimakasih :)

    ReplyDelete
  13. This comment has been removed by the author.

    ReplyDelete
  14. Selling USA FRESH SPAMMED SSN Leads/Fullz, along with Driving License/ID Number with EXCELLENT connectivity.

    **PRICE**
    >>1$ FOR EACH FULLZ WITHOUT DL NUMBER
    >>2$ FOR EACH LEAD/FULLZ/PROFILE
    >>5$ FOR EACH PREMIUM LEAD/FULLZ/PROFILE

    **DETAILS IN EACH LEAD/FULLZ**

    ->FULL NAME
    ->SSN
    ->DATE OF BIRTH
    ->DRIVING LICENSE NUMBER WITH EXPIRY DATE
    ->ADDRESS WITH ZIP
    ->PHONE NUMBER, EMAIL, I.P ADDRESS
    ->EMPLOYEE DETAILS
    ->REALTIONSHIP DETAILS
    ->MORTGAGE INFO
    ->BANK ACCOUNT DETAILS

    >All Leads are Tested & Verified.
    >Invalid info found, will be replaced.
    >Serious buyers will be welcome & I will give discounts on bulk orders.
    >Fresh spammed data of USA Credit Bureau
    >Good credit Scores, 700 minimum scores
    >Bulk order will be preferable
    >Minimum order 20 leads/fullz
    >Hope for the long term business
    >You can asked for samples, specific states & zips (if needed)
    >Payment mode BTC, ETH, LTC, Paypal & PERFECT MONEY

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ''OTHER GADGETS PROVIDING''

    >SSN Fullz
    >Dead Fullz
    >Carding Tutorials
    >Hacking Tutorials
    >SMTP Linux Root
    >DUMPS with pins track 1 and 2
    >Sock Tools
    >Server I.P's
    >USA emails with passwords (bulk order preferable)

    **Contact 24/7**

    Email > leads.sellers1212@gmail.com
    Telegram > @leadsupplier
    ICQ > 752822040

    ReplyDelete
  15. Verified=Tools=Available

    Kali Linux Master Class
    D33p/D@rk Web Complete Course
    Spamming Tools/Tutorials
    BTC Cracker/Flasher
    Key LOggers
    Hacking Stuff/Books/Tuts
    SMTP's
    RDP's
    C-panel's
    Shells
    Web-mailers
    Mailers/Senders/Bomber
    Combos
    Carding Cashout/Spamming Methods
    Brutes
    Premium Cracked Versions
    Viruses/RAT's
    Scam Page Scripting

    7528 22040 I.C.Q
    @killhacks Tel Gr

    Fresh Spammed & Legit Fullz/Pros/Leads

    High CS Fullz (700+)
    CC Fullz
    SSN+DOB FULLZ
    SSN+DOB+DL+Emp Details Fullz
    Premium Fullz
    Dumps With Pin Codes 101/202 (Good Balanced)
    Business Fullz with EIN

    7528 22040 I.C.Q
    @killhacks Tel Gr

    All stuff will be legit & Verified
    Invalid found will be replace instantly
    Just hit me up Guys

    ReplyDelete
  16. Very Fresh, Legit & Genuine Stuff available now
    Freshly spammed from HIGH INCOME Databases
    USA, UK, Canada States available
    All info included SSN/SIN DOB DL
    Fullz will be high credit scores 680 to 700+
    Stuff will be fresh, never sold before

    +92 3.1.7 2.7.2 1.1.2.2 WhatsApp/Tele-gram
    7.5.2.8.2.2.0.4.0 I.C.Q
    @peeterhacks Skype&WickrMe
    exploit dot tools4u at gmail dot com

    CC FULLZ with CVV's
    DUMPS with Pins
    Combos
    Logs
    Office365 Emails & Logs
    Spamming Tools & Tutorials (SMTP's, RDP's, C-panels, Brutes, Scripting, etc)
    Ha-cking stuff with complete tools, Guides, Ebooks & guidance
    Carding fresh Methods, Loan Methods, Carding Cash-out Methods
    Carding Tutorials, Transfers, top-up's
    Kali Linux with Termex & Python
    Keyloggers, Shells, RAT's
    I.p's, Proxies, Server I.p's

    Many other stuff we can provide on demand
    Here we're

    @killhacks ICQ&Tele.gram
    +92 317272 1122 WhatsApp

    ReplyDelete