30.09.2019, 09:40
ModBus won't work like this as ModBus TCP is a different protocol.
If you are calling socket:receive() without any arguments it will try to read a whole line ending with \n character. For binary protocols this won't work correctly. You can read data by one byte at a time: byte, err = socket:receive(1)
If you are calling socket:receive() without any arguments it will try to read a whole line ending with \n character. For binary protocols this won't work correctly. You can read data by one byte at a time: byte, err = socket:receive(1)