Main Site Documentation

Bluetooth modules


#1

Can someone point me in the right direction on a Bluetooth module that will work with my Panda board. I am interested in sending commands via bluetooth to the board from my smart phone. The Idea is to control relay’s, leds etc…

Thank you!


#2

Search this forum and you’ll find a ton of info. You can use any BT slave component that supports SPP (serial port protocol), which is very common. When you pair with a master device (phone, PC, etc) you’ll get a new COM port, which you can use to control the Panda. GHI used to sell such a board (I have one), not sure why they don’t anymore.

BTW - If you have an Android phone, there is a free terminal app called SENA BTerm that is very nice for BT COM. I’ve successfully RX/TXd data with a Panda2.


#3

http://code.tinyclr.com/project/350/btm222-driver-for-ntmf/


#4

Thanks, Erich this is what I am after for and yes I don’t know why the Bluetooth board is not available anymore. That is why I was asking for specific modules that people have already used just to have a good starting point and I do not end up having 4 or 5 modules which could be useless. But I guess the SPP protocol is very common.


#5

Architect,

Where can I find the correct BTM-222 do you have a link to purchase it?

Thanks


#6

I am not sure. Looks like not many shops have them

http://rf-store.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=5683&category_id=62&manufacturer_id=0&option=com_virtuemart&Itemid=2&lang=nn


#7

i wrote a bluetooth listener class for my headtracking project (used with the bluetooth module they used to sell here), i will see if i can post it when i get home. maybe gus has an answer for why they dont sell it anymore?


#8

That would be nice to have even if I cannot get the module they sold here I would still have a good head start of what needs to be addressed in code.

Thanks


#9

I was thinking about that too WizMaster… I got a “EZBluetooth” module from Parallax to drive my Boe Bot around. I dont know too much about the Rx, and Tx, that you have to declare to use a Bluetooth module… If some one can write a Bluetooth code for a FEZmini Robot I will be happy to volunteer to test the code out, and give the feed back to the community. :slight_smile: … FYI, EZBluetooth module Docs are open source from Parallax.

http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/bluetooth/List/0/SortField/4/ProductID/550/Default.aspx


#10

This code from GHI, connents a Bluetooth module that they used to sell for the FEZmini and FEZ Panda, the Adobe pdf stated; “this component works with any UART (serial port) on FEZ
Mini starter-kit and FEZ Domino Component shield.
FEZ Mini (COM3) connect Bluetooth Tx to Di7 and XBee RX
to Di8.
FEZ Domino (COM1) connect Bluetooth Tx to Di0 and XBee
RX to Di1.
Baud rate is 9600.”
… do I have to mod the code alot to use it for the “EZBluetooth” Module?

using System;
using System.Text;
using System.Threading;
using System.IO.Ports;
public class Program
{
public static void Main()
{
// create serial port for bluetooth . Connect BLUETOOTH_RX to Di8 and BLUETOOTH_TX to Di7.
SerialPort bluetooth = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
bluetooth.Open();
// create "Hello!" string as bytes
byte[] helloBytes = Encoding.UTF8.GetBytes("Hello!");
// send string every second
while (true)
{
bluetooth.Write(helloBytes, 0, helloBytes.Length);
Thread.Sleep(1000);
}
}
} 

#11

This code doesn’t have anything to do with bluetooth specifically. It is plain old serial COM. However, this is NOT the same COM port you will see listed on whatever your BT master device is hooked to.

Nobody (that I know of) has implemented a BT master device (via USB host or otherwise) on a FEZ yet. That would be a significant undertaking and has probably not been done because there are simpler protocols like XBee available.


#12

hi EricH… I was wodering about that… the demo code for the XBee expansion from GHI has similar code… I was wondering; the code just makes a simple “Hello!” messege appear to confirm connection, the rest is up to the programmer… right?


#13

Right. The commenting in the example is confusing because it mentions the Xbee and uses COM3. COM1 RX/TX for Domino and both Pandas is Di0/Di1, respectively. That is, if memory serves me before I’ve had coffee this morning :wink: Check the brochures to make sure. On the BT master side, you never know what COM port you’ll get until you pair it with the slave. Take a look at FezTerm for a great example of using serial COM.