如何以编程方式获取Lantronix XPort IP地址 [英] How to get Lantronix XPort IP address programmatically

查看:364
本文介绍了如何以编程方式获取Lantronix XPort IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常我们使用Lantronix DeviceInstaller 来获取 XPort 嵌入式以太网设备服务器的IP地址。我需要将此功能添加到Java GUI,因为Lantronix DeviceInstaller 严格来说是一个Windows应用程序,我的应用程序需要在各种版本的Windows和Linux上运行。获取Lantronix的IP地址的最佳方法是什么? XPort 不使用Lantronix的嵌入式以太网设备服务器 DeviceInstaller

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?

推荐答案

来自Lantronix技术支持部门的Michael Lyon:

From Michael Lyon at Lantronix Technical Support:


发现过程涉及将十六进制00 00 00 F8发送到UDP 30718.
如果你广播这个,所有Lantronix CobOS(包括XPort)将发送
a响应,以十六进制00 00 00 F9开头。每个
设备的响应正好是120个字节,当查询以十六进制00 00 00 F8开始时,将始终以十六进制00 00
00 F9开始。紧接在F9之后的四个十六进制值
是响应单元的十六进制IP地址。

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.

这篇关于如何以编程方式获取Lantronix XPort IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆