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 wrote: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.