WiFly RN-134 board (not the sparkfun shield) problem

Hi guys,

This is my first post on this forum so please bear with me…

I’ll start straight away buy insisting that my question / problem is about the WiFly RN-134 board, which contains the SAME 131 module but its is NOT the Sparkfun board.

I think however that some of the people here might be able to help, and I don’t have much other choice, unless I’m missing some forum dedicated to the WiFly products ?

I’m using (or trying to :slight_smile: ) this with an Atmega 168 micro controller, same as for the Arduino but programmed directly with avr-gcc.

I bought last week a RN-134 evaluation board (from mouser http://uk.mouser.com/Search/ProductDeta … 765-RN-134 ) for my project (here you can have a look at various stuff I blog about :http://trandi.wordpress.com )

It came with firmware version 2.23 and after several days of frustration I’ve updated it to 2.28 which seems to be the latest, but is has NOT changed anything to my problem(s).

I basically need to connect to a http web-service on the internet to get some weather information: http://weather.yahooapis.com/forecastrss?w=44418

I initially connected to the board (through the TTL serial port using a (FTDI 3.3V cable) and TeraTerm.), set up the IP protocol at 18 to support http, configured the wireless ssid and authentication and SAVED everything.

Everything is ok, I get into command mode (with “$$$”) and I type this:

I do :

set dns name weather.yahooapis.com \n
set comm remote GET$/forecastrss?w=44418 \n
open \n \n

And then I get the XML file AS EXPECTED.

So this proves that the whole configuration is WORKING OK< the board is able to go on the internet and download the requested XML from yahoo’s website…

Now, here are my 2 issues, quite independent of each other, or so I think:

  1. If I do

set dns name weather.yahooapis.com \n
set comm remote 0 \n
open \n
GET /forecastrss?w=44418 \n

Then it does NOT work. It complains about “Yahoo! - 404 Not Found”. Exactly as if the actual page name sent had something added or substracted from it…

  1. If I take the snipped that does work from TeraTerm and I send the exact same instructions from my Atmega 168 micrcontroller, all the commands work ok (I can get the AOK back, and even the “OPEN”) I get again “Yahoo! - 404 Not Found” !!!

I can actually parse the 404 message on the microcontroller, so there’s no connectivity problem and there’s no error from the WiFly board coming back…

I know it’s a long description… :slight_smile: To sum it up, some how, in these 2 situations, it seems that the firmware on the WiFly is adding something to the request which makes Yahoo not recognise it…

I have also tried in both cases:

  • to play with more or less “\n” at the end of the commands or even add “\r”

  • to add “HTTP/1.0” at the end of the page name both when it’s set up in comm remote and when it’s send after open

To no avail !!!

This is really huuugely frustrating, as I’ve already spend 3 entire days on this problem (yes that’s how desperate I am to get that weather information on my VFD clock http://trandi.wordpress.com/2011/09/10/ … v-18-tube/ :slight_smile: )

I’ve also had a look at the WiFly arduino library for the Sparkfun shield, and checked what they are doing in the code… it’s the same thing, no extra commands or tricks that I could see…

Many many thanks for your help,

Dan

FYI, in case anybody might find this interesting, after a quick test tonight it turns out that indeed going into “pure IP” mode (so that the WiFly doesn’t add anything by itself) and sending:

"

open weather.yahooapis.com 80 \n

GET /forecastrss?w=44418 HTTP/1.1\r\n

Host: weather.yahooapis.com \r\n

\r\n

"

Does work indeed !!!

dan

Hi guys,

I’ve finally found the problem and finished my project:

http://trandi.wordpress.com/2011/09/26/ … -internet/

Here’s the short abstract of the issue, in case anybody on this forum is interested or other people search it up in the future:

  • the HTTP mode was working when connected to the WiFly board from the PC but NOT when it was the AtMega micrcontroller sending the commands… still don’t know why

  • the solution was to go in TCP mode and construct the HTTP request myself (you’ll see the code in the wiFly.c file posted on my blog)

  • then the problem with that was simply that when resetting the board to its factory settings I had forgotten to clear the “com remote” string, and the board would add “HELLO” to all my transmissions (again, confusingly enough yahooapis.com would work just fine with this, whereas search.twitter.com would complain !)

Hope this helps, let me know if you have any similar problems and need help !

Thanks,

dan