Robotics‎ > ‎RoboBeagleBot‎ > ‎

Access Point

Debugging a robot is a lot easier when you can connect to it wirelessly. To setup this functionality on the Beaglebone Black, follow these step. You are forewarned that these steps will replace the connection you are able to make with a USB cable (you must choose between USB or WiFi).


WiFi Module
To remotely connect to your Beaglebone using pretty much any computer, tablet, or smart phone, you will need to have a WiFi module that supports AP (Infrastructure Mode). I used Adafruit's Miniature WiFi Module.


You may have to uninstall Wicd (untested)
I uninstalled Wicd to keep it from interfering with the steps taken below. I have yet to test these steps with Wicd installed.


/etc/network/interfaces
Modify your /etc/network/interfaces file so that it includes the following code:
# WiFi AP
auto wlan0
iface wlan0 inet static
address 192.168.7.2
netmask 255.255.255.252

And comment out the Ethernet/RNDIS gadget section by putting a # before each line.
# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
# Note on some boards, usb0 is automaticly setup with an init script
#iface usb0 inet static
#    address 192.168.7.2
#    netmask 255.255.255.0
#    network 192.168.7.0
#    gateway 192.168.7.1


hostapd
First, if you're going to use the WiFi Module I recommend, you must uninstall the version of hostapd that comes installed on the Debian.
apt-get autoremove hostapd

Realtek made their own version of hostapd for this chipset. Jens Segers has made it easy to download, compile, and install. To download:
wget https://github.com/jenssegers/RTL8188-hostapd/archive/v1.1.tar.gz
tar -zxvf v1.1.tar.gz

Next, you will need to compile the program (this will take a while):
cd RTL8188-hostapd-1.1/hostapd
make

To install hostapd, run:
make install

Modify the /etc/hostapd/hostapd.conf so that it appears as follows:
# Basic configuration
interface=wlan0
ssid=Beaglebone
channel=1

# Hardware configuration
driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek


udhcpd.conf
Change the reference to usb0 in your /etc/udhcpd.conf file to wlan0 so that it appears as follows:
start      192.168.7.1
end        192.168.7.1
interface  wlan0
max_leases 1
option subnet 255.255.255.252


Restart
You will need to restart your Beaglebone for your changes to take effect. In the event you made a mistake, you will no longer be able to debug using the connection provided by a USB cable (you will have to use an alternate method).


References
Comments