将串行设备转换为TCP套接字。

serial2tcp的Python项目详细描述


安装

您可以从pip安装:

# pip install serial2tcp

或手册:

# git clone git://github.com/mosquito/serial2tcp.git # cd serial2tcp # python setup.py install

重定向USB串行

对于重定向/dev/ttyusb0(波特率9600 bps和192.168.2.1),可以连接到它:

# serial2tcp -p /dev/ttyUSB0 -b 9600 -l 0.0.0.0 –allow-list=‘192.168.2.1’

帮助

Usage: serial2tcp [options]

Simple Serial to Network (TCP/IP) redirector.

WARNING: You have to allow connections only from the addresses in the “–allow-list” option. e.g. –allow-list=‘10.0.0.1, 172.16.0.1, 192.168.0.1’ NOTICE: This service supports only one tcp connection per instance.

Options:
--versionshow program’s version number and exit
-h, --helpshow this help message and exit
-p SERIAL, --port=SERIAL
Serial port, a number, defualt = ‘/dev/tty0’
-b BAUDRATE, --baud=BAUDRATE
Baudrate, default 115200
-r, --rtsctsEnable RTS/CTS flow control (default off)
-x, --xonxoffEnable software flow control (default off)
-P PORT, --localport=PORT
TCP/IP port on which to run the server (default 9100)
-l LISTEN, --listen=LISTEN
Listen address on which to run the server (default ‘127.0.0.1’)
--access-list=ACL
List of IP addresses e.g ‘127.0.0.1, 192.168.0.2’

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jcombobox如何在java中的另一个选项卡中执行按钮操作时更新ComboBox   javascript AJAX正在使用POST映射将所有空数据发送到Spring控制器?   java使用WebPush Api部署了两次类似的战争,导致InvalidKeySpecException:无法识别密钥规范   如果值相同,则停止while循环   为什么完整数组在部分初始化时不在Java中打印?   java我可以使用@OneToMany(mappedBy=“…”)吗在@MappedSuperclass中?   在Oracle jdbc驱动程序中注册用于透明应用程序故障切换的java回调   用Java程序分发用JavaDB制作的数据库   java如何使用运算符转换字符串   Android,Java只从字符串数组中获取最后一个单词   java Bluetooth回调函数onCharacteristicRead未对另一个使用<API21的活动进行意向调用。不是在棉花糖里   java如何使用Gradle设置环境变量,而不是在Exec范围内?   JavaRSA密钥块包装器:javax。加密。BadPaddingException:解密错误   java监控弹性搜索可能的响应   java使jpa-oneToMany关系有效?   Spring应用程序中JSP中HashMap的java迭代HashMap   在或多个运营商SAP Java中   java用jsp格式发送句子(字符串)