1 The code in this directory is intended to be run on an Arduino, which is a 2 simple, open-source microcontroller platform: 3 http://arduino.org/ 4 5 Essentially, an Arduino is a board for an ATMega microcontroller, and a GUI 6 IDE project intended for semi-technical developers. The Arduino software 7 essentially boils down to an IDE which is a text editor & build automater for a 8 C/C++ library that hides most of the low-level details of configuring a 9 program to run on the microcontroller. It uses the AVR toolchain and 10 programmer to work with the device from a host PC. This project includes a 11 Makefile which replicates work the normally performed by the IDE; that is, it 12 builds and links the relevant Arduino boilerplate code that sets up the 13 microcontroller, and then links together a final .hex file and prepares it for 14 upload to the device. 15 16 A BlueSMiRF Bluetooth SPP-to-TTL (or similar) board is also required; this 17 device is used to validate Bluetooth API support via the CTS Verifier app. 18 http://www.sparkfun.com/commerce/product_info.php?products_id=582 19 20 This code running on a simple, inexpensive, known-good microcontroller 21 platform makes it much easier to validate the Bluetooth API for an Android 22 candidate device than the "Bluetooth Chat" approach currently required by the 23 CDD. 24 25 A compatible device can be substituted for some or all of the Arduino 26 configuration; however it's worth noting that for approximately US$110, a 27 complete test rig can be completed and used with any number of devices under 28 test. Organizations are, of course, also free to manufacture their own 29 Arduino-like devices. 30 31 This code (and especially the Makefile) requires version 0018 of the Arduino 32 toolchain. Because this software uses a non-Android-standard build, the 33 Android source tree includes in the prebuilt/ directory a .hex file compiled 34 from this source suitable for directly flashing to an Arduino 35 Duemilanove-compatible device. 36 37 The file pulsedtr.py is a Python script using the Serial I/O API that strobes 38 the DTR line on the serial port. This is a signal to the Arduino to enter 39 programming mode; this script is thus used in flashing the Arduino board (via 40 a direct USB connection) with the prebuilt .hex file. If you are building 41 from source, 'make upload' will handle this for you. 42 43 To build the .hex file on Ubuntu Lucid: 44 $ sudo add-apt-repository ppa:arduino-ubuntu-team 45 $ sudo apt-get update; sudo apt-get install arduino 46 $ make 47 $ make upload 48 49 Alternatively, the file 'cts-verifier.pde' can be loaded into the Arduino IDE 50 as a sketch using the normal GUI workflow. 51 52 This Makefile should hypothetically work on a Mac with the appropriate Arduino 53 toolchain installed, but it has not been tested. Windows is not supported. 54