Hi all,
I'm tackling my first bluetooth setup, and I've been able to get pretty far, but now i'm stumped.
First, here are the configurations.
Windows 8
Arduino UNO on COM 6 (USB - 9600 baud)
Bluetooth (linvor) 115200 baud device (4 prong)
COM 7: 115200/8/None/1/None (FIFO on, RCV/TRANS buffers are maxed out in config)
COM 8: 115200/8/None/1/None (FIFO on, RCV/TRANS buffers are maxed out in config)
Pin Setup:
BT.RXD - Pin 6
BT.TXD - Pin 7
BT.VCC - 5v
BT.GND - GND
Sketch on the Arduino: (I pulled this off of google somewhere to help test the BT communications. I'm too n00b to know if this is accurate)
/* Include the software serial port library */
#include <SoftwareSerial.h>
/* DIO used to communicate with the Bluetooth module's TXD pin */
#define BT_SERIAL_TX_DIO 7
/* DIO used to communicate with the Bluetooth module's RXD pin */
#define BT_SERIAL_RX_DIO 6
/* Initialise the software serial port */
SoftwareSerial BluetoothSerial(BT_SERIAL_TX_DIO, BT_SERIAL_RX_DIO);
void setup()
{
/* Set the baud rate for the hardware serial port */
Serial.begin(115200);
/* Set the baud rate for the software serial port */
BluetoothSerial.begin(115200);
}
/* Main loop that will pass any data to and from the Bluetooth mode to the
host PC */
void loop()
{
/* If data is available from the Bluetooth module then pass it on to the
hardware serial port. */
if (BluetoothSerial.available())
Serial.write(BluetoothSerial.read());
/* If data is available from the hardware serial port then pass it on
to the Bluetooth module. */
if (Serial.available())
BluetoothSerial.write(Serial.read());
}
I'm using RealTerm to test bluetooth communications and to send sample data back and forth.
on RealTerm, I have port 7 open @ 115200/8/None/1/None and it will connect fine to bluetooth.
So, when I send data from the Arduino Serial Monitor (set to 115200) It shows up on the RealTerm window.
When I send data from RealTerm it shows up as Chinese Hieroglyphics in the Serial Monitor.
Here is where I need help. I don't know if it is communicating correctly. When I send data via BT, it gets garbled. When I send it over USB, it's fine. So, am I missing something, is this the right software to be using? Maybe my sketch is way off. I've gotten to a point where I understand the basics, but I need to get some really good direction.
Appreciate any guidance you can give me. Attached is a screenshot explaining what I am ending up with.
~Doc