Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: priyamkar1990 on Apr 16, 2017, 07:00 am

Title: ethernet shield for arduino and udp message recieption
Post by: priyamkar1990 on Apr 16, 2017, 07:00 am
anyone who has used ethernet shield with arduino and used the UDP send receive sketch ,please let me know . cause i am getting something over the serial console which i have no idea it is . i am attaching the screen shots
thank you!
Title: Re: ethernet shield for arduino and udp message recieption
Post by: SurferTim on Apr 16, 2017, 01:12 pm
I use UDP with the w5100 ethernet shield. No problems here.

What program is the sending device using? Maybe this?
https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol (https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol)
Title: Re: ethernet shield for arduino and udp message recieption
Post by: priyamkar1990 on Apr 16, 2017, 02:10 pm
the thing is that the computer itself sending these things to the arduino irrespective of the ON or OFF condition of the actual device which is supposed to send data.
Title: Re: ethernet shield for arduino and udp message recieption
Post by: SurferTim on Apr 16, 2017, 02:26 pm
Then stay away from port 1900. Is that what you are using? Are you using UPnP? Is that why you are using port 1900?
Title: Re: ethernet shield for arduino and udp message recieption
Post by: priyamkar1990 on Apr 16, 2017, 06:06 pm
first of all i can find four port numbers corresponding to my local area connection. if i use the port number 1900 then only i can see something . one of the other three port number changes continuously.

the second thing is i m using a software in the same computer which has some OSC controller module which sends UDP messages to the OSC server. and i am currently trying to use the arduino as OSC server uploading the sketch UDP send receive string.
 
am i doing it in the right way? 

and what should i use instead of port number 1900 so that i can avoid UPnP
Title: Re: ethernet shield for arduino and udp message recieption
Post by: SurferTim on Apr 16, 2017, 06:17 pm
The source port may change. Which port is your OSC on? It should be like port 8000 or 9000.
Title: Re: ethernet shield for arduino and udp message recieption
Post by: priyamkar1990 on Apr 16, 2017, 06:35 pm
sir i dont know how to find the OSC port. in my software the OSC controller box  only asks for the OSC server port number, OSC server ip address , OSC address and if i am not wrong my arduino is working as OSC server.so i am setting the OSC server port number and OSC server ip address as my local area connection
one thing i would like to mention the default value of the OSC server address was 9001   
Title: Re: ethernet shield for arduino and udp message recieption
Post by: SurferTim on Apr 16, 2017, 06:36 pm
Then you should use another port besides 1900. Try port 9001.
Title: Re: ethernet shield for arduino and udp message recieption
Post by: priyamkar1990 on Apr 16, 2017, 06:42 pm
i tried using the port number as 9001 on both sides but it does not help me, i cant see anything over the serial console
using the port number 1900 only makes the server work but dont show any data.
one more thing i would like to mention even if i change the ip address to some random values instead of the ip address of the local network in the sketch , the server  still works and shows that the packet received from the ip address of the local network, but if change the port number the the server does not work.
it seems the sever never gets connected to the OSC client.
Title: Re: ethernet shield for arduino and udp message recieption
Post by: SurferTim on Apr 16, 2017, 07:50 pm
May I suggest Wireshark to monitor packets on the localnet. you have something in your setup that is incorrect/conflicting.