Announcement

Collapse
No announcement yet.

New Sample: Lantronix Device Discovery

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Sample: Lantronix Device Discovery

    As suggested by bitpacker, we have created sample code which demonstrates how to query a local subnet for available Lantronix devices.

    The attached zip file contains the sample source code with Microsoft Visual Studio 2005 project files. A prebuilt EXE for Windows is also included in the release subdirectory.
    Attached Files

  • #2
    I follow the example just fine, and I know that the DeviceInstaller actually uses an FTP connection to download the device information, but could someone post a listing of the type codes that we get from this discovery process? The contents of bytes 8 and 9:

    XPort-Pro = 0x45-0x35 or 69-53
    MatchPort b/g Pro = 0x41-0x39 or 65-57
    Matchport-AR = 0x41-0x38 or 65-56

    Thanks,
    J
    Last edited by joshjack; 01-26-2010, 02:14 PM.

    Comment


    • #3
      I follow the example just fine, but when I set a wrong IP address and subnet to the device. My application will never get any messages from the device. So I can't able communicate to the device and not able get the device and unable to change the IP address etc.

      Say example
      IP address of the device 20.1.1.1
      Subnet Mask 255.0.0.0

      And in my system that runs the application

      IP addres 192.168.1.23
      Subnet Mask 255.255.255.0



      I tried the Lantronix device installation software and Lantronix device in network. It listed the device from the network and I am capable to change the IP address from device installer software



      Any one know how this is done in this software? How I can search in network to find the device and change the IP address when its IP address is not in range? Which protocol they used to find the device?

      Comment


      • #4
        I to am curious to know if there is a method to discover and change the IP adres is out of the range...

        Comment


        • #5
          When you send a message via the IP address, the last router does the IP to MAC address conversion to put the packet on the final network.

          If you're physically on the same network as the device that you're trying to access, your computer is doing that translation. It keeps an ARP table to resolve IP to MAC address.

          So let's say that your device has a bad IP address, but is connected to the same subnet you are. Then what you need to do is inject that device's MAC address into your ARP table, and you can access it.

          Code:
          arp -s yyy.yyy.yyy.yyy 00-20-4a-xx-xx-xx -N nnn.nnn.nnn.nnn
          Replace:
          yyy with an IP address on your subnet range
          xxx with the hardware address of the Lantronix device
          nnn with the IP address of your PC's network interface that is on the same subnet as the device you're trying to get to.

          Then you can get to the device via the IP address that you assigned to it in the ARP table (the yyy value)

          Comment

          Working...
          X