• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Whenever you search in PBworks, Dokkio Sidebar (from the makers of PBworks) will run the same search in your Drive, Dropbox, OneDrive, Gmail, and Slack. Now you can find what you're looking for wherever it lives. Try Dokkio Sidebar for free.



Page history last edited by Michael Shiloh 10 years, 10 months ago



I'm currently running this version of Ubuntu on my Beagle Board xM


Networking over USB


I think (will verify today) that Ubuntu for the BBxM already set up networking over USB, so I just have to plug in a USB cable and configure the port on my laptop:


sudo ifconfig usb0 netmask
ssh ubuntu@

Be patient, it takes a few moments the first time. The password is temppwd


Networking using Wifi


My wifi adapter is a D-link  DWA-125. I have been able to get it to work with both WPA and WEP, without installing any additional drivers:




# sudo ifdown wlan0
# sudo iwconfig wlan0 essid 2WIRE185 key 0704575771
# sudo ifup wlan0

# sudo dhclient wlan0 -v -d 


WPA: Following these instructions:


# sudo apt-get install wpasupplicant
# wpa_passphrase monkey1 l3ctric1 > wpa.conf
# wpa_supplicant --help
# sudo wpa_supplicant -Dnl80211  -iwlan0 -c wpa.conf -B
# sudo dhclient wlan0

In both cases,  find out what IP address the beagle received


# ifconfig wlan0


and then on your laptop/computer (using the correct IP address):


ssh -l ubuntu



How to use GPIO pins on the Expansion Connector for input and output


I found a couple of helpful sets of instructions ( this and this), but they didn't work. Thanks to a reply from Igor Yeremin on the extremely helpful BeagleBoard mailing list, I learned that the default configuration hast changed:


The default mux has most pins configured in mode 0 and not GPIO mode.

You can try using one of the pins that are GPIO by default:





136-139 can also work as inputs. The tutorial doesn't do mux because the pin 168 used to be configured
as GPIO before, but has been changed to mode 0 since then.


Combining the tutorials and the answer from Igor, this works wonderfully. Here is a shell script that sets up the device and then blinks an LED attached to Expansion Connector pin 22, which is GPIO 157:


$ cat blink.sh
#! /bin/sh

echo 157 > /sys/class/gpio/export
echo  out > /sys/class/gpio/gpio157/direction

while [ "1" = "1" ]; 
echo  0 > /sys/class/gpio/gpio157/value; 
sleep 1; 
echo  1 > /sys/class/gpio/gpio157/value; 
sleep 1; 


Note that you have to run as root to do this, or make the script owned by root and set the sticky bit.


The LED is driven by a transistor used as a level shifter to get from 1.8V to 5V. An optional power transistor (logic-level MOSFET in this case) can be used to drive loads of higher current:



Here is how to use GPIO 138 as an input. I've pulled Expansion Connector pin 5 (which is GPIO 138) to 1.8V (pin 1) through a 10K resistor, and also to ground through a switch. This reads HIGH when the switch is open, and LOW when the switch is closed.


In this example, I export the GPIO pin and set the direction manually, and have scripted only reading the input. I send the input directly to the output (GPIO 157), so that the LED goes on when the switch is closed (LED logic is reversed due to the transistor):


#  echo 138 > /sys/class/gpio/export
#  echo in > /sys/class/gpio/gpio138/direction


and the script is:


  # cat digitalIn.sh

  #! /bin/sh

  while [ "1" = "1" ];
  cat  /sys/class/gpio/gpio138/value > /sys/class/gpio/gpio157/value;


Comments (0)

You don't have permission to comment on this page.