https://www.acmesystems.it/socat

This article illustrates how to realize a lan to serial gateway

Remote unit

On the remote unit install ser2net then add this line in /etc/ser2net.conf configuration file

2000:raw:600:/dev/ttyS1:115200 8DATABITS NONE 1STOPBIT

Launch ser2net:

# ser2net

Local unit

Install the socat utility.

Create a directory called $HOME/dev

Launch socat:

$ socat pty,link=$HOME/dev/ttyV0,waitslave tcp:remoteip:remoteport

Open minicom on /dev/ttyV0 and send chars to your remote port.

Examples

Serial port on stdin

socat /dev/ttyUSB0,b115200,raw,echo=0,crnl -

Remote console

Board

socat /dev/ttyS2,b115200,raw,echo=0 TCP:terzo.acmesystems.it:2002
socat /dev/ttyS4,b115200,raw,echo=0 TCP:terzo.acmesystems.it:2004

Server web

socat TCP-LISTEN:2002 PTY,link=ttyV2,raw,crnl
socat TCP-LISTEN:2004 PTY,link=ttyV2,raw,crnl

Links

Sergio Tanzilli 
System designer, software developer and company co-founder 
tanzilli@acmesystems.it 
Webpages: https://www.acmesystems.it and http://www.tanzolab.it 
Github repository: https://github.com/tanzilli and https://github.com/acmesystems

Connecting to a Remote Serial Port over TCP/IP的更多相关文章

  1. Java JDBC连接SQL Server2005错误:通过port 1433 连接到主机 localhost 的 TCP/IP 连接失败

    错误原因例如以下: Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cann ...

  2. 【TCP/IP 合约】 TCP/IP 基金会

    总结 : 通过学习 TCP/IP 基础, 并总结相关笔记 和 绘制思维导图 到博客上, 对 TCP/IP 框架有了大致了解, 之后開始详细学习数据链路层的各种细节协议, 并作出笔记; 博客地址 : h ...

  3. Serial Port Programming on Linux(转载)

    This is a tutorial on how to program the Serial Ports on your Linux box.Serial Ports are nice little ...

  4. Serial Port Programming using Win32 API(转载)

    In this tutorial we will learn How to communicate with an external device like a microcontroller boa ...

  5. ROS 进阶学习笔记(12) - Communication with ROS through USART Serial Port

    Communication with ROS through USART Serial Port We always need to communicate with ROS through seri ...

  6. select/poll/epoll on serial port

    In this article, I will use three asynchronous conferencing--select, poll and epoll on serial port t ...

  7. [转]How Can I Find Out What Is Using a Busy or Reserved Serial Port?

    转自:http://digital.ni.com/public.nsf/allkb/29B079481C5ECE76862578810082394E How Can I Find Out What I ...

  8. 串口总是报'Error opening serial port'

    Comm1.CommName := '//./' + Trim(combx_Port.Text); 目前串口大于20  用上面方法解决的 网上也有上面方法解决如下错误的. 若是您已会应用SPCOMM且 ...

  9. Unable to open serial port /dev/ttyUSB0

    ubuntu12.04使用USB转串口时出现权限不够问题,如下 Unable to open serial port /dev/ttyUSB0 权限不够 解决办法: 通过增加udev规则来实现.步骤如 ...

随机推荐

  1. 《Linux实验要求》

    实验 1:登录和使用基本的 Linux 命令 实验环境: 安装了 Red Hat Enterprise Linux 6.0 可运行系统,并且是成功验证系统. 有另外一个无特权用户 student,密码 ...

  2. Python学习笔记5-元组Tuple

    tuple和list非常类似,但是tuple一旦初始化就不能修改,它也没有append(),insert()这样的方法.其他获取元素的方法和list是一样的 元组是用圆括号括起来的,其中的元素之间用逗 ...

  3. 【BZOJ2525】[Poi2011]Dynamite 二分+树形DP

    [BZOJ2525][Poi2011]Dynamite Description Byteotian Cave的结构是一棵N个节点的树,其中某些点上面已经安置了炸.药,现在需要点燃M个点上的引线引爆所有 ...

  4. python--get_data_from_csv_or_txt

    一.从csv文件中获取 import osimport csv class GetDataFromCsvFile(): def __init__(self, csv_file, params_list ...

  5. HDU3658—How many words

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3658 题目意思: 题目的意思是在52个英文字母里面选择m个字母组成一个字符串,满足以下两个条件.第一是 ...

  6. Apache Kafka源码分析 – Controller

    https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Controller+Internalshttps://cwiki.apache.org ...

  7. SqueezeNet

    虽然网络性能得到了提高,但随之而来的就是效率问题(AlexNet VGG GoogLeNet Resnet DenseNet) 效率问题主要是模型的存储问题和模型进行预测的速度问题. Model Co ...

  8. okhttp发送post请求

    String url = "http://www.xxx.com/api/test"; OkHttpClient httpClient = new OkHttpClient(); ...

  9. myeclipse中更改web项目在tomcat中部署的路径

    右键点击项目名称,选择属性properties,选择myeclipse->web.更改web context-root就可以.

  10. CentOS yum 安装node.js

    第一步: curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash - 第二步: sudo yum -y i ...