Project - FEZ and Android Bluetooth communication

FEZ and Android Bluetooth communication

This code example show the easiest way to make simple communication between FEZ Spider and Android device using Bluetooth.
For this example I simplified Bluetooth Chat sample, provided by Android developer site. It is also possible to enable Bluetooth adapter from application and to make new pairing, but I want to make this sample as simple as possible. To use this code you need to install Android development environment ( and Android device with Bluetooth adapter and Android version 2.1 or later. Android emulator doesnt support Bluetooth connections.
These are the steps to make this snippet work:

  1. I used FEZ Spider, Bluetooth module ( on socket 9 and Button module ( on socket 6. Change connections using Visual Studio if necessary. Run the program in debug mode using Visual Studio. After a few seconds blue and red light should blink.
  2. Enable Bluetooth adapter on you Android device and do a pairing. Use menu Settings  Wireless and network  Bluetooth Settings  Scan devices. Seedstudio device should appear on the list. Select it and use PIN 0000 to complete pairing process.
  3. Deploy Android application to you device using Eclipse or any other IDE. You need at least Android 2.1 (API level 7) device. I tested it on my Samsung Galaxy S with Android version 2.3.6. When you run application the list of paired Bluetooth devices will appear. Select seedstudio. Wait for message Connected to seedstudio.
  4. Click button on your spider and check for message on you Android device.
  5. Click Send message on you Android device and check Visual Studio Output window.

Usefull, community needs this. Thanks for sharing.