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

最新文章

  1. Visual Studio 2012远程调试中遇到的问题
  2. python第十九天-----Django进阶
  3. const和#define 区别
  4. 总结一下一般游戏中3D模型各种勾边方法遇到的工程性问题
  5. python学习笔记四 迭代器,生成器,装饰器(基础篇)
  6. binary 和 varbinary
  7. Gvim自动编译运行c++11的程序
  8. LA 小、杂、乱题合辑
  9. Swift和Objective-C的差异性
  10. android 连接网络的简单实例
  11. 17082 两个有序数序列中找第k小(优先做)
  12. python3.7安装pylint
  13. c++入门之浅拷贝和深拷贝
  14. 「POJ 1135」Domino Effect(dfs)
  15. String类,ThreadLocal
  16. 现代编译原理--第六章(中间树 IR Tree 含源码)
  17. docker第一章:docker核心概念及centos6下安装
  18. POJ 2752 Seek the Name, Seek the Fame(next数组运用)
  19. 超强干货,11个灰常实用的AI设计小技巧!
  20. linux达人养成计划学习笔记(三)—— 帮助命令

热门文章

  1. springframework resource
  2. hdu 3899(树形dp)
  3. C++引用具体解释
  4. php 快速读取文件夹下文件列表
  5. 在线制作logo
  6. UE4插件
  7. 下载Qt安装包
  8. dede标签:arclist标签使用大全
  9. ERR_PTR,PTR_ERR还有IS_ERR函数详解
  10. mysql 浏览器submit中文, shell乱码