SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By Tijean
#133421
I am having the same issue as FableMan.

The WebClient sketches do work well, I get an IP address and the GET request is done correctly.
But the Web Server does not work. I am able to ping and I get a reply. But when I make the HTTP Request via the browser I get no reaction (even no timeout)

I am using WRL-09954 & sparkfun-WiFly-Shield-wifly-library-alpha-2-11-g981ea95

I also had the Ethernet library in my libraries folder. I removed it to be sure to have no Server.cpp/h, … clashes. But it did not help.
Note that I only connected the pins 10,11,12,13, GND & Vin to the Arduino, but I do not expect any issue there, right ?

Any insights on root cause and/or tips on how to debug?
Thanks
By curantil
#133477
@Tijean: The example sketches work for me, although the server is slow. I have an Arduino Mega, but for you connecting those pins should be enough indeed.

@forum: When I try to do something with the Wire library, the program seems to halt.
Is there any reason why the WiFly library and the Wire library should conflict?

It specifically stops when I do an "Wire.endTransmission();"
By fableman
#133537
If I refresh web page frequently the client.stop(); will make the Arduino to crash and stop processing code.
"void Client::stop()" needs lots of love :)

Please need a fix for this!
By Tijean
#133673
Ok, I found a solution that seem to help my problem.
I used jaycollett / WiFly-Shield library, which resulted in some requests correctly handled but after some time, no replies.

Thanks to the TODO comments in the code, I analysed the data available in the Uart and noticed that there are still some remaining data before the *OPEN*
This results in WiFly.responseMatched(TOKEN_MATCH_OPEN) completely missing *OPEN* token and thus flushing it
WiFly.uart.flush() & WiFly.skipRemainderOfResponse() did not solve the problem for the next request.

So how did i fixed it?
In the function Server::begin(), I added WiFly.uart.flush();
And I replaced
-- if (WiFly.responseMatched(TOKEN_MATCH_OPEN)) {
by
++ if (WiFly.findInResponse(TOKEN_MATCH_OPEN, 1000))

So give it a test if it helps. And if so I hope the library owners will pick it up.
Thanks
By roadfun
#133865
It doesn't really help solve your problems but as I noted on my blog (http://ronguest.com/blog/2011/09/arduin ... -hardware/)Arduino just announced their own "official" Wifi shield and it is expected to ship soon. The hardware is quite different - doesn't use the UART for communication among other things - so the new Ethernet library (from Arduino) won't work with the WiFly. The Arduino shield has it's own processor and will be fully hackable. I'm planning to switch once I can get my hands on one due to the sorts of issues mentioned here. I'm very happy I got to play with the WiFly though. It was fun!
By oneshot
#134256
Hi

I have downloaded the latest version of the library and have come across a problem.

Using WPA-PSK if the passphrase contains a space character (which appears to be allowed) then you will not be able to authenticate to the network. The library executes a set wlan passphrase to load the passphrase but it only uses up to the space character so the passphrase is then incorrect.

e.g. if you have a passphrase of

network password

doing a get everything via the terminal shows the passphrase to be network

Indeed doing a set wlan passphrase network password results in the same thing.

I had to change the network passphrase to change the space to _ to get round it which is a pain as then I have to change all the other devices connected wirelessly.
By fableman
#134298
How do I switch from using the Internal antenna to use the External antenna ?

-----------------------------------------------------------------------

My own solution.

Edit: WiFlyDevice.cpp


Under: void WiFlyDevice::setConfiguration()

I added the line

sendCommand("set wlan ext_antenna 1"); // 1= external 0=internal
By fableman
#134904
I think this project is dead and sparkfun is not supporting there own arduino shield with a working library it's very bad support and I will from now avoid anything to do with sparkfun!

I regret I bought the wifly shield and I hope people read this topic before they do the same mistake as I!

:evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil:
By dkflyboy
#135150
Hey Folks,

My Wify Shield is finally stable after I made a few modifications to the code (many thanks to the past posts for pointing me in the right direction). I wanted to share what I did to modify the Wifly.h library.

First a little bit about the problem I was experiencing. I have my Wifly shield setup in the server configuration, which will send a simple XML document back with the status of a few proximity sensors and if the right command is sent (via HTTP GET variables), it will trigger the switch to go high for one second. I have this hooked up to my garage door, so that I can open my garage door from a browser on my mobile device. While unit testing, everything seemed to be working but after about 10 successful requests the Wifly shield stopped taking HTTP requests. I could still ping the device; however, the server wasn't responding. The browser request wouldn't really even time out, which I still find strange. The green light on my Wifly Shield was no longer blinking it was solid green. I had to pull the power to get it back up and running. I setup a few debug lines of code in the Wifly library (mainly within the server.cpp code). I found that there was some extra characters being sent to the Wifly shield, which it was not expecting and therefore would not open the connection. This seems to be the exact same scenario as Trjean posted and I found the solution to be for the most part the same. The only thing is you really don't need to do the flush all you need to do is modify the if statement below.

Note: This code is in the Server.cpp file.
Code: Select all
  // Return active server connection if present
  if (!activeClient) {
    // TODO: Handle this better
    if (WiFly.uart.available() >= strlen(TOKEN_MATCH_OPEN)) {
      //if (WiFly.responseMatched(TOKEN_MATCH_OPEN)) {    <--  **** REMOVE THIS LINE ****
	 if (WiFly.findInResponse(TOKEN_MATCH_OPEN, 1000)) {   // <--REPLACE WITH THIS 
	  // The following values indicate that the connection was
	  // created when acting as a server.
I setup a simple load test that sent a request to the Adrunio, which is connected to my network via the Wifly shield, once every minute for 2 days and I am happy to report that it's still up and running!! I am fairly confident that it is fixed with this minor modification to the library.

P.S. Hey roadfun - I am not sure why you thought this wouldn't work? While the new Adrunio Wifi shield looks great, I am more interested in making the one I got work! 80 bucks is a lot of money for me!! :roll:
By asifnadeem
#135607
Hey Phillip,
I am working on a project that uses RSSI from the wifly shield hooked up with my arduino Uno.
The latest version of firmware(2.22 and over) of RN 131 has a scan command, used for parsing the rssi data.
i wonder if you have looked into it and added soemthing for that in the library. please let me know.

thanks.
By ethan
#135659
I saw user "resamsel" posted a question about using Bonjour over wifi:
is there any chance to get the WiFly library to work with the Bonjour/Zeroconf library (http://gkaindl.com/software/arduino-ethernet/bonjour)? Is there anything "obvious" that I can do (I'm not too experienced with C programming)?

Thanks
René
Has René or anyone else run across a solution? I find myself in the same situation. I'm thinking about using a bit of a hack (based on this: http://www.practicalmaker.com/blog/ardu ... ur-library), but I'd prefer Bonjour if there's a straightforward way to modify either the WiFly or Bonjour library.

Anyone have a suggestion?

Thanks!
By chuck99z28
#135714
fableman wrote:I think this project is dead and sparkfun is not supporting there own arduino shield with a working library it's very bad support and I will from now avoid anything to do with sparkfun!

I regret I bought the wifly shield and I hope people read this topic before they do the same mistake as I!

:evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil: :evil:

The WiFly shield is more complex then most of the plugNplay shields and code is being developed by users, not Sparkfun. dkflybou solved your server problem. You could have done it instead of whining like a little *****.

Perhaps you just aren't ready to me taking on such an advanced project.
By Minimizer
#135764
Hi -

Got a problem with a project I've got going I'm hoping someone might be able to advise me on. I'm running a small Arduino sketch which is basically an extension of the WiFly library WebClient example. All it is is a simple loop, which periodically GET(s) a server file. Right now I've got it connecting to the server every 30 seconds or so just to check things out.

Things been working pretty well so far (the library has been a big help in getting up and running quickly), but every once in a while the program just hangs. I can typically access my server successfully hundreds of times, then the program will just hang. Adding some debug code to the source files, it looks like things are getting hung right at client.connect() .. more specifically during the WiFlyDevice responseMatched() function .. and yet more specifically right at the while (!uart.available()) step. It's apparently not catching the *OPEN* response from the WiFly device, then hitting the infinite loop. (I'm making an assumption here that some sort of uart issue is involved .. I need to however consider the possibility that I'm indeed just not connecting to the server for some reason, but this harder to verify. Based on some previous postings, I'm believing the most likely problem is between the WiFly ad Arduino).

I've read the previous forum postings from dk and Tijean discussing a very similar issue, and some solutions, when using the module in server mode. I'm not sure if something similar might be happening in my case. I'm going to keep working on this one to see if I can stabilize the module (i.e. keep it from hanging during continuous operation accessing the server, hopefully over many days), but would also appreciate any thoughts or insight anyone might have on this one.

Thanks in advance .. (and sorry for the long post).