Blogs,
Electronics and
Robotics Club
IIT Bombay

Our Events About Us
Blogs


title = beaglebone heading = Getting Started with Beaglebone Black subheading = Simple tutorial on using the BBB. category = Tutorials tags = Programming, Development, Tutorial author = Dhruv Ilesh Shah date = April 26, 2016 //(DO NOT REMOVE THESE LINES) //(WRITE YOUR BLOG BELOW FROM LINE 12)

You will need - A BeagleBone Black AM335x (an older version should also do.), a PC (I have used a Linux distribution), Ethernet Cables and Ports and lots of patience. The BeagleBone Black The BeagleBone Black is an embedded development board, just like the Raspberry Pi, Intel Galileo etc. It offers several advantages over the others in the category, and also has its own demerits. We’ll get to that in the end.
For the specs, the BBB has a 1Ghz ARM Cortex-A8 and 512MB of DDR3 RAM on board - almost as capable as a medium range smartphone. It houses an on-board 8-bit 4GB flash memory which comes preloaded with the Angstrom. It has a total of 92 pins, of which 66 can be used as GPIO pins. For more specification, you may refer here.

Getting Started

The BeagleBone is amazingly simple to start off with, and is indeed the most convenient of any embedded board, since it comes with a preloaded OS. There are multiple ways to access the BBB from your system, each of which will be described briefly.

Connect the BBB via the USB cable provided in the box. The BBB can be directly accessed using the web browser, and programs can be executed using Bonescript, which is similar to JS. By default, your BBB comes with it’s IP address on usb0 port as 192.168.7.2. Enter this in your browser, and you are good to go. You can access the GPIO, and run programs with the BBB as your microcontroller, just like you run scripts in Arduino. A sample of the available functions can be seen here.

For accessing the real capabilities of the board as a computer in itself, you will need to do a little more, but fear not! Plug in the BBB using the USB cable, and go to your terminal (Windows users may have to use PuTTY) and type:

ssh yourIP -l root //or
ssh root@yourIP
//You may have to use sudo, if permissions are an issue.

This will enable you to use the BBB as the root user. You will notice that the files and structure of the memory is similar to any other Linux distro. The BBB is your very own credit-card sized computer!

Now that you have entered the system, there exist no bounds to what can be done. Some packages as pre-installed, like Python, and can be used directly. Have fun tinkering with your cute little pup. To burn bonescripts, the browser sure is a cool bet!

Using the BeagleBone Black remotely

You have used the BBB by connecting it to your PC, but what if you want it to act independently, or on the network? There must be a way to access the board via a network, and not just USB. Turns out, there is - and much simpler than the R-Pi in this case! Here’s what you must do:

sudo vi /etc/network/interfaces //or
sudo nano /etc/network/interfaces
//sudo would be used if the user is not root.
 iface usb0 inet static
     address 192.168.7.2
     netmask 255.255.255.0
     network 192.168.7.0

This defines the action performed when the BBB is connected via USB. (Note usb0) You can choose to keep this or comment it out depending on usage. Now, let’s go on with the task of setting it up remotely.

cd /etc/network
cp interfaces interfaces.backup
vi interfaces
//The file opens up. Now, we must edit it.
//Add the following lines in it.NOTE, add values according to your ethernet/router settings. These are the ones appropriate for me.
iface eth0 inet static
       address 10.173.24.69
       netmask 255.255.255.0
       gateway 10.173.24.250
       dns-nameservers 10.200.1.11
       dns-nameservers 10.200.11.1

sudo ssh root@10.173.24.69
//basic syntax is 'sudo ssh user@yourIP'

This would take a while, but is sure to get you into the BBB considering that your Bone and laptop are both connected and active. You can control and run the BBB remotely, and also share/install packages over the network.

Now that you have connected to the Bone directly and remotely, you can do almost anything with the Processor. Tried and tested ideas include using the remote computer to run as a portable unit running heavy Mathematica/MATLAB scripts, or Python codes, or even a host/router. And with 66 GPIO pins, Electronics Projects would surely be cooler, and cleaner! :)

Merits & Demerits

Hope you have a good time tinkering around with the BeagleBone Black.

Cheers.

Contact Us

Tinkerers' Laboratory

erciitbombay@gmail.com