I communicate with Modbus RTU over Uart4.
I use a RS232/RS485 Converter.
At the PC no Problem, but on the BBB I receive not the complete answer.
I receive only 120 to 123 bytes. But it shouldbe 157 bytes.
It seems I lost some bytes from the end of the answer.
In the Linux PC it works without problems.
I set the serial to raw.
Has someone tried similar steps?
I’ve used an RS-232 to 485 converter with the BBB, and it works acceptably for my needs. The major problem I have is that Linux and the OMAP serial drivers are hopelessly slow. Input is interrupt-driven, so I’m not losing any input. But if I try to output packets with timing limits needed by Modbus, it can’t be done. It’s not the hardware–the device I’m talking to on the other end is a cheap AVR running at 8MHz, and it can handle it just fine, because it doesn’t have a huge OS in the way.
Since I was in control of both ends, I solved the issue by abandoning Modbus protocol and made my own more timing-tolerant one. How to solve your particular problem would depend on your needs.
Many thanks for your answer!
I have electric meter in the other side. Baud is 9600.
My problem is receiving and not sending.
Each request was answered.
And you mean the BBB receiving is fast enough? Should I set Baud down to 2400?
I also want to try Termination. Just have 10m but maybe this is a problem.
I had no trouble receiving, even at 19200. What kind of software are you using? Is it just doing standard read()s from OS?