I have a RN-XV WiFly Module - Wire Antenna (WRL-10822) connected to an Arduino pro mega 3.3V. it returns garbage in the serial monitor but works fine with the telnet. I did the “get everything” command with the telnet and that information is below. I have the module powered with a separate regulated 3.3 volt source. The module is simply wired TX to RX and RX to TX and I am not using any libraries. once the code is compiled and uploaded any value entered including “$$$” yields something like this:óÃa?ÿkûÿd$w³ûÿ i have tried most of the baud rates and through the telnet the wiFly reports it is set at 9600. Most likely I am doing something wrong, but I do not know what it is. any help would be appreciated, thanks
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
delay(500);
Serial1.print("$$");
delay(500);
}
void loop()
{
if(Serial1.available() > 0)
{
Serial.print(Serial1.read());
}
if(Serial.available() > 0)
{
Serial1.write(Serial.read());
}
}
HELLOEN*CMD
<4.41> set uart baudrate 9600
AOK
<4.41> scan
<4.41>
SCAN:Found 9
01,01,-72,04,1104,1c,40,cc:03:fa:c8:68:52,HOME-6852
02,01,-72,04,3104,28,00,ce:03:fa:c8:68:53,
03,01,-72,00,2104,00,00,ce:03:fa:c8:68:54,xfinitywifi
04,01,-65,04,1104,1c,00,e8:33:81:0d:b6:20,ATT2d387U8
05,02,-71,04,3104,1c,40,a0:21:b7:a0:a2:ae,vsegda11
06,06,-70,00,2104,00,00,fa:8f:ca:7b:e8:4d,Betty’s Chrome
07,11,-46,04,1114,28,40,e4:f4:c6:0e:53:ab,NETGEAR29
08,11,-39,04,3100,1c,40,d8:97:ba:2b:ac:f8,HOME-B671-2.4
09,11,-39,00,2100,00,00,d8:97:ba:2b:ac:fa,xfinitywifi
END:
get uart
Baudrate=9600
Flow=0x0
Mode=0x0
Cmd_GPIO=0
<4.41> set uart tx 1
AOK
<4.41> get uart
Baudrate=9600
Flow=0x0
Mode=0x0
Cmd_GPIO=0
<4.41> get everything
wifly-EZX Ver: 4.41 Build: r1057, Jan 17 2014 10:23:56 on RN-171
SSID=WiFly-EZX-24
Pass=
Linkmon=3600
Beacon=102
Reboot=0
IF=UP
DHCP=SERVER
IP=192.168.1.1:2000
NM=255.255.255.0
GW=192.168.1.1
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
OPEN=OPEN
CLOSE=CLOS
REMOTE=HELLO
FlushSize=1420
MatchChar=0
FlushTimer=5
IdleTimer=0
CmdChar=$
DNS=0.0.0.0
Name=dns1
Lease=86400
FTP=0.0.0.0:21
File=wifly-EZX.img
User=roving
Pass=Pass123
Dir=public
Timeout=200
FTP_mode=0x0
SSID=HOME-B671-2.4
Chan=0
ExtAnt=0
Join=7
Auth=OPEN
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=30
Passphrase=xxxxxxxxxxxxx
TxPower=12
EAP_Id=userid
EAP_User=peap-user
SleepTmr=0
WakeTmr=0
Trigger=0x1
Autoconn=0
IoFunc=0x0
IoMask=0x21f0
IoValu=0x0
DebugReg=0x0
PrintLvl=0x1
LaunchStr=web_app
TimeEna=0
TIMEADR=64.90.182.55:123
Zone=7
Baudrate=9600
Flow=0x0
Mode=0x0
Cmd_GPIO=0
JoinTmr=1000
Replace=0x24
DeviceId=WiFly-EZX
Password=
Format=0x0
Signal=0
Average=5
BCAST=255.255.255.255:55555
Interval=0x7
Backup=0.0.0.0:0
Sensor=0x0
SensePwr=0x0
<4.41>