|
ThankyouAn this is the error. I'm sure tha port ttyUSB0 is in use and readyThis is my program:Now i'm trying to use rs232 library.All of them with no errors.4) From luarocks i installed rs2322) Luarocks (last version) from scratch (compiling and installing)1) Lua (last version) from scratch (compiling and installing)Ok Pierre.I installed :
3) realine-devel from dnf pakage manager (Fedora 25)
local rs232 = require "rs232"
local p, e = rs232.port('ttyUSB0',{
baud = '_57600';
data_bits = '_8';
parity = 'NONE';
stop_bits = '_1';
flow_control = 'OFF';
rts = 'ON';
})
p:open()
print(p:write('AT\r\n'))