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. freemarker include 和 import

    lib/my_test.ftl 模板内容如下: <#macto copyright date> <p>Copyright (C)${date}Julia Smith.All r ...

  2. hdu 4708(暴力+找规律)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4708 思路:由于N不大,并且我们可以发现通过旋转得到的4个对角线的点的位置关系,以及所要旋转的最小步数 ...

  3. Foundation框架中的NSNumber对象详解

    到目前为止,我们所讨论过的所有数字数据类型,如int型.float型和long型都是Objective-C语言中的基本数据类型,也就是说,它们都不是对象.例如,不能向它们发送消息.然而,有时需要作为对 ...

  4. 指针与C++基本原理

    面向对象编程与传统的过程性编程的区别在于,OOP强调的是在运行阶段(而不是编译阶段)进行决策.运行阶段指的是程序正在运行时,编译阶段指的是编译器将程序组合起来时.运行阶段决策就好比度假时,选择参观那些 ...

  5. 一、Android Studio入门——Eclipse快捷键配置

    [Studio总体介绍] 第一个是运行. 第二个是Debug.  是Studio的设置界面.   工程的配置.   Sync,更改配置.导入JAR包,都会去Sync一次.   SDK Manager. ...

  6. 160615、Spring3 MVC 拦截器拦截不到的问题

    昨天项目组有个成员使用拦截器的时候发现不起作用,后来发现了原因,在这里跟大家分享一下(主要是冲突了).分享的是一位网友写的文章,他总结的很好. com.zk.interceptors.MyInterc ...

  7. QA规范

    规范流程: 1)拿到需求,分析需求,先写一版checklist: 2)进行codediff,过程中最好一行行代码review,尽早发现代码错误或代码逻辑不完善的地方,codediff之后修改check ...

  8. poj3585 Accumulation Degree【树形DP】【最大流】

    Accumulation Degree Time Limit: 5000MS   Memory Limit: 65536K Total Submissions:3151   Accepted: 783 ...

  9. CEF3 HTML5 audio标签为什么不能播放mp3格式的音频文件

    CEF3 HTML5 audio标签 为什么不能播放mp3格式的音频文件   原因略.   解决方法: 找一个最新版的chrome ,我用的是24版本.路径 C:\Documents and Sett ...

  10. Spark源码分析 – BlockManager

    参考, Spark源码分析之-Storage模块 对于storage, 为何Spark需要storage模块?为了cache RDD Spark的特点就是可以将RDD cache在memory或dis ...