Are there any functions available that you can use to test that the WiFly is still associated with the WLAN? I poked through the source a bit, but didn’t see anything obvious. I have it periodically checking a web page, and I’m guessing best practice is to check for association each time I go to hit it so that I can reconnect if necessary. Or does it just auto-reconnect if the connection drops? If so, can I trust that?
Can anyone tell me how to wire the ?Breakout Board for SC16IS750 I2C/SPI-to-UART IC" to the Wifly Breakout boarld and to arduino?? I should have gotten the Wifly shield but messed up.
I’ve been using the WiFly Shield library for a while and then I updated to the new Arduino IDE 1.0.
After that the library doesn’t compiled anymore.
I’ve been working on this since yesterday and I believe that I’ve solved a pair of problems. I can’t give any complete guarantee but now I’m using the SPIUartTerminal normally and it works.
Your combined posts solved a really confusing issue with my WiFly shield. I was really considering it a waste of time and planned to move to an ethernet shield or wait for the official Arduino wifi shield.
Changing Server.cpp as dkflyboy suggested made my sketch work properly and consistently for the first time after HOURS of work. The additional pointer (that the file to edit is Server.cpp) helped too.
I have an Arduino Uno with a WiFly shield (revision 2) acting as a webserver. It takes a variable from the URL and operates a servo accordingly. It would work some of the time; other times the server would lock it. It would respond to ping OK but the green light would stay on (after a quick flash from the red light) until the browser trying to contact it was closed. A reset button, power cycle or terminal connection (which restarts the sketch) would sometimes solve it, but mostly I had to keep on trying to connect from a browser up to 10 or 20 times before it would start working - and then it would only work some of the time.
I found it difficult to open and edit the CPP file. In the end, I started the IDE then dragged the CPP file into it, save the entire project to the desktop and then copied the new Server.cpp file to the correct location. I also found that renaming the old Server.cpp file to ‘Server - old.cpp’ doesn’t work; it still gets included, resulting in compliation errors. Renaming the file Server.OLD works OK.
Has anyone tested this to confirm and will this be rolled into the official package? Also, looking at the changes above, it doesn’t look like the Client/Server have been updated for 1.0 compatibility. Thanks! I’d take a stab at updating everything myself but I don’t have a WiFly shield, sorry!
Well i modified your server sketch to light up an LED over wifly, but the problem is due to the space restrictions on arduino, i can only place an ‘on’ and ‘off’ post button using html to display on the computer browser to operate the LED.
What i really want to do is have a proper website on the computer with the relevant buttons to operate something on the arduino using wifly. Any help would be greatly appreciated.
takha… we have the same project… the only difference is, i am not using SD card shield(whatsoever) and i want to use an android phone to control devices i just wanted to start using a pc to light LEDs… like you, i am also new to this kind of things. i have tried the Page host sketch from the WiFly tutorial and seem to be working fine. the only problem i have is how to make it interactive like working on buttons then pass information to the wifly. it was also introduced on the tutorial, but i wasnt able to understand the last instructions on creating an interactive buttons. could anyone please help with this…
Has anyone tested this to confirm and will this be rolled into the official package? Also, looking at the changes above, it doesn’t look like the Client/Server have been updated for 1.0 compatibility. Thanks! I’d take a stab at updating everything myself but I don’t have a WiFly shield, sorry!
I’ve not used Client/Server but if in two next weeks proably I’ll have time to touch that.
I can try to do that but I’ll like to know if my modifications works for everyone.
I’ve just begun trying to use the wifly with my Arduino Uno to decipher signal strengths, but before even connecting anything up I attempted to Verify the sketch found in “file > examples > Wifly > tools > SpiUartTerminals” and it has thrown a number of errors with the code.
SpiUartTerminal.pde:-1: error: 'class SpiUartDevice' has no member named 'print'
SpiUartTerminal.pde:-1: error: 'BYTE' was not declared in this scope
I have not been able to find any forum posts on this error, and surprisingly it never came up in this thread, despite being an initial error before I’d tried anything with it.
I so far I have been playing around with the WebClient and WebServer examples. I have my own version of the WebClient working and can pull commands from my server successfully. My problem arises after running the client for a few minutes when my client locks up. It appears to enter an infinite loop checking uart.available().
Minimizer seems to have the same issue but I haven’t seen any responses yet. Any ideas would be great.
I haven’t followed the thread too closely over the past couple of weeks, but don’t believe I’ve seen any relevant responses related to resolving the occasional hanging problems being encountered. I haven’t dug too much more deeply into the library, but believe there are possibly a couple of bugs in there somewhere. The library doesn’t appear to be particularly fault tolerant (and the comments included within would indicate the same. This is not a knock on the library at all, and all the good hard work to get it running and posted, just a realization that it’s possibly not quite at the stage one would desire it to be at for long-term unattended operation of the WiFly device).
I switched over to using an alternate library, which can be found at …
To be sure, I’ve encountered a couple of bugs here too (which I’ll admit to having an equally hard time resolving!). My impressions based on some initial testing though is that it may perhaps provide a bit more stable starting point. Good luck with your project.
I was able to track the problem done to the uart stream returning “connection FAILED” instead of “OPEN” over time but haven’t been able to figure out why or any way around it. I’ve been looking into other options as well. I don’t think I can use the Wifly Serial library you linked because I’m using the full Wifly shield instead of the break out board. I can’t easily reroute the RX/TX pins so I’m trying to find another option.
I’ve been battling the entire weekend with the WiFly shield (Connected to a Arduino UNO). I know think I’ve exhausted all possible steps in debugging this issue. I have also tried this with all versions and some forks of the code and version 0022 and version 1.0 of the IDE.
After uploading and running SpiUartTerminal.pde or the HardwareFactoryReset.pde, the serial monitor just hangs after outputting “Waiting for input:” and doesn’t allow me to enter the command line application ($$$). I’ve tried unix screen, coolterm and the standard IDE serial monitor. I’ve also tested the pins to ensure everything is connected correctly (I finally soldered them to the header pins) and I’m sure it is.
I would really appreciate some help if possible. I’m now suspecting that it is in fact a hardware issue.
glibdud:
Are there any functions available that you can use to test that the WiFly is still associated with the WLAN? I poked through the source a bit, but didn’t see anything obvious. I have it periodically checking a web page, and I’m guessing best practice is to check for association each time I go to hit it so that I can reconnect if necessary. Or does it just auto-reconnect if the connection drops? If so, can I trust that?
Thanks to the author for this library!
Did anyone find an answer to the above? At the moment, I’m setting my WiFly to reset every hour or so to avoid the ‘random hang’ issue - would be great to be able to detect when it has hung.
However the resetting is not working either… the WiFly library code seems to hang at the reboot stage. I’ve tried making it do hardware rebooting and software rebooting and neither work. I’m just sending data to pachube, not using it as a server, so I’m wondering whether anyone has an equivalent fix to the one that seems to work for the Server.cpp code?
I am working on a project where I want to connect to the arduino via telnet and send it commands that will call functions on the arduino. I can connect to the arduino through telnet but am having difficulty figuring out how to store the command sent from the command line via telnet into a buffer on the arduino that I can then string compare and call the corresponding function. Is there a library function or a a place where this string is stored on the shield? If so how do I grab it?
asummer:
I am working on a project where I want to connect to the arduino via telnet and send it commands that will call functions on the arduino. I can connect to the arduino through telnet but am having difficulty figuring out how to store the command sent from the command line via telnet into a buffer on the arduino that I can then string compare and call the corresponding function. Is there a library function or a a place where this string is stored on the shield? If so how do I grab it?
Thanks!
Better yet is there a way i can set, say digital pins 3 and 4 to be high and low using commands after connecting through telnet. I tried using the “set sys output” command but it seems that this works differently than I thought. I will ultimately have two pins switching two different relays. When I set one pin to high it will switch one relay and when I set the other pin to high it will switch the other relay. How can I perform set these pins to high and low wirelessly using the wifly shield?
Hello everyone. I have worked with the WiFly and the library for a while, especially the library as modified by jaycollet, and I’ve changed some things to make it run smoother. For one, if a connection to wireless or a computer would fail, the program no longer hangs and returns false, meaning that the connection can be tried again. If anyone would like to see/use it, I have uploaded it to Github; the address is https://github.com/jrobert755/WiFly-Shield.
asummer:
I am working on a project where I want to connect to the arduino via telnet and send it commands that will call functions on the arduino. I can connect to the arduino through telnet but am having difficulty figuring out how to store the command sent from the command line via telnet into a buffer on the arduino that I can then string compare and call the corresponding function. Is there a library function or a a place where this string is stored on the shield? If so how do I grab it?
Thanks!
Neither the WiFly nor the Arduino libraries have a standard function for what you need, per se. The WiFly shield stores all that it gets until you read it, but the message can only be read one byte at a time, so to get the whole thing, you have to keep reading and saving the bytes until you get the whole message. I am doing something very similar to what you need, though, and I can help. I am working on a project where the WiFly shield connects to a server, and they send messages back and forth, with the Arduino, once it gets the whole message, calls a function based upon what the first section of the message is. I can help you adapt it to what you need, if you would like me to.
I uploaded Wiflyautoconnnect terminal code to the arduino mega and it worked. I need to create a UDP socket in my wifly shield. Is it possible to use the wifly serial library for full wifly shield + arduino mega ? can some one suggest me an idea to implement a UDP socket ?
Where are the pin numbers defined in the Alpha 2 release?
I’d like to change the chip select from 10 to something else so I can use it in conjunction with another shield.
Also, has anyone tried sharing the SPI bus with another shield? I read somewhere else that they couldn’t get the arduino to stop trying to talk to the WiFly.