[GSOC 2015 Weekly Report] Demo Android app using BBBAndroid

Week #1:

Goals Achieved:

  • Introductory video, blog, github repo, wiki, elinux page.

  • Basic GPIO api usage structure.

  • modified JNI code for GPIO api here.

  • Android app for GPIO access (taken from packtpub example) here.
    Issues:

  • Took some time to understand device tree overlay properly.

  • dtc was giving compiling dts properly. got solution here.

  • Problem with installing overlay on Android kernel. Took some time to do that.

Goals for next week:

  • making API for accessing PWM.
  • understanding Android.mk
  • API for ADC.

Regards,
Ankur Yadav

Week #2:

Goals Achieved:

  • Modified GPIO code for as discussed with my mentor here.

  • Study functioning of PWM and ADC.

  • C code api for accessing PWM using file system here.

  • C code api for accessing ADC using file system here.
    Issues:

  • Took time to compile JNI code properly.

  • Problem in finding proper device tree overlay for testing. I used some from here.

Goals for next week:

  • Improvement in ADC and PWM code if required
  • understanding I2C
  • Implementing API for I2C

Regards,
Ankur Yadav

Week #3:

Goals Achieved:

  • Got HDMI to VGA convector working. (supplied VCC and GND from beagle to 18th(VCC) and Gnd pin of HDMI )

  • Studied functioning of I2C bus

  • Used this library for developing I2C api.

  • C code api for I2C bus using file system here.

  • Developing Android app for adc here.
    Issues:

  • HDMI to VGA convector was not working. (took some time to hack the circuit and get it solved)

  • My 5V mouse was not working with beagle had to use 3.3V mouse.

  • Adc android app is giving error. (still have to solve the issue)

Goals for next week:

  • Completing ADC app
  • Understanding the AsyncTask.
  • Understanding SPI bus.
  • Implementing API for SPI

Regards,
Ankur Yadav

Week #4:

Goals Achieved:

  • Android app for ADC completed link.

  • Studied functioning of SPI bus

  • C code api for SPI bus using file system here.
    Issues:

  • Issue with ADC app resolved here.

Goals for next week:

  • Understanding CAN
  • Implementing API for CAN

Regards,
Ankur Yadav

Week #5:

Goals Achieved:

  • Study functioning of CAN.
  • Studied this documentation link for CAN.
  • C code API for CAN bus using RAW protocol here.
  • Developing Android app for i2c.

Issues:

  • Difficult to find CAN work references.
  • this documentation was helpful in understanding.
  • this device tree overlay giving error when installing(need to figure out).

Goals for next week:

  • Get I2C app working
  • Understanding UART
  • Implementing API for UART

Regards,
Ankur Yadav

Week #6:

Goals Achieved:

  • Android app for I2C completed (link).

  • Complete overview of I2C app can be foud here.

  • Studied documentation of termios.h (link).

  • Developed api for UART (link).
    Issues:

  • Some functions of I2C had problem so some changes in API were required.

Goals for next week:

  • Work on SPI android app.
  • Understanding USB and how to access it in BBBAndroid.

Regards,
Ankur Yadav

Week #7:

Goals Achieved:

  • Android app for SPI for 74HC595 present on bacon cape completed (link).

  • Video tutorial for GPIO app (link).

  • Video tutorial for PWM app (link).

  • Video tutorial for ADC app (link).
    Issues:

  • Have problem with one of my beaglebone(its not working) :frowning:

  • My adxl345 breakout board is also not working. (So could not develop Android app for SPI using it).

  • I have ordered new adxl345 breakout board. After that I will try to access it using SPI.

Goals for next week:

  • Android app for UART.
  • Sample Code to access USB.

Regards,
Ankur Yadav

Week #8:

Goals Achieved:

  • Android app for UART completed (link)

  • After lot of try I was able to enable can bus.

  • Android app for CAN (link).
    Issues:

  • Even after installing BB-DCAN1 overlay can0 was not created, found that some can bus kernel modules were not loaded in bbbandroid. (issue).

  • Send and Read for can bus is working properly in binary through shell but Read is not working properly in apk.

Goals for next week:

  • Video tutorials for i2c, spi, and uart
  • Wiki content for gpio, pwm, adc, i2c, spi and uart.

Regards,
Ankur Yadav

Week #9:

Goals Achieved:

  • Android app for CAN completed (link)

  • Sample program for USB working using libusb. (gives lsusb type output)

  • Video tutorials for i2c, spi.
    Issues:

  • Due to heavy rain fall in my area (Bhuj, Kutch) there was a power cut for 2 days and internet is also not working properly. So, I was not able to upload videos. I will upload it soon this week.

  • Also I will try to compensate for the this week’s work next week.

Goals for next week:

  • Video tutorials for uart and can.
  • Wiki content for gpio, pwm, adc, i2c, spi, uart and can.

Regards,
Ankur Yadav

Week #10:

Goals Achieved:

  • Android app for USB completed (link).

  • Video tutorials for i2c, spi, uart, can, usb.

  • Started documentation using doxygen (link).
    Issues:

  • No issues.

Goals for next week:

  • Complete doxygen documentation.
  • To do some blog posts for demo apps.

Regards,
Ankur Yadav

Week #11:

Goals Achieved:

  • Doxygen documentation completed (link).

  • Wiki content add for bbbandroidHAL (link).
    Issues:

  • No issues.

Goals for next week:

  • Add some example codes in wiki contents.
  • Make final video explaining all the APIs briefly.

Regards,
Ankur Yadav

Week #12:

Goals Achieved:

  • Completed wiki with some examples. (link).

  • Completed android app for bacon cape. (link)

  • Completed 50min video explaining all the APIs briefly.
    Issues:

  • No issues.

Regards,
Ankur Yadav

Final Report:

Aim of the project: To develop demo Android applications for BeagleBone Black for all its supported interfaces and develop an Android HAL to support future development.

Code repositories:

  1. bbbandroidHAL (link): This is the native C code library which can be used to develop Android Application for BeagleBone Black.
  2. demoapps-bbbandroid (link): Demo application for BBBAndroid using bbbandroidHAL. It is just to demonstrate how one can develop android applications using bbbandroidHAL.

Documentation:

  1. Videos (link): This playlist contains video demonstrations for all the demo apps (i.e. gpio, adc, pwm, i2c, spi, uart, can, usb).
  2. Doxygen documentation for bbbandroidHAL (link).
  3. Wiki for bbbnadroidHAL (link): This wiki also example codes along with function explanation.

Code completed in GSoC time Frame:

  1. HAL Code for GPIO, ADC, PWM, I2C, SPI, UART, CAN and USB.
  2. Demo android apps for GPIO, ADC, PWM, I2C, SPI, UART, CAN, USB and for BACON cape.

I have tried to complete almost everything in the proposal, but there is always a chance of improvement. The HAL code and demo apps should help developers accelerate process of Android App development for beaglebone black. I would like to help anyone who wants to try out HAL or wants to develop his/her own Android app for beagle.

It was a great learning experience for me. I would like to thank my mentors Andrew Henderson and Anuj Deshpande for their support and guidance which made it possible for me to complete this project. I would also like to thank this wonderful beagleboard community for their support and Google for giving us this opportunity.

Regards,
Ankur Yadav