lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, 14 Sep 2013 02:57:11 +0530
Jayanth Acharya <jayachar88@gmail.com> wrote:

> Presently I am using the library/module "luars232" installed via
> luarocks. I am using this on a Debian Linux machine, on the
> USB-serial port "/dev/ttyUSB0".
> 
> I can access this port perfectly well using tools like picocom or
> minicom, i.e. have proper bi-directional communication.
> 
> However, when I try this snippet:
> 
> [code]
> rs232 = require("luars232")

assert(rs232, "ERROR: nil rs232")

> 
> port_name = "/dev/ttyUSB0"

assert(port_name, "ERROR: nil port_name") --probably needless, but...

> 
> local e, p = rs232.open(port_name)

assert(e, "ERROR: nil e")
assert(p, "ERROR: nil p")

> print(e, p)
> [/code]

By doing this, you get a feel for exactly when things start going
south, and you can zero in on the problem.

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance