jcurl / RJCP.DLL.SerialPortStream

SerialPortStream is an independent implementation of System.IO.Ports.SerialPort and SerialStream for better reliability and maintainability. Default branch is 2.x and now has support for Mono with help of a C library.
Microsoft Public License
628 stars 197 forks source link

Receiving 00 Bytes on Linux-ARM #43

Closed 3dGrabber closed 6 years ago

3dGrabber commented 6 years ago

I'm trying to use this device as a Modbus master. Communication seems to work partially: for each request I receive a response with the expected number of bytes. However those bytes are all 00s!

Tx: 02-04-03-E7-00-35-80-5D

// expecting a 332 Bytes response

Rx: 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
LEN: 332

(The slave answers correctly when queried from another device)

3dGrabber commented 6 years ago

Just recompiled with LOG enabled,
did not find anything suspicious though:

2017.11.27-12:04:35.113197      6       /dev/ttyUSB0    open: succeeded
2017.11.27-12:04:35.120704      7       /dev/ttyUSB0    setproperties: getting attributes
2017.11.27-12:04:35.121406      7       /dev/ttyUSB0    setproperties: setting attributes
2017.11.27-12:04:35.123604      7       /dev/ttyUSB0    setproperties: setting attributes done
3dGrabber commented 6 years ago

closing this because I suspect that it is a driver issue.
Sorry for the confusion

jcurl commented 6 years ago

Sounds like the problem I documented on the wiki. https://github.com/jcurl/SerialPortStream/wiki/Driver-Compatibility-with-SerialPortStream#Garbage_Data_on_Start