Module from goodluck buy:
http://www.goodluckbuy.com/serial-bluetooth-rf-transceiver-module-rs232.htmlThis small size Bluetooth TTL transceiver module allows your target device to both send or receive the TTL data via Bluetooth technology without connecting a serial cable to your computer. It's easy to use and completely encapsulated.
TTL data transparent transfer between a host Bluetooth device. Works with any USB Bluetooth adapters. Default Baud Rate: 9600,8,1,n. Coverage up to 30ft. Built in antenna. Power input: +3.3VDC. Mini Size. The UART interface is TTL Compatible because. The Module can be configured with AT Commands. You only be able to change the PIN with the AT Commands. The module can only act as a slave, so you cant connect modules together. If you need a Master functionalitiy, you can flash other Firmware on to the module. The firmware can be found later on my website http://www.endasmedia.ch
I soldered leads to the Tx, Rx, 3.3V and GND pads. Was not careful, and tore out the whole Rx pad :{. On powering it up, was able to find it from the laptop (showed up as "livnor", and needed to use pin "1234").
Using python to search for it, first installed pybluez (from synaptic). From the following code, was able to determine it's id. After that, wasn't able to get any further, with actually doing serial over bluetooth. This site has some nice examples of python, check it out:
http://homepages.ius.edu/rwisman/C490/html/PythonandBluetooth.htm
from bluetooth import * print "performing inquiry..." nearby_devices = discover_devices(lookup_names = True) print "found %d devices" % len(nearby_devices) for name, addr in nearby_devices: print " %s - %s" % (addr, name) performing inquiry... found 1 devices linvor - 00:12:01:11:03:53
JY-MCU Bluetooth Module:
See this instructable to hookup Arduino, Android phone, SL4A python and this bluetooth module.
Got this from DealExtreme.
Code sample to use this with python and an arduino:
//ran this program on the arduino
void setup() { Serial.begin(9600); pinMode(13, OUTPUT); digitalWrite(13, LOW); } void loop() { if (Serial.available() > 0) { char incoming = Serial.read(); if (incoming == 'a') digitalWrite(13, HIGH); if (incoming == 'b') digitalWrite(13, LOW); } }
connected the blutooth device to the arduino
Vcc -> 5V Gnd -> Gnd Rx -> Tx Tx -> Rx
On applying power, a red led keeps blinking (blinking for discoverable, solid after it paired.
ran this program on the laptop
#!/usr/bin/python from bluetooth import * print "performing inquiry..." nearby_devices = discover_devices(lookup_names = True) print "found %d devices" % len(nearby_devices) for name, addr in nearby_devices: print " %s - %s" % (addr, name)
it printed out
performing inquiry... found 1 devices linvor - 00:12:05:11:90:32
then ran this program, to test out connectivity
#!/usr/bin/python from bluetooth import * server_address = "00:12:05:11:90:32" port = 1 print "connecting to \"%s\" on %s" % (server_address, port) sock = BluetoothSocket( RFCOMM ) sock.connect((server_address, port)) print "connected. ready for input..." while True: data = raw_input() # read stdin, stripping the trailing newline sock.send(data) if data == 'x': break sock.close()
The first time, linux popped up a dialog asking for pin to pair, entered 1234. On Linux, pair with the device on your computer, then use the arduino serial monitor to interact.