This tutorial explains how to connect Beaglebone with WI-FI adapter for internet connectivity. Before proceeding, we need some basic configuration as well as an internet connection. First connect the internet through Ethernet. In this tutorial I have used EDMAX which works with almost any kind of WI FI adapter.
Fig. 1: Image of Wi-Fi Adapter
Step1: Connect with internet and power up BBB. Take the access of BBB with SSH through PC.
Step2: First of all upgrade your kernel version for a better WI-FI performance. (Ignore if already done)
Step3: Once the upgrade is finished, reboot the system.
Step4: Set system time and date by polling network time protocol. It detects and sets the correct time on system. Follow the command to set the time:
ntpdate -b -s -u pool.ntp.org
Fig. 2: Screenshot of Root Login on Linux Console on Beaglebone Black
Step5: Install the git from debian repository for downloading it directly by cloning link. Then check if it is installed or not by entering following command:
dpkg -s git
Enter the following command if it is not installed:
Sudo apt-get install git
Step4: Now, download and install WI-FI reset script. It will reset the WI-FI connectivity by bringing up and down on boot of BBB. This step is not required if you have the latest version of Kernel.
git clone https://github.com/adafruit/wifi-reset.git
Fig. 3: Screenshot of Installing Wifi Reset Git Clone from Linux Console on Beaglebone Black
Step5: Execute shell scripting file named install.sh. Make sure you are located in wifi-reset directory and also set the permission for execute.
Fig. 4: Screenshot of Setting Permissions for Wifi Reset git Clone from Linux Console on Beaglebone Black
Fig. 5: Screenshot of Setting Permissions for Wifi Reset Git Clone from Linux Console on Beaglebone Black
Step6: Execute the WI-FI reset script by following line:
./install.sh
Fig. 6: Screenshot of Installing Wi-Fi Reset Script from Linux Console on Beaglebone Black
Step7: Now, Disconnect Ethernet connection and power cable from BBB. Connect WI-FI adapter (i.e., EDIMAX in this tutorial) into USB port and again power up the BBB. Take the access of BBB with SSH through PC.
Step8: Check wireless adapter configuration with following command:
iwconfig
Fig. 7: Screenshot of Checking Wireless Adaptor from Linux Console on Beaglebone Black
Here, wlan0 displays the information of wireless network. Currently it indicates off which means there is no wireless connectivity with BBB.
Step9: Change the directory /etc/network and open the network interface file. Edit WI-FI connection information and save it.
cd /etc/network
nano interfaces
Fig. 8: Screenshot of saving Wi-Fi Connection Information from Linux Console on Beaglebone Black
You can see the following result:
Fig. 9: Screenshot of Wi-Fi Connection Information on Linux Console on Beaglebone Black
Step10: Configure WI-FI information and set your WI-FI name and password for accessing connectivity.
Fig. 10: Screenshot of Wi-Fi Name and Password on Linux Console on Beaglebone Black
Enable above(see in above image) line of WI-FI setting by removing ‘#’ sign and Write down your wifi id and password in place of the black part as seen above.
Step11: Now, bring up WI-FI connection by following command:
ifup wlan0
Fig. 11: Screenshot of Setting up Wi-Fi Connection from Linux Console on Beaglebone Black
Note: Response should be different but you need to wait for DHCPOFFER and bound with internet address.
Step12: Finally, you have internet connection using WI-FI module Check ping response from any website.
For example, ping engineersgarage.com
Fig. 12: Screenshot of Pinging to a Site From Linux Console on Beaglebone Black
Note: press ctrl+C to stop the ping process.
Automatic WI-FI access on boot
We have already installed wi-fi reset script which is automatically connected with WI-FI on boot. Let’s check if it is working or not.
Reboot your system by reboot command.
After reboot, take BBB access via SSH and check ping response again. If it responds, you can successfully access WI-FI internet connectivity.
If not (which is a rare case) then bring down WI-FI reset and again up by following commands:
ifdown wlan0
ifup wlan0
Enjoy with your wireless connection with Beaglebone black.
Fig. 13: Image of Beaglebone Black connected to Wi-Fi Router
Filed Under: BeagleBone, Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.