Beaglebone Black Setup

Posted by admin on Mar 7, 2015


bbb_setup_post_image.jpg

Overview:

In this guide we will download, extract, and copy the latest Beaglebone Debian image to a micro SD card before flashing it to the BBB. We will then use PuTTY to connect, login, and run commands. This guide and others on this site will often abbreviate 'Beaglebone Black' as 'BBB'.

You will need... 

Hardware:

Beaglebone Black (I'm using the Beaglebone Black Rev C from Element14)
USB to MicroUSB cable (supplied with BBB)
MicroSD Card (no smaller than 4GB) - If you are buying an SD card for using with your BBB it's worth getting a class 10 card for the little bit of extra cost.
MicroSD Card reader - I've been using a cheap generic USB card adapter.
5v power adapter for Beaglebone Black - The BBB can be powered from the supplied usb cable but it is not recommended for flashing as any power interruptions will likely disrupt the flashing process.

Software: 

7zip (compression/extraction software) - for extracting the image file.
Win32DiskImager (imaging utility) - for imaging to SD card.
PuTTY (SSH client for Windows) - for communicating with the BBB.

1. Get Latest BBB Image

Download the latest Debian image (BeagleBone, BeagleBone Black - 4GB SD) from the BeagleBoard.org website here: http://beagleboard.org/latest-images
This image comes as a .img.xz so we will need to extract the .img from this file with 7-zip.
Install 7-zip (link in overview notes or the Neon Swamp 'Resources' page)
Right click the downloaded .img.xz file then select 7-zip and extract the .img file. We now need to image this new .img file to our SD card. 

2. Imaging the SD Card

Install Win32DiskImager and open up the software. You should see this screen:

win32diskimager_01.gif


Under 'Image File' browse to the image file that you have just downloaded. Under 'Device' use the drop-down box to select your card reader containing the microSD card that you wish to image (!Important! - This will erase the contents of the drive so make sure you are selecting the correct device)
Make sure the image and device selected are correct and then click the 'Write' button. (You may get an error about writing to SD cards but you can ignore this) The process may take a while.
When the process is complete close Win32DiskImager and safely eject the sd card / reader from the pc.

3. Flashing BBB from the SD Card

Make sure the Beagle is powered off and insert the microSD card (gold strips face away from the board).
There are three tiny buttons on the board itself and the button nearest the micro SD card slot is for flashing the BBB from the SD card (green ring in the picture below).

bbb_sdflash_button.jpg

Keep this button held down then connect the 5v power supply. The power led should come on and the action lights should start flashing. Let go of the button and leave the BBB to continue flashing from the card.
Leave this to run until the 4 action lights turn off to signal the process is complete.

4. Connecting BBB to PC

When the flashing process has finished and the lights are off, remove the power and then remove the micro SD card. Connect your beagle to your PC with the USB cable and wait for the device to power up.
You should get a new storage device show up under my computer in windows explorer called something like 'BeagleBone Getting Started'. This is your Beaglebone Black's storage. Open this and you should see some useful directories and files to help you get started with your BBB.

5. Installing Device Drivers

First we will need to install the BBB's device drivers for our machine. Open the directory 'Drivers' and select your machine folder, in our case 'Windows'. Run the installer for your version of windows.
You will probably get a couple of message boxes about Windows not being able to verify the publisher of the drivers but this is fine, just click 'Install this driver software anyway' and continue the drivers installation.

6. Test connection to your BBB

Open your web browser on your PC and enter this IP address into the browser's address bar:

192.168.7.2
(This is the IP address for your BBB)

You should see a web page that is served from your BBB. There's lots of info on this page about the BBB community and some links to the other tools that come with the downloaded Beaglebone image but I will not cover these in this guide.
Now we have tested that the imaging process was successful we can connect to our BBB and start sending commands.

7. Connecting to Beaglebone Black using PuTTY

Install PuTTY to your Windows machine and run it. You should see a screen like this:

putty_01.gif


As in the image above, under 'Host Name (or IP address)' enter the Beaglebones IP address '192.168.7.2' and under 'Port' enter '22' (if it's not already there) then make sure the 'SSH' radio button is selected.
We can now click enter a 'Saved Sessions' name like 'Beaglebone', then click the 'Save' button to keep this settings for next time.
With these settings loaded we can click 'Open' at the bottom of the screen to open a connection to our BBB.

8. Logging in

After PuTTY has opened the terminal window you should now be required to login.
Login as root by entering 'root' and hitting enter.
You should now get a screen that looks something like this with a command line that allows you to run commands on the BBB:

cmdline_01.gif

9. Simple Commands & Shutdown

Here are some commands to display info about your Beaglebone Black system:

System info (Kernel version etc)

	<span style="color: rgb(127, 127, 127);"><span>uname -a</span></span>

Distribution info (release, description)

	lsb_release -a

Show system time & date 

	date <br>

The time and date will probably be wrong but we can get the current time and date from the internet (ethernet must be connected before power up) by entering the following command:

	sudo ntpdate pool.ntp.org<br>

When you are finished you need to be able to shutdown the BBB safely. This can be done by entering the command:

	shutdown -h now

In this shutdown command '-h' is for halt and 'now' is when you would like this to happen.
This will tell the BBB to begin shutting down the system. You will get a message from PuTTY that the connection was lost and then after a few seconds the lights and power should go off on the BBB.

We can use a similar command to restart the system:

	shutdown -r now

That's it for this guide. Hopefully this has got you started on using the Beaglebone Black without any issues.
Please check out future posts coming soon for guides to using and setting up other features on Beaglebone Black.


Loading Conversation