Showing posts with label beaglebone black. Show all posts
Showing posts with label beaglebone black. Show all posts

Sunday, January 19, 2014

Connect BeagleBone Black to Android (xpost)

19th January '14
Some of the methods that I think can be used to setup duplex communication between an Android application and a Beaglebone Black.
  1. Android uses the mtp filesystem. You can setup libmtpfs and mtptools on your BeagleBone Black. Then connect the Android device to the USB host port of BBB, mount the Android filesystem in Angstrom and read/write on files there. Problem with this method is there is no recipe for libmtp in the Angstrom kernel tree here OpenEmbedded has support for mtp here. So it might not be a difficult thing to get mtp to play along with a BBB.
  2. Android has the AOA protocol(Android Open Accessory Protocol). It basically allows one to connect an Android device to an Arduino. Look at ADK Rowboat project has implemented the protocol for the BeagleBone. According to me there isn't any difference between BBB and BeagleBone White when it comes to this, but I was unsuccessful while getting the rowboat project to work on the Black.
  3. Bluetooth : You could attach a USB dongle like this to your BBB. bluez on Linux allows you to pair devices too.
  4. Similar to method number 1, we have a protocol called PTP (Picture Transfer Protocol). PTP makes your Android device appear as a camera. PTP is a subset of MTP . I was able to use gphoto2, a tool based on PTP, to get and put files on an Android device connected to the Beaglebone Black.
Basic outline is as follows :
opkg update
opkg install libusb-@-dev #Replace @ with the latest version number
libusb comes pre installed with Angstrom. We need the -dev version to build libgphoto2 and gphoto2.
Next fetch the tars available on the sourceforge pages
Untar both the files, and run the following commands in each.
./configure
make
make install
First install, libgphoto, followed by the gphoto tool. Now you should be able to use gphoto2 tool from the command line on the beaglebone black.
Next we look at some of the commonly used options with gphoto2.
  • --list-ports
    If you installed libusb correctly, running gphoto2 with this option will show you 6 results. We are interested in the one that reads USB.
  • --auto-detect
    This will detect the cameras (in our case the Android device), that's connected to the beagle. It will show it's model number.
  • --list-files
    This will list all the files that are present on the mounted device.
A comprehensive list can be found at the man page.
This neat setup should help in a lot of projects that I have in mind :)

- Anuj Deshpande

Sunday, July 21, 2013

Getting started with the BeagleBone Black

Arduino is the most ubiquitous development platform, period. Anyone who has entered the world of DIY electronics most probably started off with an Arduino. The reasons for this are it's ease, the enormous amount of documentation in the form of wikis, code samples, video tutorials, etc.
But there comes a point when the Arduino just isn't enough for your needs. You need more muscle.

Enter BeagleBone Black.
A 1Ghz, 512MB RAM "mini-computer" with 2 GB of onboard memory.
At $45, its in the competitive price range of the RaspberryPi (35$), pcDuino(59$), etc.

It comes from one of the oldest players in the Embedded Linux worlds, Beagleboard.org. It's their 4th ARM dev board, and the 1st in this price range (previous boards were Beagleboard, Beageboard xM and the Beaglebone white).

Pros as compared to the Pi:
Since the Pi has gained a lot of popularity, it's easier to compare it with that.

  • More processing power(1Ghz as compared to 700Mhz)
  • No need for SD card( has 2 GB of onboard flash, which is more than enough to run your fav Linux distro. Of course it has uSD card slot, just in case you think you need more space)
  • No need for external power supply( directly plugs in to your laptop/PC and runs like the Arduino)
  • Has a LOT more interfaces as compared to the Pi( more GPIOs. Has onboard PWM, ADC too unlike the Pi)
    Full list here http://circuitco.com/support/index.php?title=BeagleBoneBlack
  • Has many many capes available.
    http://circuitco.com/support/index.php?title=BeagleBone_Capes
    Capes are analogous to shields for Arduino.
    It's not always possible to give all kinds of interfaces on the board. So based on your project needs, you can use one of the available capes to add even more functionality.

    You can of course find a lot more comparisons if you ask Google ;) 
Getting started:
Since the BBB rocks Linux on board, you don't really have any restriction on the kind of programming language you choose. 
Any kind of input/output is done by using 

Links to get started:
  1. SRM (System Reference Manual. Read through this once to get familiar with all the features and interfaces.)
  2. Wiki
  3. Mailing list (this should be your first stop for any issues once you get your Black. It's very active and very helpful. Remember to search previous posts before posting your doubt, someone might have had the same doubt)
  4. IRC - #beagle on Freenode
  5. Derek Molloy's blogs ( has some really cool tutorials, videos, etc to get started)
  6. Userspace Arduino project
Get it:
Some of the Indian shops which will ship you a Black are
  1. http://tenettech.com/product/2912/beaglebone-blackhttp://tenettech.com/product/2912/beaglebone-black
  2. http://shop.sumeetinstruments.com/index.php?route=product/product&keyword=beaglebone+black&category_id=0&product_id=965
  3. http://www.crazypi.com/index.php?route=product/product&product_id=79&search=beagle

    Note: these guys don't really have permanent links to their products. So if above links don't work, try searching for them from the Homepage.
DigiKey, Adafruit, element14, etc are the official distributors for the BBB. More info about them here http://beagleboard.org/Products