Things you will need in this setup:
BeagleBoard xM
5V Power Supply - connected to BB
USB Keyboard (you dont need a mouse right away but will eventually if you install GUI)
4GB or large microSD card
Ethernet cable and connection to network
Serial to USB cable connecting BB to source computer
So here is the lowdown on running the latest version of Ubuntu, Quantal Quetzal, or at least a minimal version, on a BeagleBoard xM. The starting point is here:
http://elinux.org/BeagleBoardUbuntu#Quantal_12.10_armhf
Now there are some guidelines for what I am about to share that I can only claim success with. I am working on a Linux system, Mint - which uses Ubuntu under the hood, and Debian by extension. If you are using another OS or even version of Linux you will have to know enough about your system (or use google) to translate.
First thing to do is grab yourself a microSD card and get it formatted. On my system I like using the GUI Disk Utility since its a little faster than command line. So find your card under the "Generic-SD/MMC" heading. You should see a window something like this:
If the SD card is mounted the first thing you need to do is unmount it - in Disk Utility you just highlight the Volumes bar and click "Unmount Volume" under it. If the SD has multiple partitions you need to make sure all of them are unmounted. Once that is done you want to use the "Format Drive" command. (NOT the "Format Volume") The default is type is "Master Boot Record" and that is perfect. So when the format is complete you do not need to remount the volume for this process to work. You do need to make note of the path to the SD card, in my case is "dev/sdg1" It should always be sd something but take care to note the proper path, more on that in a minute.
Now the instructions on the webpage will suffice for some but I am going to try and condense it down a bit for everyone.
First start up your favorite Terminal application and change directories to "Downloads" (If you want to work from another directory, fine but I like keeping downloads in ... Downloads...)
cd Downloads
Now get the archive that contains the operating system with the command
wget http://rcn-ee.net/deb/rootfs/quantal/ubuntu-12.10-r1-minimal-armhf-2012-10-19.tar.xz
It will take a few minutes to download and when it is done we verify the checksum with the command
md5sum ubuntu-12.10-r1-minimal-armhf-2012-10-19.tar.xz
The response should look like this
31be6761a37af98906c5c1e892601e85 ubuntu-12.10-r1-minimal-armhf-2012-10-19.tar.xz
Now we unpack the archive in place
tar xJf ubuntu-12.10-r1-minimal-armhf-2012-10-19.tar.xz
When that is done change directories into the archive folder using this command
cd ubuntu-12.10-r1-minimal-armhf-2012-10-19
Now remember how you were supposed to note the drive assigned to your SD card? This is really important, and let me tell you why. You are about to use a script, included in the archive, to format the SD card and copy things over into the proper locations. If you choose the wrong drive there is a really good chance that you will end up nuking the drive you selected and that could be the one with your operating system on it. The result will be you will destroy your OS and most likely the data on the drive and the changes will be irreversible - welcome to the command line. MAKE SURE YOU HAVE THE RIGHT DRIVE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Now a quick check of the web page will show there are a number of options for this next command that will result in builds for a number of boards but here we are working with the BeagleBoard xM, right? This command also has to be issued with super user (sudo) capabilities so make sure you are a sudo user.
sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle_xm
NOTE - REPLACE "/dev/sdX" with the path to your SC card. In my case it would be "/dev/sdg1" Get this wrong and the mayhem will begin. You will be prompted with something like this
I see...
fdisk -l:
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
Disk /dev/sdb: 128.0 GB, 128035676160 bytes
Disk /dev/sdc: 808.9 GB, 808888614912 bytes
Disk /dev/sdd: 32.0 GB, 32017047552 bytes
Disk /dev/sdg: 16.0 GB, 15970861056 bytes
mount:
/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
Are you 100% sure, on selecting [/dev/sdg] (y/n)?
If you have the right drive - well hit "y" and the script will work its magic. Now in my system I get a couple of popup errors akin to "Cant read - not a folder". I get two of them, just hit OK and move on. They do not seem to have a negative effect on the process.
When your SD card is done (the command prompt returns), and it might take 10 minutes or so, eject the card and pop it into your BeagleBoard.
BEFORE applying power, connect your Serial to USB cable up to your system and run the command
ls /dev/tty*
What should appear is a list of all of the tty devices available on your system. Most likely the one we need will be "/dev/ttyUSB0". Now we are going to start up the screen application from the command line so use
sudo screen /dev/ttyUSB0 115200
Translation - start up screen to listen to our Serial to USB connection at 115200K Baud, which is the default for most BeagleBoard serial connections. Since you have not started the BB yet, the terminal window will just clear out and show nothing. Plug in the power and wait for the magic...
Well you shouldnt have to wait long. Within a few milliseconds the board should begin the boot process and you will see all the kernel traffic and eventually reach the part where it asks you to login. For this image the temp username and password are "ubuntu" and "temppwd" - but there is a little problem. This particular user does not have "sudo" access (or at least mine didnt) so... you now have to live a little dangerously (again but you have made it this far without melting down so what the hell). Do what everyone says not to - login as "root". The password is also "root".
Now you need to set up your network, which is not handled automatically. If you type in the command (which normally requires "sudo" but you are the big Kahuna here so its not needed for any of these commands - just remember to BE CAREFUL)
ifconfig
you will see a list of your network devices. We are looking for the one "eth0". If that one is not on the list, make sure your ethernet cable is plugged in. Now just type into the terminal
dhclient eth0
And this should set up your ethernet connection, assuming your router is setup to issue DHCP. If not, you are gonna have to find out how things work somewhere other than this blog.
ALMOST DONE!
So now you need to create a user account for yourself so type
adduser [your clever username here]
and you will be prompted to enter a password (twice) and some info (that you can ignore)
Now lets make sure you are a sudo user by adding your new user to the "sudoers" file with the command
visudo
What this actually does is invoke the "vi" text editor on the "sudoers" file. You have to use the arrow keys to scroll down to the line that looks like this
root ALL=(ALL:ALL) ALL
and underneath it add
[username] ALL=(ALL:ALL) ALL
(see the pattern here?)
Now type Control-X - it will ask you if you want to save
Type Shift-Y - you say yes, and it asks about the file name
Dont change file name - Type Enter
You should return to the command prompt. Now the last command is....
exit
Now login with your new user name and password. If everything went OK the simple way to check is this... type the command
sudo apt-get update
So this does two things. If your "sudoers" edit worked, then after entering your password you should not get something like "you do are not a sudoer, this attempt will be reported" or some such. If your network is setup correctly you should see a whole bunch of calls to network sites that contain the update files for your system. If you see errors like "could not resolve host" etc then your network is not working, so try that again.
And breathe.... (sorry this is long-winded but I needed to get this all in) And remember, if you muck it all up, you havent bricked your board. Just start over, format the SD.... blah, blah...
Next post will be about some tweaks you can make, including installing a desktop, setting up for a camera, wireless networking and getting your monitor looking its best.
So this is a document that will chronicle my attempt to build a home made, autonomous robot and anything else I find cool along the way.
Tuesday, November 13, 2012
Monday, November 12, 2012
BeagleBoard xM and Ubuntu Quantal Quetzal
So for all you Linux geeks I am sure you are aware that Ubuntu has released the newest update to their operating system titled, Quantal Quetzal. Well some enterprising folks have already ported it to the BeagleBoard xM (armhf) and I got it working this weekend. Tomorrow I will post what I did, what I learned and why I am really happy with the early results. Here are the instructions if anyone wants to get a head-start.
http://elinux.org/BeagleBoardUbuntu
http://elinux.org/BeagleBoardUbuntu
BeagleBoard xM rev C Enclosure
So I promised a while back to post the drawings that anyone could use to create a simple enclosure for your BeagleBoard xM. I only have a rev C board so I can only vouch for the dimensions of that particular board. The image is a full size TIFF so you should be able to download it and and send it off to get cut.
For mine I used the folks at Pololu Robotics who have a great service, decent price and low minimum. In fact, these parts were so cheap, in clear, that I ended up getting three cut to make the $25 order minimum. Get together with someone else and have a bunch made! (you obviously need two here...) They also have black and will special order colors, or send them your own.
http://www.pololu.com/catalog/product/749
You also need some simple parts to put the whole thing together. First are some standoffs. The holes in the board are sized for 4-40 screws so I used M/F Aluminum Standoffs with 4-40 threads. Mouser web pages are as follows:
http://www.mouser.com/Search/ProductDetail.aspx?R=8401virtualkey53400000virtualkey534-8401
http://www.mouser.com/Search/ProductDetail.aspx?R=8405virtualkey53400000virtualkey534-8405
You will also need some 4-40 screws either 3/8" or 1/2" in length and some 4-40 washers. I used hex head screws but head type is not important.
If you tap the bottom plate for UNC 4-40 (the holes are sized for this) and the short standoffs screw right in. The holes in the top plate need enlarging to 0.125" (1/8") which takes just seconds with a hand drill. The tall standoffs go on top of the board and the screws just hold the top plate on. I added some small rubber feet to keep the whole thing from slipping around on the desk.
And as a last little bit, I also created a power cord with a right angle adapter (which also works for Arduino and Digilent ChipKit boards). It is Mouse part
http://www.mouser.com/Search/ProductDetail.aspx?R=4840.5201virtualkey69300000virtualkey693-4840.5201
And this is a fairly nice USB to Serial cable that I found. Not the cheapest but really reliable and I have had no trouble with this adapter and it works on Linux, Windows 7 and Mac OSX.
http://www.mouser.com/Search/ProductDetail.aspx?R=SS-USB-100virtualkey62330000virtualkey600-SS-USB-100
Hope this gets everyone going that wants one. Feel free to email if you have questions or comments.
For mine I used the folks at Pololu Robotics who have a great service, decent price and low minimum. In fact, these parts were so cheap, in clear, that I ended up getting three cut to make the $25 order minimum. Get together with someone else and have a bunch made! (you obviously need two here...) They also have black and will special order colors, or send them your own.
http://www.pololu.com/catalog/product/749
You also need some simple parts to put the whole thing together. First are some standoffs. The holes in the board are sized for 4-40 screws so I used M/F Aluminum Standoffs with 4-40 threads. Mouser web pages are as follows:
http://www.mouser.com/Search/ProductDetail.aspx?R=8401virtualkey53400000virtualkey534-8401
http://www.mouser.com/Search/ProductDetail.aspx?R=8405virtualkey53400000virtualkey534-8405
You will also need some 4-40 screws either 3/8" or 1/2" in length and some 4-40 washers. I used hex head screws but head type is not important.
If you tap the bottom plate for UNC 4-40 (the holes are sized for this) and the short standoffs screw right in. The holes in the top plate need enlarging to 0.125" (1/8") which takes just seconds with a hand drill. The tall standoffs go on top of the board and the screws just hold the top plate on. I added some small rubber feet to keep the whole thing from slipping around on the desk.
And as a last little bit, I also created a power cord with a right angle adapter (which also works for Arduino and Digilent ChipKit boards). It is Mouse part
http://www.mouser.com/Search/ProductDetail.aspx?R=4840.5201virtualkey69300000virtualkey693-4840.5201
And this is a fairly nice USB to Serial cable that I found. Not the cheapest but really reliable and I have had no trouble with this adapter and it works on Linux, Windows 7 and Mac OSX.
http://www.mouser.com/Search/ProductDetail.aspx?R=SS-USB-100virtualkey62330000virtualkey600-SS-USB-100
Hope this gets everyone going that wants one. Feel free to email if you have questions or comments.
Sunday, November 11, 2012
Raspberry Pi and Debian Wheezy
So I started working with a BeagleBoard xM rev C and was interrupted by a chance to get one of the new Raspberry Pi 512 versions. I was really excited to hook it up and get things going but there were problems.
First problem was the SD card with the pre-loaded Debian image that I got from Newark14 (where I bought the board)
http://www.element14.com/community/groups/raspberry-pi
On startup the board, when connected via Serial, just output "60" and nothing else. I headed over to the Raspberry Pi page and followed the instructions there and managed to create a new SD with Debian "Wheezy" and get it booted. The image is more commonly known as "Raspbian" and the home page is here
http://www.raspbian.org/
Well after a few minutes it became obvious there was a problem. I was using a Logitech keyboard and laser mouse and the mouse started causing kernel panic messages about disconnects and reconnects. After searching around the consensus was that there was a power issue.
The Raspberry Pi site states all USB devices should be rated 100mA or less for proper operation. I checked both keyboard and mouse and they were both rated 100mA. I then tried a different micro-USB power cord and still the panic messages continued. My final step was hacking a micro-USB cord and attaching it to my BK Precision BK1621A power supply. This supply is capable of 18V@5A and displays current during use. The board was using less than .5A the entire time and I got really frustrated with the forum that helped NONE and the sad state of info available. I just stuck the Pi on a shelf and started with other projects.
Well a couple of weeks pass by and I loaded the same version of Debian into the BeagleBoard and guess what? The SAME kernel panic messages appeared. I have used multiple distributions with the BeagleBoard and all have worked perfectly. My take? There is a problem with the mouse driver in the Debian Wheezy distribution that is caused not by power issues, but the driver and mouse.
For info, the particular mouse I was using was the Logitech M-0026 Laser Mouse.
The instructions I followed for building the SD card are here
http://elinux.org/BeagleBoardUbuntu
I still havent found a mouse that works with the Pi but I have to say my level of disappointment with GOOD information about problems with the PI are rampant, including those found on the main website for the Raspberry Pi website forum.
I have done some other work with other Linux distributions and will report those results soon, at least with regard to the BeagleBoard xM.
First problem was the SD card with the pre-loaded Debian image that I got from Newark14 (where I bought the board)
http://www.element14.com/community/groups/raspberry-pi
On startup the board, when connected via Serial, just output "60" and nothing else. I headed over to the Raspberry Pi page and followed the instructions there and managed to create a new SD with Debian "Wheezy" and get it booted. The image is more commonly known as "Raspbian" and the home page is here
http://www.raspbian.org/
Well after a few minutes it became obvious there was a problem. I was using a Logitech keyboard and laser mouse and the mouse started causing kernel panic messages about disconnects and reconnects. After searching around the consensus was that there was a power issue.
The Raspberry Pi site states all USB devices should be rated 100mA or less for proper operation. I checked both keyboard and mouse and they were both rated 100mA. I then tried a different micro-USB power cord and still the panic messages continued. My final step was hacking a micro-USB cord and attaching it to my BK Precision BK1621A power supply. This supply is capable of 18V@5A and displays current during use. The board was using less than .5A the entire time and I got really frustrated with the forum that helped NONE and the sad state of info available. I just stuck the Pi on a shelf and started with other projects.
Well a couple of weeks pass by and I loaded the same version of Debian into the BeagleBoard and guess what? The SAME kernel panic messages appeared. I have used multiple distributions with the BeagleBoard and all have worked perfectly. My take? There is a problem with the mouse driver in the Debian Wheezy distribution that is caused not by power issues, but the driver and mouse.
For info, the particular mouse I was using was the Logitech M-0026 Laser Mouse.
The instructions I followed for building the SD card are here
http://elinux.org/BeagleBoardUbuntu
I still havent found a mouse that works with the Pi but I have to say my level of disappointment with GOOD information about problems with the PI are rampant, including those found on the main website for the Raspberry Pi website forum.
I have done some other work with other Linux distributions and will report those results soon, at least with regard to the BeagleBoard xM.
Wednesday, September 26, 2012
Coming soon..
So over the last week I have been trying a number of operating systems and experiments with the BeagleBoard xM. Like a number of open-source projects the amount of information on the intertube is vast and mostly useless. I have sorted through a lot of it and will post results soon!
Monday, September 10, 2012
So in the time I have been away I managed to rebuild the robot that started this whole mess -- Harve. We are now on iteration three and some big changes have been made.
So gone are my homemade wheels and on go some snazzy anodized beadlock wheels from the world of off road RC racing. Had to make my own axle adapters but that was pretty simple. The side plates are now 3/8" thick 6061 aluminum cut on a waterjet (thanks to Albuquerque Waterjet! -- http://www.waterjetcuttinginc.com/home.html). The top plate is now carbon fiber from RockWest Composites. (They mostly do tubing but they have peel-ply plates and a 12x12 square was $20! -- http://www.rockwestcomposites.com/browse/carbon-fiber-plate) Again cut thanks to waterjet technology.
These are the wheels. Really well made and great for holding these off road tires in place. Not free unfortunately... (http://www.vanquishproducts.com/slw-v1.html)
Also added a screw terminals to all of the connections not made with traditional Arduino Uno shields (which is now the motor control/half-bridge and the shield for an XBee radio -- http://www.sparkfun.com/) If anyone is interested I will post something later about how I built it and the part numbers for the screw terminals.
Last but not least was the addition of carbon fiber angles to support the ultrasonic sensors. Mounted with a single screw for small angular adjustments, if necessary.
And something to note when working with carbon fiber - its light, strong and conductive (very conductive!) I had a rather nasty short that took a while to track down and finally found it with a ground touching the carbon fiber plate. Now there are nylon standoffs between all electronics and the carbon.
So gone are my homemade wheels and on go some snazzy anodized beadlock wheels from the world of off road RC racing. Had to make my own axle adapters but that was pretty simple. The side plates are now 3/8" thick 6061 aluminum cut on a waterjet (thanks to Albuquerque Waterjet! -- http://www.waterjetcuttinginc.com/home.html). The top plate is now carbon fiber from RockWest Composites. (They mostly do tubing but they have peel-ply plates and a 12x12 square was $20! -- http://www.rockwestcomposites.com/browse/carbon-fiber-plate) Again cut thanks to waterjet technology.
These are the wheels. Really well made and great for holding these off road tires in place. Not free unfortunately... (http://www.vanquishproducts.com/slw-v1.html)
Also added a screw terminals to all of the connections not made with traditional Arduino Uno shields (which is now the motor control/half-bridge and the shield for an XBee radio -- http://www.sparkfun.com/) If anyone is interested I will post something later about how I built it and the part numbers for the screw terminals.
Last but not least was the addition of carbon fiber angles to support the ultrasonic sensors. Mounted with a single screw for small angular adjustments, if necessary.
And something to note when working with carbon fiber - its light, strong and conductive (very conductive!) I had a rather nasty short that took a while to track down and finally found it with a ground touching the carbon fiber plate. Now there are nylon standoffs between all electronics and the carbon.
Back to work...
So after a bit of a hiatus (Florida for six months) I am back home and getting started with my own work again. The robot has been rebuilt (pics soon) and I have learned a ton about embedded programming so hopes are high. In the meantime I have taken charge of a BeagleBoard xM. Took a few minutes to make a "doghouse" for it via www.pololu.com and their outstanding laser cutting service. Its up and running and now I have to figure out the development part of it and then make it start doing things.
And if anyone wants a doghouse of their own it will cost you about 20 dollars (with shipping) for the acrylic, standoffs and screws. I will post the Autocad file here soon so you can have your own made.
Subscribe to:
Comments (Atom)




