本文主要是介绍Lantronix xPico-WIFi + CPR Manager 创建虚拟串口,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目录
1,本文主要介绍Lantronix xPico-WiFi 和CPR Manager做虚拟串口的配置方法。
2,配置Lantronix CPR Manager。
3,配置Lantronix xPico-WIFI.
1,本文主要介绍Lantronix xPico-WiFi 和CPR Manager做虚拟串口的配置方法。
逻辑结构:
CPR Manager作为TCP Server,安装在Windows计算机,并监听开启的端口号。
Lantronix xPico-WIFI 配置为TCP Client,配置WIFI模块连接到CPR Manager。
2,配置Lantronix CPR Manager。
添加一个新的Com port
Com port settings,
TCP Port 可自行配置,作为TCP Server的监听端口号。
Listen Mode
If selected, CPR listens on the configured TCP port for incoming connection requests. There are two kinds of Listen Mode. From the drop-down list, select one of the following:
Normal - port closed after disconnect: The TCP port will close once the connection to the device server is broken.
Auto- back to listen mode after disconnect: CPR goes back into listen mode once the connection is broken.
推荐使用Normal
TCP Keepalive: 设置为60000ms,CPR Manager每60s发送一个存活探测包到WIFI模块,如果WIFI模块没有返回,则会重复发送5次,如果仍然没有返回响应,CPR将会按照Normal的规则执行断开。
CPR uses the TCP protocol to detect when connections are no longer valid. To enable this capability, select the checkbox. (See the device server's user guide for more information.)
KeepAlive Time (msec)
The time, in milliseconds, that TCP will poll the connection with the device server.
KeepAlive Interval (msec)
If TCP detects a connection failure, it will poll for the connection every KeepAlive Interval milliseconds that you specify here. If, after 5 tries, the connection is still invalid, TCP will notify CPR, and CPR will tear down the connection socket.
If the CPR port was configured to be in Listen Mode - Auto, the CPR port will go back to listening on the appropriate TCP port.
保存配置:
3,配置Lantronix xPico-WIFI.
登陆到WIFI模块SoftAP,无线连接密码:XPICOWIFI
登陆到WIFI模块网页:192.168.0.1 用户名admin,密码PASSWORD
用quickconnect连接模块到无线AP,
配置Tunnel1, Connect
配置说明:
1,设置Mode 为always
2,设置Local Port为固定端口号,如果不设置该参数,WIFI模块会随机使用端口作为源端口与CPR Manager建立连接。
3,Host1 address,设置CPR Manager安装的电脑IP地址,
4,Port,CPR Manager监听的端口号,若无法连接,需要将端口号添加到白名单中。
5,Reconnect Time,若TCP连接断开,WIFI模块主动发起重连的间隔时间。
测试:
选中Com 9, 然后连接com 9 tests, 点击Open,如果连接成功,则会显示 Com 状态,并且可以看到连接的IP地址。
这篇关于Lantronix xPico-WIFi + CPR Manager 创建虚拟串口的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!