Hi,
I have a problem in communication over UART. I'm using ARM Cortex with several PIR sensors on one end and TP-Link MR3020 with 3g dongle on the other for monitoring movement in a warehouse. System is collecting data from sensors and sending them over 3g on my server in a form of text file. What is the problem? Sometimes the transmitted data is OK, and sometimes is incomplete. I'm using echo command to write and append into file. Correct report file looks smth like this:
sensor 1: no activity
sensor 2: no activity
sensor 3: movement detected
sensor 4: no activity
But, in 3/10 cases I receive this:
sensor 1: no activity
sensor
sensor 3:
se
I'm not getting random data, just some parts missing. Beginning of the string is always transmitted, but not the end. I tried changing speed from 115200 to 19200, tried changing cable (some 4 inches long Cat 5 cable) and nothing helps. Can I change (increase) serial buffer size somehow? Or do you have some other idea? Optocouplers are up to 1 MHz so that shouldn't make any problems. Maybe 3.3V levels are too low, but it's 4 inch distance - so I don't think that's too much. Thank you.
(Last edited by jagodica on 25 Apr 2013, 09:31)