Hi,
whenever I run my program, I got “garbage” characters from the RN171 (or my application cant grab the real content from Module) … But strange thing is, Module (looks like) can process my commands (ie. connect xx.yy.zz 50000) without any problem. But I have trouble to process the messages from the module because of these garbage characters shown below. So any idea? many thanks in advance, reha
VVVVVVVVV output at Arduino console VVVVVVVVVVV
merhaba!
?þ$Ñÿ Áÿ
ERR: ?-Cmd
<2.23> getÁÿ
IF=UP
DHCP=ON
IP=192.168.1.110:2000
NM=255.255.255.0
GW=192.168.1.1
HOST=198.100.31.2:1883
PROTO=TCP,
MTU=1524
FLAGS=0x7
BACKUP=0.0.0.0
<2.23>
****** My Environment ************
- Connected RN171 to arduino nano 3 directly using pin 4 & 5
- Powered RN171 from 3.3V from the Arduino board
- Arduino is connected to notebook via USB
********** and my program is: *****
#include <SoftwareSerial.h>
SoftwareSerial mySerial(4, 5); // RX, TX
void setup()
{
Serial.begin(9600);
Serial.println(“merhaba!”);
mySerial.begin(9600);
delay(2000);
mySerial.write("$$$");
}
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}