我尝试使用 XMODEM 从屏幕终端向串行设备发送文件。对于小文件(633 字节),它工作正常,但当我尝试发送较大的文件(3.3 千字节)时,它失败了。
这是两次连续的尝试:
eLua# recv /wo/hello.lua
Waiting for file ... CCCSending Documents/Telit/HelloT2.lua, 25 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 0/ 0kRetry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: Retry Count Exceeded
Transfer incomplete
XMODEM error
eLua# recv /wo/hello.lua
Waiting for file ... CCSending Documents/Telit/HelloT2.lua, 25 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 0/ 0kRetry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: NAK on sector
Retry 0: Cancelled
Transfer incomplete
error
据我所知,应该通过禁用软件流控制 (XON/XOFF) 来解决这个问题,但我已经尝试了几种方法,但仍然不起作用。我试过:运行“stty -xon -xoff”,在屏幕中输入“Ca, f”(尝试了所有模式:“+flow”、“-flow”和“+flow(auto)”),以及使用屏幕的命令行参数“-fn”。这些似乎都无法解决问题。
答案1
如果您打算将 Lua 脚本发送到带有支持 Lua 固件的蓝牙模块的 Telit BlueMod+S42,则应启用硬件流控制。顺便说一句:查看您的日志,您可能使用了过时的固件版本,并且可能会更新模块