UDPSendReceiveString help

hi everyone I got my new Ethernet Arduino shield and uploaded the (UDPSendReceiveString) example and worked successfully but i want to make a home automation system ( controlling LED when a specified string text comes ). when i push the button in my UDP sender program a string text "LED1ON" will be sent to the Arduino board. I tried many times to use if statement to check if this string text "LED1ON" has been received or not but the LED doesn't work. I can't solve this problem (it's good only when sending single character and searching for it in the whole (packetBuffer) array. But it doesn't work for string text :o ) !!. could anybody help me to solve this problem ? Thanks.

It works for me. Post the code you are trying.

SurferTim: It works for me. Post the code you are trying.

I am using the (UDPSendReceiveString) example with single if statement only at the end of the loop could you send me your sketch ?

I could, but it doesn't do any good unless I know what is on the other end.

The UDPSendReceiveString is a misnomer. It is actually UDPReceiveSendString. It receives a UDP packet and responds to the IP and port that sent the packet with the word "acknowledged". What device/code is sending the UDP packet to the ethernet shield? What does it receive as a response?

SurferTim: I could, but it doesn't do any good unless I know what is on the other end.

The UDPSendReceiveString is a misnomer. It is actually UDPReceiveSendString. It receives a UDP packet and responds to the IP and port that sent the packet with the word "acknowledged". What device/code is sending the UDP packet to the ethernet shield? What does it receive as a response?

yes, I know that. I said before that everything is working and the word "acknowledged" received successfully. The only problem is i want to run a LED when receiving a string text "LED1ON".

Check the contents of packetBuffer for the string "LED1ON" with strcmp or strncmp.