Wireless Bluetooth RS232 TTL Transceiver Module

http://www.dealextreme.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711

Characterisques

 * Wireless Bluetooth RS232 TTL transceiver module
 * Allows your target device to both send and receive the TTL data via Bluetooth technology without connecting a serial cable to your computer
 * Easy to use and completely encapsulated
 * Chipset: CSR BC417143 http://www.csr.com/products/technology/bluetooth
 * Bluetooth V2.0
 * Working voltage: 3.3V
 * Current: pairing 20~30mA, connected 8mA
 * User defined Baud rate: 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200
 * Default serial port setting: 9600, N, 8, 1
 * Password: 1234
 * Suitable for: mouse, keyboard, joystick; computers and peripherals; GPS receiver; instrument and industrial control

Dimensions: 1.06 in x 0.51 in x 0.04 in (2.7 cm x 1.3 cm x 0.1 cm) Weight: 0.18 oz (5 g)

Links

 * CSR BC417143 http://www.csr.com/products/technology/bluetooth
 * Datasheet CSR BC417143 BGQ K103AB
 * http://www.datasheetarchive.com/BC417*%20CSR-datasheet.html
 * Datasheet http://www.sure-electronics.net/rf,audio/GP-GC021_Ver1.0_EN.pdf
 * Datasheet + Examples http://www.egochina.net.cn/e-shop/ebay/datasheet/Bluetooth_Module_L6.rar
 * AT Commands http://www.cutedigi.com/pub/Bluetooth/BMX_Bluetooth_quanxin.pdf
 * Soudure http://picasaweb.google.com/Cellbots/BluetoothModule#
 * Arduino
 * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1256669791
 * http://www.dealextreme.com/forums/Default.dx/sku.80711~threadid.897457

Connections
(pad with golden dot next to it is pin 1):
 * 1: TX (data out)
 * 2: RX (data in)
 * 11: RESET (connect to ground to reset, pullup-resistor of 10K recommended)
 * 12: VCC (3.3V)
 * 13: GND
 * 24: LED output (ON when there is a connection, BLINKS when there isn't).
 * 26: KEY ????

D'après http://www.cutedigi.com/pub/Bluetooth/BMX_Bluetooth_quanxin.pdf [[Media:BMX_Bluetooth_quanxin.pdf|copie locale]]


 * 1 : UART-TX
 * 2 : UART-RX
 * 3 : UART-CTS
 * 4 : UART-RTS
 * 5 : PCM-CLK
 * 6 : PCM-OUT
 * 7 : PCM-IN
 * 8 : PCM-SYNC
 * 9 : AIO(0)
 * 10: AIO(1)
 * 11: RESET (connect to ground to reset, pullup-resistor of 10K recommended)
 * 12: VCC (3.3V)
 * 13: GND
 * 14: GND
 * 15: USB D-
 * 16: SPI-CSB
 * 17: SPI-MOSI
 * 18: SPI-MISO
 * 19: SPI-CLK
 * 20: USB D+
 * 21: GND
 * 22: GND
 * 23: PIO(0)
 * 34: PIO(11)

Remarque

 * le fil à wrapper est parfait pour réaliser les sondures !
 * ne pas inverser (comme moi) GND et 3.3V : le module est mort sinon !

Applications
Before you start to communicate with the device via arduino, make sure to install all the shizzle from the amarino site: 

To then receive the compass headings from your phone in your arduino (and the serial monitor) upload the following code to your arduino (make sure you have the lib installed!!)

On your phone, start the amarino app (the what?? this: http://code.google.com/p/amarino/downloads/detail?name=Amarino_2_v0_55.apk&can=2&q=), connect to the bluetooth device (hooked up to 3.3 V / GND / TX / RX, pass is either 1234, 0000 or none) and add the compass event. You should now see the compass data (as an int) in your serial monitor.

/* Receives compass sensor events from your phone.
 * 1) include 

// MeetAndroid meetAndroid; // you can define your own error function to catch messages // where not fuction has been attached for MeetAndroid meetAndroid(error);

void error(uint8_t flag, uint8_t values){ Serial.print("ERROR: "); Serial.print(flag); }

void setup { // use the baud rate your bluetooth module is configured to   // Bluetooth module native is 9600 // not all baud rates are working well, i.e. ATMEGA168 works best with 57600 Serial.begin(9600); // register callback functions, which will be called when an associated event occurs. // - the first parameter is the name of your function (see below) // - match the second parameter ('A', 'B', 'a', etc...) with the flag on your Android application meetAndroid.registerFunction(compass, 'A');

}

void loop { meetAndroid.receive; // you need to keep this in your loop to receive events }

/* * This method is called constantly. * Compass events are sent several times a second. * * note: flag is in this case 'A' and numOfValues is 1 * since compass event sends exactly one single int value for heading */ void compass(byte flag, byte numOfValues) { // we use getInt, since we know only data between 0 and 360 will be sent int heading = meetAndroid.getInt; Serial.println(heading); }