04.08.2022, 14:44
(04.08.2022, 06:53)admin Wrote: The only solution at this moment is to read the data using Lua serial library and then parse it. This library can be used for parsing: https://github.com/1nv1/luaGPS
And how do i read from the device? A quick test with:
Code:
require('serial')
port, err = serial.open('/dev/ttyUSB1')
log(port, err)
-- script will wait for 10 characters for 20 seconds
data, err = port:read(10, 20)
log(data, err)
Code:
test 04.08.2022 16:41:51
* arg: 1
* luaserial
* arg: 2
* nil
test 04.08.2022 16:42:11
* arg: 1
* nil
* arg: 2
* string: timeout