Issue #6 new
Michael Backus repo owner created an issue

In order to employ remote debugging, calibration, and control, it would be really nice if we could connect to an ad-hoc network hosted by the beaglebone.

I've worked out how to do this, but the connection is far from reliable. I am able to connect to the bone using my Macbook Pro running Windows 7, and can even remote into using Cloud9. Unfortunately, the connection drops within a couple minutes. I appear able to get the connection going again for a short while using:

sudo ifdown wlan0
sudo ifup wlan0

I can see and connect to the Beaglebone's ad-hoc network using an iPad, but am unable to navigate to any of the pages served. I tested 3 different Android devices. None of them could connect to the network, but I was able to see that the Beaglebone was broadcasting using Wifi Analyzer. My home router and the dongle were within about a foot of each other and showed comparable signal strength of over -50 dBm when analyzed at a distance of about 3 feet. However, the Beaglebone's ad-hoc network was finicky, and would drop down or completely out regularly.

To eliminate as many potential problems as possible, I hooked up the Beaglebone to my TV and used an unpowered USB 4-port hub to connect the WiFi dongle, a keyboard, and a mouse (I also had a webcam plugged in). I powered it using Adafruit's 5V 2A power supply.

My first step was to uninstall Wicd using the following command

sudo apt-get remove wicd-* --purge

I did this to eliminate the possibility of Wicd somehow thwarting the old school method that follows.

Second, I modified the /etc/network/interfaces file to include the following lines:

# WiFi ad-hoc
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
wireless-channel 2
wireless-essid Beaglebone
#wireless-key s:beaglebone
wireless-mode ad-hoc

I originally tried to connect with a password, but had difficulty so commented it out. Once these changes were made, I ran

sudo ifup wlan0

At this point I was able to see the WiFi connection using Wifi Analyzter. It took my Macbook a little longer to find the connection.

In order to use the ad-hoc network as desired, the following issues must be addressed:

  1. Stability of the network (figure out how to keep it from dropping after only a few minutes).
  2. Connectivity to the network (the Android tablets were unable to connect to the network, and the iPad could not navigate to any pages served).

Possible solutions include:

  1. A better WiFi Adapter
  2. A different configuration of the /etc/network/interfaces file.

Adafruit has an informative tutorial on setting up WiFi with a few suggestions that might be applicable,

Comments (1)

  1. Michael Backus reporter

    Turns out Android devices are unable to connect to ad-hoc networks. As a consequence, I pursued another option - turning the robot into an Access Point using AP (Infrastrcture Mode). For details, refer to the Access Point page on my website.

    This method still leaves much to be desired as it replaces the USB connection. I'd like to figure out how to toggle between being able to access the robot with a USB cable and a WiFi dongle via a DIP switch on the proto cape.

    I'd also like to improve the security of this connection by adding a password.

  2. Log in to comment