I’m using a BlueSMiRF silver on an Arduino Micro to communicate with a PC. The PC is running a VB.NET program. The PC appears to flawlessly receive data from the Arduino but I get what appears to be corrupted data when I send data from the PC to the Arduino. For example, if I send the string “4444” to the Arduino 4 times with 1 second intervals, I will often see the following at the Arduino end: “4444” “¢¢Dø” “444M” “4444”. As far as I can tell the corruption is random. Here is what I have tried so far:
-confirmed that the Bluetooth baud is 9600
-confirmed that the BlueSMiRF to Arduino baud is 9600
-confirmed that the Bluetooth and VB serial connection Parity (none), Data bits (8), and Stop bits (1) match
-confirmed that the PC is sending ASCII 10 and 13 along with each string, e.g. “4444(cr lf)”
-tried many different ways of parsing data received on the Arduino, e.g. as individual chars, parseInt, as a string, etc…
-tried sending data without end line characters
-tried alternate PC with unique bluetooth radio
-tried alternate BlueSMiRF module
-tried alternate Arduino Micro
-shielded Tx and Rx wires between SMiRF and Arduino and tied to Arduino gnd
-set unused Arduino I/O pins to low digital outputs
-tried shorting CTS-I to RTS-O
Other possibly relevant info:
-VB.NET code uses SerialPort class and writes using .WriteLine(myInt)
-BlueSMiRF has following connections CTS-I(NC), VCC(+5 from Arduino), GND(gnd from Arduino), TX-O(pin9 Arduino), RX-I(pin10 Arduino), RTS-O(NC)
-Arduino uses SoftwareSerial class and pins 9 and 10
-Arduino/SMiRF are approximately 2ft from PC bluetooth radio
Your consideration and suggestions are greatly appreciated.