June 20, 2014
BeagleBone Black Rev C Setup 4GB MMC Debian - Getting Started Experience

BeagleBone Black Rev C Setup Experience

I got my new BeagleBone Black Rev C Single Board Computer in the mail via USPS today (May 21st, 2014). Not too bad. It’s all up and running and I was able to ssh into it and run my first demo app.

I had decided to get a BBB a few days ago and was disappointed when I went to order them on line they were out of stock.  They had run out of the Rev B with only 2 GB on board eMMC (embedded Multi-Media Controller) memory storage and were working on a new Rev C model with 4 GB. But I filled out the web to requesting to be informed when they were back in stock.  Here’s the email they sent me:

Adafruit Industries <support@adafruit.com>
May 18 (3 days ago)

Dear Iben Rodriguez ,

You have successfully subscribed to the Back In Stock Notification List for:

BeagleBone Black Rev C – 4GB Flash – Pre-installed Debian

We shall send you an e-mail when it is back in stock!

The very next day I was plesantly surprised to find this message sitting in my inbox:

Adafruit Industries <support@adafruit.com>
May 19 (2 days ago)

Dear Iben Rodriguez,

We have restocked a product you asked to be notified about.

Please check it out before it goes out of stock again!

————————————————–
Product Back In Stock
————————————————–
BeagleBone Black Rev C – 4GB Flash – Pre-installed Debian

Link: http://www.adafruit.com/products/1876

So I dropped everything and went on line and ordered one for me and one for the kids. The total cost with the cheapest shipping option (USPS) was $59.97 and the nice part was I was able to use PayPal. I’m glad I didn’t pay for more expensive shipping as it only took them 2 days to get it to me.

I also ordered a Half-open Frame Design Clear Case Enclosure for $7.97.Image

The mailman managed to squeeze the package into my mailbox.  Try that with a “regular” computer.

Inside was a smaller box all surrounded in bubble wrap.

It came with a 3 foot USB cable 4P(A)M to mini 5P(B)M, a getting started card, and a packing slip.

 

 


Getting Started Card

Image

Image

Image

Image


The packing slip has a quote on it:

Art is I; science is we - Claude Bernard

for support: http://www.adafruit.com/support


Initial setup

I used the USB to PC connection method.  I also plugged an Ethernet cable in and connected the BBB to my lab network. It booted up right away and got an IP address via DHCP.  They really went out of their way to make this thing easy to use.  The file system showed up in my Windows Explorer with a START.htm and a README.htm file.  Just click on those and they open up in your web browser. No network or Internet connection needed.

Image

Opening these files will give you the instructions you need to install the correct drivers for your PC’s Operating System to communicate over the USB network port.

Install the drivers for your operating system to give you network-over-USB access to your BeagleBone. Additional drivers give you serial access to your board.

Operating System
Windows (64-bit) 64-bit installer If in doubt, try the 64-bit installer first.
Windows 32-bit installer
Mac OS X NetworkSerial
Install both sets of drivers.
Linux: mkudevrule.sh
Driver installation isn’t required, but you might find a few udev rules helpful. 

putty com3 9600 baud USB to serial connection

I used windows 8.1 and after installing the drivers you can find the assigned serial communications port in your windows computer device manager. Mine showed up as COM3.

Image

Open Putty and configure a serial port session for COM3.

Image

When you initially connect you will be greeted with a banner message as follows:

Debian GNU/Linux 7 beaglebone ttyGS0

default username:password is [debian:temppwd]

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

The IP Address for usb0 is: 192.168.7.2
beaglebone login:

I logged in as root and since there’s no default password set it takes you right to the # prompt.

root
Last login: Wed Apr 23 20:20:20 UTC 2014 on ttyO0
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@beaglebone:~#

Running ifconfig and df -h show some basic system info.

root@beaglebone:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 1c:ba:8c:xx:xx:xx
inet addr:192.168.xxx.xxx Bcast:192.168.xxx.255 Mask:255.255.255.0
inet6 addr: fe80::xxxx:8cff:fea2:xxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1073 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:215972 (210.9 KiB) TX bytes:17833 (17.4 KiB)
Interrupt:40

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

usb0 Link encap:Ethernet HWaddr f6:66:fe:xx:xx:xx
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::f466:xxxx:xxxx:xxc6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2072 errors:0 dropped:0 overruns:0 frame:0
TX packets:4634 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:146703 (143.2 KiB) TX bytes:6914510 (6.5 MiB)

root@beaglebone:~#
root@beaglebone:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 3.4G 1.4G 1.9G 44% /
udev 10M 0 10M 0% /dev
tmpfs 100M 632K 99M 1% /run
/dev/disk/by-uuid/8aecba16-c811-47ee-86ed-78588c08ce2a 3.4G 1.4G 1.9G 44% /
tmpfs 249M 0 249M 0% /dev/shm
tmpfs 249M 0 249M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/mmcblk0p1 96M 72M 25M 75% /boot/uboot
/dev/mmcblk1p1 63G 5.1G 58G 9% /media/NO NAME

root@beaglebone:~#

Notice the 64 GB MicroSDXC UFD shows up as /dev/mmcblk1p1

Update the Debian Operating System with the latest patches using the Advanced Packaging Tool get command.

root@beaglebone:~# apt-get update
root@beaglebone:~# apt-get upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
base-files dpkg dpkg-dev libdpkg-perl liblcms2-2 libsmbclient libsoup-gnome2.4-1 libsoup2.4-1 libssl-dev
libssl-doc libssl1.0.0 libwbclient0 libxfont1 libxml2 libxml2-dev libxml2-utils linux-libc-dev openssl tzdata
19 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.1 MB of archives.
After this operation, 46.1 kB of additional disk space will be used.

This is super awesome!  I created a file on the local file system, pulled power, plugged it back in and after a few seconds the system was back up and my file was still there.  This is the fastest computer in the lab.


BBB Web Server

Open a web browser and connect to the USB Network Interface:

There are actually 2 different web servers running on the BBB Rev C debian OS out of the box.

  1. http://192.168.7.2:80/Support/bone101/
  2. http://192.168.7.2:8080/

The default web server running on port 80 is served from the /var/lib/cloud9 directory on the local file system:

root@beaglebone:/var/lib/cloud9# ls -al
total 636
drwxr-xr-x 13 debian debian 4096 Apr 23 20:20 .
drwxr-xr-x 41 root root 4096 Jan 1 2000 ..
drwxr-xr-x 3 debian debian 4096 Apr 23 21:01 .c9
drwxr-xr-x 8 debian debian 4096 Apr 23 21:01 .git
-rw-r–r– 1 debian debian 13 Apr 23 21:01 .gitignore
-rw-r–r– 1 debian debian 8808 Apr 23 21:01 LICENSE
-rw-r–r– 1 debian debian 471 Apr 23 21:01 README.md
drwxr-xr-x 4 debian debian 4096 Apr 23 21:01 Support
drwxr-xr-x 3 debian debian 4096 Apr 23 21:01 attic
drwxr-xr-x 2 root root 4096 Apr 23 20:20 autorun
drwxr-xr-x 2 debian debian 4096 Apr 23 21:01 demo
drwxr-xr-x 5 debian debian 4096 Apr 23 21:01 extras
-rw-r–r– 1 debian debian 562718 Apr 23 21:01 favicon.ico
drwxr-xr-x 2 debian debian 4096 Apr 23 21:01 images
-rw-r–r– 1 debian debian 2377 May 22 18:45 index.html
drwxr-xr-x 2 debian debian 4096 Apr 23 21:01 javascripts
-rw-r–r– 1 debian debian 673 Apr 23 21:01 params.json
drwxr-xr-x 5 debian debian 4096 Apr 23 21:01 static
drwxr-xr-x 2 debian debian 4096 Apr 23 21:01 stylesheets
-rw-r–r– 1 debian debian 659 Apr 23 21:01 testace.html
root@beaglebone:/var/lib/cloud9#

The alternate web server running on port 8080 is served from the /var/www/ directory on the local file system.  There are no files in this directory from the factory and directory browsing is enabled so any files you place here will be listed in the browser.

Image


There’s a link to the GITHUB bone101 Getting Started section:

https://github.com/beagleboard/bone101

bone101

Getting started information for BeagleBone and BeagleBone Black written in BoneScript

The content here is presented by the default web server running with the demonstration Linux distributions provided on BeagleBone and BeagleBone Black. It is written in HTML and makes use of the BoneScript server running on the board and BoneScript JavaScript library running in these HTML pages.

Image


Run your first program.  

I tried the demo program called “Blink an on-board LED” and just by clicking the “RUN” button in the IDE you are able to download and run the program. Super easy! I changed some of the timer numbers and ran it again.  This makes it so easy to experiment.

var b = require(‘bonescript’);
var led = “USR3″;
var state = 0;

b.pinMode(led, ‘out’);
toggleLED = function() {
state = state ? 0 : 1;
b.digitalWrite(led, state);
};

timer = setInterval(toggleLED, 1000);

stopTimer = function() {
clearInterval(timer);
};

setTimeout(stopTimer, 30000);


Splunk Forwarder on BeagleBoard Black

Download - forwarder-for-linux-arm-raspberry-pi_10.tgz – the installer from:

Installation Manual:

Installation Steps:

 

tar -xvzf forwarder-for-linux-arm-raspberry-pi_10.tgz -C /opt

root@beaglebone:/opt/splunkforwarder/bin# /opt/splunkforwarder/bin/splunk start
/opt/splunkforwarder/bin/splunkd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
/opt/splunkforwarder/bin/splunkd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory

Splunk> Finding your faults, just like mom.

Checking prerequisites…
/opt/splunkforwarder/bin/splunkd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
Checking mgmt port [8089]: /opt/splunkforwarder/bin/splunkd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
open
Creating: /opt/splunkforwarder/var/lib/splunk
Creating: /opt/splunkforwarder/var/run/splunk
Creating: /opt/splunkforwarder/var/run/splunk/appserver/i18n
Creating: /opt/splunkforwarder/var/run/splunk/appserver/modules/static/css
Creating: /opt/splunkforwarder/var/run/splunk/upload
Creating: /opt/splunkforwarder/var/spool/splunk
Creating: /opt/splunkforwarder/var/spool/dirmoncache
Creating: /opt/splunkforwarder/var/lib/splunk/authDb
Creating: /opt/splunkforwarder/var/lib/splunk/hashDb
/opt/splunkforwarder/bin/splunkd: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
SSL certificate generation failed.

root@beaglebone:~# ls -al /opt/splunkforwarder/lib
total 5468
drwxr-xr-x 3 root root 4096 Sep 28 2013 .
drwxr-xr-x 9 root root 4096 May 23 04:29 ..
-r–r–r– 1 root root 57 Sep 27 2013 copyright.txt
drwxr-xr-x 2 root root 4096 Sep 28 2013 engines
lrwxrwxrwx 1 root root 20 Sep 27 2013 libarchive.so -> libarchive.so.13.1.2
lrwxrwxrwx 1 root root 20 Sep 27 2013 libarchive.so.13 -> libarchive.so.13.1.2
-r-xr-xr-x 1 root root 511016 Sep 28 2013 libarchive.so.13.1.2
lrwxrwxrwx 1 root root 15 Sep 27 2013 libbz2.so -> libbz2.so.1.0.3
lrwxrwxrwx 1 root root 15 Sep 27 2013 libbz2.so.1 -> libbz2.so.1.0.3
-r-xr-xr-x 1 root root 71020 Sep 28 2013 libbz2.so.1.0.3
lrwxrwxrwx 1 root root 18 Sep 27 2013 libcrypto.so -> libcrypto.so.1.0.0
-r-xr-xr-x 1 root root 1476588 Sep 28 2013 libcrypto.so.1.0.0
lrwxrwxrwx 1 root root 18 Sep 27 2013 libexslt.so -> libexslt.so.0.8.17
lrwxrwxrwx 1 root root 18 Sep 27 2013 libexslt.so.0 -> libexslt.so.0.8.17
-r-xr-xr-x 1 root root 97796 Sep 28 2013 libexslt.so.0.8.17
lrwxrwxrwx 1 root root 16 Sep 27 2013 libpcre.so -> libpcre.so.1.2.1
lrwxrwxrwx 1 root root 16 Sep 27 2013 libpcre.so.1 -> libpcre.so.1.2.1
-r-xr-xr-x 1 root root 244172 Sep 28 2013 libpcre.so.1.2.1
lrwxrwxrwx 1 root root 19 Sep 27 2013 libsqlite3.so -> libsqlite3.so.0.8.6
lrwxrwxrwx 1 root root 19 Sep 27 2013 libsqlite3.so.0 -> libsqlite3.so.0.8.6
-r-xr-xr-x 1 root root 575376 Sep 28 2013 libsqlite3.so.0.8.6
lrwxrwxrwx 1 root root 15 Sep 27 2013 libssl.so -> libssl.so.1.0.0
-r-xr-xr-x 1 root root 336464 Sep 28 2013 libssl.so.1.0.0
lrwxrwxrwx 1 root root 16 Sep 27 2013 libxml2.so -> libxml2.so.2.9.1
lrwxrwxrwx 1 root root 16 Sep 27 2013 libxml2.so.2 -> libxml2.so.2.9.1
-r-xr-xr-x 1 root root 1832152 Sep 28 2013 libxml2.so.2.9.1
lrwxrwxrwx 1 root root 17 Sep 27 2013 libxslt.so -> libxslt.so.1.1.28
lrwxrwxrwx 1 root root 17 Sep 27 2013 libxslt.so.1 -> libxslt.so.1.1.28
-r-xr-xr-x 1 root root 323324 Sep 28 2013 libxslt.so.1.1.28
lrwxrwxrwx 1 root root 13 Sep 27 2013 libz.so -> libz.so.1.2.8
lrwxrwxrwx 1 root root 13 Sep 27 2013 libz.so.1 -> libz.so.1.2.8
-r-xr-xr-x 1 root root 94648 Sep 28 2013 libz.so.1.2.8
root@beaglebone:~#

root@beaglebone:~# /opt/splunkforwarder/bin/splunk cmd $(which env) | grep -i splunk

PATH=/opt/splunkforwarder/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_=/opt/splunkforwarder/bin/splunk
SPLUNK_HOME=/opt/splunkforwarder
SPLUNK_DB=/opt/splunkforwarder/var/lib/splunk
SPLUNK_SERVER_NAME=splunkforwarder
SPLUNK_WEB_NAME=splunkweb
LD_LIBRARY_PATH=/opt/splunkforwarder/lib
OPENSSL_CONF=/opt/splunkforwarder/openssl/openssl.cnf
LDAPCONF=/opt/splunkforwarder/etc/openldap/ldap.conf
root@beaglebone:~# /opt/splunkforwarder/bin/splunk cmd $(which ldd) /opt/splunkforwarder/bin/splunkd
librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0xb6f68000)
libpcre.so.1 => /opt/splunkforwarder/lib/libpcre.so.1 (0xb6f2a000)
libxml2.so.2 => /opt/splunkforwarder/lib/libxml2.so.2 (0xb6d69000)
libxslt.so.1 => /opt/splunkforwarder/lib/libxslt.so.1 (0xb6d1a000)
libssl.so.1.0.0 => /opt/splunkforwarder/lib/libssl.so.1.0.0 (0xb6cc8000)
libcrypto.so.1.0.0 => /opt/splunkforwarder/lib/libcrypto.so.1.0.0 (0xb6b5c000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6b50000)
libarchive.so.13 => /opt/splunkforwarder/lib/libarchive.so.13 (0xb6ad2000)
libbz2.so.1 => /opt/splunkforwarder/lib/libbz2.so.1 (0xb6ac0000)
libsqlite3.so.0 => /opt/splunkforwarder/lib/libsqlite3.so.0 (0xb6a33000)
libz.so.1 => /opt/splunkforwarder/lib/libz.so.1 (0xb6a1b000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb69af000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6994000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb68af000)
/lib/ld-linux.so.3 => /lib/ld-linux-armhf.so.3 (0xb6f85000)
root@beaglebone:~#


 

Next we’ll try out version control with GIT and the Cloud9 IDE