Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working with a Lantronix Ethernet to Serial adaptor, With code in C#.NET. This device accepts UDP datagrams in order to allow to set up it's IP address. By using broadcast UDP to 255.255.255.255 on port 30718, we can send a datagram that discovers the device(s). All devices on our physical network will respond with their IPs and we can resolve their MAC addresses from the packets that bounce back from them. Once we discover a particular device's current IP address, we can send another UDP datagram to that device's IP address on port 30718 in order to change the device's IP to some other address. This works fine when the original IP address that the device was set to is on the same logical subnet as in our computer. When you send the UDP datagram to a device that is on another logical subnet, but on the same physical network, the UDP packet gets sent to the router that is between the computer and the device;

The strange thing is that the manufacturer (Lantronix) also provides a programming utility(Lantronix device installer) for this same function and somehow it can send the packet to the other logical subnet and receive the response. The device IP can be easily changed every time no matter what logical subnet it's on.

Does anyone know how to do this in my application. I have spent three more weeks on this issue and may just resort to embedding the manufacturer's utility into my application with my setup project. It would be great to fix my current code to send a UDP packet to another logical subnet and receive the response.

Thanks for any help!
Posted
Updated 27-Oct-13 20:00pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900