Getting Started

[—ATOC—]
[—TAG:h1,h2—]

Windows

Serial Console

Using the serial console is useful if you cannot ssh into the beaglebone for some reason (perhaps you’re on a company network and cannot connect it, or similar!)

Setting up for using the serial console is easy enough. You need a terminal program, even hyperterminal will do here. It’s what I’ll use here.

You can also get information from the BeagleBone Getting Started page too.

Download the serial FTDI driver for the BeagleBone board: W32 W64

Run the driver installer before plugging the BeagleBone in to the computer so the drivers are installed and ready for Windows to use. Next, connect the BeagleBone using the supplied USB cable. The BeagleBone can be powered across the USB cable, so there’s no need to use an external PSU.

After a fair bit os USB activity and LED flashing, Windows should inform you that your new hardware is ready to use. It might say you need to restart the computer to finish the install process. In this guide I didn’t bother re-starting. On the BeagleBone you should have the power LED lit, and User LED 0 should be flashing as a heartbeat for the BeagleBone.

Open Control Panel -> System -> Hardware -> Device Manager. Expand the Ports (COM & LPT) section. Take note of the USB Serial Port number of the BeagleBone (You may not be able to determine which one is the BeagleBone so I suggest you just leave this Window open for the next part)

We’ll be using PuTTY for a terminal because it’s a lot more stable. Try doing the rest of this page in PuTTY, and then repeating it with hyperterminal! Good luck editing text with nano in Hyperterminal! lol

So download PuTTY (putty.exe) and run it.

From the options on the left selection Connection->Serial, and then fill in the options to connect to the BeagleBone COM port (you might have to try a few different port numbers to find out which one is the BeagleBone!), and set the COM port settings to 115200,8,N,1 with Flow control set to None.

Select Session from the Category list on the left hand side. Select the Serial Connection type and you will see the settings above the radio box change to give you the COM port number you just setup. Now it’s worth saving the session so that these settings are remembered for the next time you start PuTTY. Simply type a name into the text box under Saved Sessions and click Save.

Click Open. Click in the PuTTY terminal window and press enter to bring up the Login screen. Login using username root. There is no password. You then have a linux terminal to use. If you’re not familiar with Linux, it’d be best to go away now and learn about Linux on a desktop PC and then start getting to grips with embedded linux. As you’re learning Linux, get yourself familiar with character file drivers.

Coding

Let’s do some coding straight away. The Angstrom Linux install that comes pre-loaded on the SD card with the BeagleBone includes GCC, so we can start coding in c straight away.

Write a simple hello world app in c using nano. Type:

[code]nano ./hello_world.c[/code]

Type in the simple program:

[code]
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Hello World!\n");
return 0;
}
[/code]

Press Ctrl+X to quit, and press Y to save the file. Check that the file is correct by typing

[code]cat ./hello_world.c[/code]

then compile:

[code]gcc -Wall hello_world.c -o hello_world[/code]

Then run the output:

[code]./hello_world[/code]

and hey presto

Transferring files between PC and BeagleBone

The easiest way when using the serial console connection is to make use of the USB Mass Storage Gadget that the default Angstrom BeagleBone distribution runs when it is plugged into the PC.

You can easily copy files across using explorer in Windows. In order to get access to the files on the BeagleBone we need to mount the Fat32 parition on the SD card which is what we’re accessing on the PC. This is not automatically mounted. It is very easy for us to mount, just type:

[code]mount /dev/mmcblk0p1 /media/card[/code]

The first partition of the card is now mounted on /media/card and you can navigate there just like any other system directory and copy or work with the files.

Now you can move on to User LED control

Leave a Reply