期待更换
我想在嵌入式平台上使用通过串行端口连接的调制解调器。
以下是我迄今为止拒绝的一些解决方案:
期望加上终端程序:
我的(跨)构建系统没有任何expect的包规则,并且根据expect源的安装说明,配置脚本需要是交互式的,因为它对调用它的终端进行了一些测试。Thid看起来不就像交叉编译时你想做的事情一样。Python 加 pyserial: 我很想使用这个,但是整个东西的大小不适合我有限的闪存空间。
聊天(来自 pppd 包): 好吧,我可以尝试一下,但它非常非常有限
所以我正在寻找某种轻量级、可嵌入的期望替代品。我对lua一无所知。它会是像 scipting 这样的 Expect 的良好候选者吗?
I want to work with a modem interfaced on a serial port on an embedded platform.
Here are some solutions I have rejected so far :
Expect plus a terminal program :
My (cross)build system does not have any package rules for expect, and according to the installation instructions from the expect sources, the configure script needs to be interactive because it does some test with the terminale it is invoked in. Thid does not look like something you want to do when cross compiling.Python plus pyserial :
I would love to use this, but the size of the whole thing won't fit on my limited flash space.Chat (from the pppd package):
Well, I may give it a try but it is very, very limited
So I am looking for some sort of lightweight, embeddable expect replacement. I have no knwoledge of lua. Would it be a good candidate for expect like scipting ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,Expect 只是 Tcl 加上扩展,用于通过伪终端驱动其他程序并对结果进行模式匹配。如果您只想驱动串行端口,您可以删除外部终端程序并让 Tcl 直接驱动串行端口 - 请参阅 示例代码。另请参阅有关交叉编译的 Tcl Wiki 页面。
Well, Expect is just Tcl plus extensions to drive other programs via pseudo-terminals and do pattern-matching on the results. If you just want to drive a serial port you can drop the external terminal program and have Tcl drive the serial port directly - see sample code. See also the Tcl Wiki page on cross-compiling.