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.!topic/beagleboard/Kyq1NQOFSns Running an upgrade is optional; it will run fine without it. 

Download the latest image:

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:

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:
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

root@beaglebone:~# ntpdate -b -s -u
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

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

# Defining a default security setting
restrict mask nomodify notrap

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

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:

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.

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.

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