I am communicating with a PLC with modbus on a 485 line powered by a uart. I have implemented only of subset of the modbus protocol, only functions 0x03 and 0x10. When sending 0x03, request read of holding register, i do not get a Uart_DataReceived event. I have scoped the 485 line and see the response from the PLC. If I poll with:
var bytesReceived = aUart.Read(buf, 0, aUart.BytesToRead);
I do indeed read the modbus packet. Even though I dont get the received data event, I do receive the data.
If I connect another device on the 485 line, and it sends data, I do get the event.
Any thoughts ??