WiFly -- Terminal -- Weird Characters

I’m trying to communicate with the WiFly chip (WiFly Shield) via telnet. I’m able to connect and get everything working, i.e. send/receive commands, however, I constantly receive weird characters. This happens when using both windows native telnet and Tera Term.

HELLO(ÏÂCMD

wÇ}shoe net

ERR: ?-Cmd

y+È21> wo

zÂ.21> y+Úshow net

SSid=iPhoneRemote

Chan=1

Assoc=OK

Rate=12, 24Mb

Auth=OK

Mode=NONE

DHCP=OK

Boot=526197

Time=FAIL

Links=0

B!.21> zðget ip

ERR: ?-Cmd

²2.21> B2get p

ERR: Bad Args

Su.21> Âget ip

IF=UP

DHCP=OFF

IP=192.168.1.154:9000

NM=255.255.255.0

GW=192.168.1.1

HOST=192.168.1.2:8000

PROTO=TCP,

MTU=1460

FLAGS=0x87

BACKUP=0.0.0.0

<2.21>S

Any one have any ideas as to what could be wrong?

Thanks,

Ryan

A common reason is a slight Baud rate mis-match.

Is the oscillator frequency accurate? Is the Baud rate divisor correct?

I’m using the WiFly shield so the oscillator frequency is what it is. I haven’t changed the baud rate setting from the stock setting. This is also going through telnet and not through the arduino. From my knowledge there’s no way to even set the baud rate in Tera Term…

–Ryan

waltr:
A common reason is a slight Baud rate mis-match.

Is the oscillator frequency accurate? Is the Baud rate divisor correct?

I second this notion.

If you are using the sample code from the SpeakJet tutorial you have to make sure you’ve changed the Baud Rate Divisor.

Change this:

struct SPI_UART_cfg SPI_Uart_config = {
  0x50,0x00,0x03,0x10};

To

struct SPI_UART_cfg SPI_Uart_config = {
  0x60,0x00,0x03,0x10};

This will ensure the correct baud rate is calculated.

The xtal was changed from a ~12mhz to a ~14 mhz to broaden the shields baud rate range.

I’m pretty sure it’s not the baud rate… If I use the serial monitor, everything is ok. I can transmit and receive data using the SpiUARTterminal sketch from the WiFly library 100% ok. My code works 100% ok. It’s only when I Telnet into the WiFly that random characters show up.

I’m not basing it off of any tutorials… Using the WiFly library, I’ve configured the WiFly to negotiate its network parameters on its own. In my sketch, I’m only using SpiSerial.begin and SpiSerial.available.

Thanks for the help,

Ryan

Ah.

It may help to use a program such as Wireshark to analyze the raw data passing over the network.

Also, it really helped my application to update to the 2.27 firmware.

The procedure can be found in the manual available on the WiFly Shield page.