Aug 17, 2011

Android Bluetooth Door Unlock














Now we move to Android.
There's a free application called BlueScripts https://market.android.com/details?id=com.teholabs.bluescripts&feature=search_result, it can connect to a bluetooth serial port and send a text only by pushing a button on the Android phone screen. All you need to do is writing a xml file as below

<doc>
 <script>
  <name>Open Door</name>
  <action>
   <address>00:10:05:20:00:04</address>
   <message>012345</message>
  </action>
 </script>
 <script>
  <name>Open Another Door</name>
  <action>
   <address>4C:ED:DE:6D:AC:18</address>
   <message>012346</message>
  </action>
 </script>
</doc>

Name it with BlueScripts.xml and save in the sdcard root directory.
But if you want to modify and recompile the source code, you will need Eclips and Android SDK.
Here is the Android tutorial http://www.vogella.de/articles/Android/article.html.

You can copy the source code to a directory then create a new Androit project and open the existing project. I have tested it with my Samsung Galaxy Tab and HT Desire HD. By enabling USB debugging on your phone settings, you can directly run the application from Eclips and see the result on the phone.

Have fun with bluetooth and Android.

No comments:

Post a Comment

MAX7219 8-digits 7-segment (STM32F103C8T6)

I made MAX7219 for C51 but now I need it for STM32F103 too. The wiring is simple: MAX7219_CLK   hooked up to PORTA0, MAX7219_...