WiFly - send data

Hey guys,

i have two Arduino Uno Boards with each WiFly Shield plugged. On the one shield I have configured an own adhoc net. With the other shield I can me connected with this adhoc net (unfortunately only over the command mode). Now I do not know how I can send data and commands between the two shields.

To the one shield I have a LED. I want this LED respond and blink over the other shield. How do I do that? I miss the appropriate sketch or the commands on the terminal.

Has anyone an example sketch or ideas?

Regards

Si-u2

Hi,

Are you using the [WiFly Shield code library alpha 2 release?

You could try running the WiFly_WebClient sketch on one device and WiFly_WebServer sketch on the other. It’s a little bit of overkill but kinda straightforward.

The LED will be on the device running the server.

You’ll probably want to look at using the TextFinder library to parse requests on the server.

–Philip;](WiFly Shield code library alpha 2 release - SparkFun Electronics Forum)

Thank you Philip!

Yes I use the WiFly Shield code library alpha 2 release.

I will try it with the WerbServer and WebClient sketch. But I want to do over adhoc net. Does it work?

I do not understand what do you mean with the TextFinder library. Can you please explain more.

regards

Si-u2

Si-u2:
I will try it with the WerbServer and WebClient sketch. But I want to do over adhoc net. Does it work?

Good question. The library doesn’t yet have support for creating adhoc networks–you would need to modify the library to do that.

I do not understand what do you mean with the TextFinder library. Can you please explain more.

The [TextFinder library can help you parse requests like “http://10.1.1.5/light/on” to extract the “light” and “on” values so you can respond to them.

–Philip;](http://www.arduino.cc/playground/Code/TextFinder)

I have configurate an adhoc net and it work and with the other shield i can connected. But i will try it with the WebServer and WebClient to adhoc. We will see :slight_smile:

Thank you for the information about the TextFinder. I think it would help me.

For more ideas and tips i am thankful!

Si-u2

Hey guys,

the TextFinder doesnot help me.

I got the tipp to use UDP. I have configurated the shields of UDP protocoll and the connection between the shields is alive. But how i send data?

In one terminal i give a command but nothing happens and i donot see the command in the other terminal. whats wrong? Need I special commands?

Please help me!

Thanks

Si

Si-u2:
I got the tipp to use UDP. I have configurated the shields of UDP protocoll and the connection between the shields is alive. But how i send data?

In one terminal i give a command but nothing happens and i donot see the command in the other terminal. whats wrong? Need I special commands?

I wouldn’t recommend using UDP–the library doesn’t currently support UDP and the UDP protocol does not guarantee successful delivery of data.

–Philip;

Philip, you would use TCP?

Have you an example sketch?

regards

Si

Si-u2:
Philip, you would use TCP?

Yes.

Have you an example sketch?

To get started I’d just use the WiFly_WebClient and WiFly_WebServer sketches I mentioned earlier. A “telnet” style approach would be simpler but I don’t have an example sketch for that.

–Phil;