Erlang串行IO [英] Erlang serial IO

查看:190
本文介绍了Erlang串行IO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想和我的调制解调器和erlang通话。它被安装为/ dev / ttyUSB,完全理解AT命令。




  • 我可以从设备中读取和写入标准文件模块?


  • 波特率,字节数,奇偶校验,RTS / CTS,DSR / DTR等如何?


  • 有没有任何与tonyg-erlang-serial-1.0有关的经验? (我不太相信这个包,因为它在自述中说:这是一个端口程序与erlang驱动程序的串行通信,
    最初是由Johan Bevemyr在1996年写的,偶然的
    由Tony Garnock维护 - 从2007年起的人物。


  • 在erlang中串行I / O的常见做法是什么?



解决方案

所以对于erlang来说显然没有串行通讯库,我现在不得不再次挖出python,使用pyserial, python线程来自erlang并通过stdin进行通信。



如果有人知道更好,请给我证明错,我希望有erlang本机串行I / O。


I want to talk to my modem with erlang. It is mounted as /dev/ttyUSB and perfectly understands AT-commands.

  • Can I read and write from the device with the standard file module?

  • How about baudrate, bytesize, parity, RTS/CTS, DSR/DTR and the like?

  • Have you any experiences with tonyg-erlang-serial-1.0? (I am not too convinced of this package as it says in the readme: "This is a port program with erlang driver for serial communication, originally written by Johan Bevemyr in 1996 and sporadically maintained by Tony Garnock-Jones from 2007 onwards."

  • What is the common practice for serial I/O in erlang?

解决方案

So there is apparently no serial communication library for erlang. I now had to dig up python again, use pyserial, spawn the python threads from erlang and communicate via stdin.

If anyone knows better, please proof me wrong. I would love to have erlang native serial I/O.

这篇关于Erlang串行IO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆