Saturday, December 7, 2013

BBB: Getting Setup, Updating, NTP, WiFi

This post comes after having a few issues and deciding to redo my BeagleBone Black.Unlike the Raspberry Pi, there are few things you need to do, like loading the latest image, WiFi, and NTP.

Your Beaglebone Black may not come with the latest image but after flashing there are still updates by running the opkg update and opkg upgrade. This takes a long time to run. Once complete, the SSH session will be disconnected and you can power cycle. If you have connection errors it's a problem with DNS and you can add the feed URL to the hosts files. https://groups.google.com/forum/#!topic/beagleboard/Kyq1NQOFSns Running an upgrade is optional; it will run fine without it. 

Download the latest image:
http://downloads.angstrom-distribution.org/demo/beaglebone/

Download the one with BBB-eMMC-flash-XXX.img.xz



I used 7zip to extract the file to a .img file that can be flashed with win32diskimager. This is the same program I use to write SD card images for the Raspberry Pi as well as backup.

Download here:http://sourceforge.net/projects/win32diskimager/

Select the image making sure you select the right drive letter for your SD Card. Otherwise you can loose your data. Click write.




NTP: (Credit: http://derekmolloy.ie/automatically-setting-the-beaglebone-black-time-using-ntp/)
Out of the box the Beaglebone Black doesn't set the time, odd I know. So we need to setup NTP and have it auto sync.

First lets get the time set manually:

root@beaglebone:~# ntpdate -b -s -u pool.ntp.org


root@beaglebone:~# ntpdate -b -s -u pool.ntp.org
root@beaglebone:~# opkg update (for good measure)
root@beaglebone:~# opkg install ntp

Then edit the ntp.conf found in /etc

root@beaglebone:~# nano /etc/ntp.conf

Here is the config I used but you should find the servers for your area. I decided to omit the logging option. Also, set the restrict IP for your network if you want to use that option.

# This is the most basic ntp configuration file
# The driftfile must remain in a place specific to this
# machine - it records the machine specific clock error

driftfile /etc/ntp.drift

# NTP Servers for Ireland from www.pool.ntp.org
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org

# Using local hardware clock as fallback
# Disable this when using ntpd -q -g -x as ntpdate or it will sync to
itself
# server 127.127.1.0
# fudge 127.127.1.0 stratum 14

# Defining a default security setting
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap


Using the above link you can set the timezone if you want, otherwise it is UTC.

WiFi
The most common and easily supported WiFi is any USB adapter with the RT81XXcu chipset. There is just a few things that need to be configured to get it working. One thing I noticed is if the Ethernet is plugged in, the WiFi interface will not acquire an IP on bootup.

This maybe different if you are using the stock Angstrom image. I had to compile Angstrom from source since I need Yocto 1.4 (for some ROS packages to compile) which lead me to have to compile the RTL8192cu driver from source as well but on the Beaglebone instead of being able to cross compile.

Here a list of the sites that can help either way. For the usual setup this site should get you running:

http://nordicgroup.us/bbb/wireless/

It is just a matter of coping the firmware bin files to the right place.

In my case, these are the two sites I used.

http://www.codealpha.net/864/how-to-set-up-a-rtl8192cu-on-the-beaglebone-black-bbb/

This one goes over cross compiling but I think this didn't work because of the kernel versions. So using the above link, I got it working by compiling directly on the BBB. Takes about 14% of space but since I did a base install I am only using 44% after loading the kernel headers.

http://bonenotes.tumblr.com/

Out of the box, the BBB is easy to use until you start messing with Linux. It seemed like I had less problems with the Raspberry Pi but on the other hand I am trying to do a lot more.

Post any comments if this worked for you or if you need any additional help.

Now back to playing with ROS...

No comments:

Post a Comment