将串行设备转换为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第三方库


热门话题
Gson类中的java验证错误   If和elseif之间的java差异?   字典Java8地图。输入比较器   java连接到远程计算机以获得WMI支持   java如何使用改型处理JSON对象中的空值   在Java中使用Comparator时不可编译的源代码   java将Jar添加到JSP的运行时路径   带有随机对象的while循环的java大O时间复杂性   java可以在不考虑参数的情况下模拟方法吗?   java我有一个简单的代码,它不工作。无法修复错误“println”   向eclipse添加Xively java库   java是否可以启用本机代码的缓存?   全局变量如何在Java中的所有类之间共享要使用的语言环境?   Java内存游戏如何翻转单个卡?