How to get Lantronix XPort IP address programmatic

2019-05-04 13:22发布

Typically we use Lantronix DeviceInstaller to get the IP address of an XPort Embedded Ethernet Device Server. I need to add this feature to a Java GUI since Lantronix DeviceInstaller is strictly a Windows application and my application needs to run on various flavors of Windows and Linux. What is the best way to get the IP address of a Lantronix XPort Embedded Ethernet Device Server without using Lantronix DeviceInstaller?

标签: java ip
1条回答
Root(大扎)
2楼-- · 2019-05-04 13:31

From Michael Lyon at Lantronix Technical Support:

The discovery process involves sending hex 00 00 00 F8 to UDP 30718. If you broadcast this, all Lantronix CobOS (including XPort) will send a response that starts with hex 00 00 00 F9. The response from each device is exactly 120 bytes and will always start with the hex 00 00 00 F9 when the query starts with hex 00 00 00 F8. The four hex values immediately after the F9 are the responding unit's IP address in hex.

查看更多
登录 后发表回答