Announcement

Collapse
No announcement yet.

Lantronix Device Installer Search implementation using UDP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lantronix Device Installer Search implementation using UDP

    I am not sure if this is the right place for this question. but since I write my application using Lantronix device I thought to post it here.

    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 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 one month 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!

  • #2
    Do you have a Wireshark capture of this? Can you see if the packet is getting across the router? Not sure if this is a .NET issue or what is going on.

    Comment


    • #3
      I checked with wire shark It is showing the data packets. But not in my C# application.

      [ This is not any issue with the Lantronix device. But I want to know the technique of how this Lantronix device installer software capturing the data packets from other subnet. Is there any sample code available in any programming language? ]
      Last edited by arunkumaraymuo; 11-15-2013, 03:54 AM.

      Comment


      • #4
        I believe that DI is using a command to set the ip address using a broadcast. Here are the details of that command

        FC
        Set IP address:
        Parameter: the 1st 8 Byte must contain the ASCII-sequence„IP-SETUP“
        (Hex 49 50 2D 53 45 54 55 50).
        The next 2 bytes have to be set to 00
        The next 2 bytes must contain the last 2 bytes of the MAC Address
        The next 4 bytes have to be the NEW IP-address
        This block can be sent as a broadcast, because the MAC address is unique. There exists no acknowledge for this block. After setting the IP-address the node makes a reset.
        Example (all in hex):
        49 50 2D 53 45 54 55 50 00 00 2A 12 81 00 01 02
        IP address of the node with MAC address xx-xx-xx-xx-2A-12 set
        to 129.0.1.2

        This is documented in our setup record doc.

        Comment

        Working...
        X