BeagleBone Black Note
Save potential development time (Python)
Some tasks are just too awkward for 8-bit AVR (SD card, Ethernet, USB host...)
Ethernet over USB
Internal USB-serial converter (ttyO0, over USB, appears as "Gadget Serial" on Windows 7)
External USB-serial converter (dedicated 6-pin header on BBB)
Changes made by route or ifconfig won't stick after reboot because the BBB Angstrom uses connman (Connection Manager, "con man" HAHA). It rewrites the routing table after reset for example.
1. Call get-services in /usr/lib/connman/test
2. Find out the name tag for your Ethernet interface ("ethernet_blah blah blah_cable")
./set-nameservers ethernet_????????_cable 184.108.40.206 220.127.116.11
./set-ipv4-method ethernet_????????_cable manual 192.168.3.2 255.255.255.0 192.168.3.1
(optional but nice)
Share your laptop's internet with the BBB: Windows 7 Shared Connection
share with either the Ethernet over USB or Ethernet (I prefer the latter as it's more reliable).
BBB has no battery-powered RTC
after you have internet access
/usr/bin/ntpdate -b -s -u pool.ntp.org
Boot from microSD
To boot from microSD instead of the internal eMMC with older images, the "boot" button need to be held down during power up. I got my BBB in April 2014, and it boots into the microSD automatically even if I don't press the "boot" button. The bootloader attempts to boot from uSD first before resorting to eMMC.
I wonder if I could reuse the "boot" button in run time.
opkg install python-pip python-setuptools python-smbus
pip install Adafruit_BBIO
python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO"
pip install pyserial
Now to blink an external LED:
import Adafruit_BBIO.GPIO as GPIO
t = 0.5
print 'user interrupted'
My "GPS mouse" (often named "BU-353") works out of the box since it has a PL-2303 and is recognized by Linux.
BMP180 Pressure Sensor
Barometric pressure and temperature
I2C pins - confusion
The correct pins are in the "NAME" column, NOT the "MODE2" column. Wasted me over an hour of debugging.
This is a very useful command:
i2cdetect -y -r 1
Log I2C Sensor on Power Up
first make your script executable by
chmod +x haha.py
then to edit the crontab file,
env EDITOR=nano crontab -e
"env EDITOR=nano" make sure the nano editor is used. I don't know how to use vim.
then add this line:
@reboot /usr/bin/python /home/root/haha.py
to verify the task, do this
you should see your task there.
Now just reboot and enjoy.
Resizing the Root Partition on a uSD Card
Several sources point to the same technique, but the method bricks the BBB (the uSD card) if run on Angstrom. Works fine on Debian though.
All Rights Reserved. Stanley Lio, 2014