[Gambas-user] Serial and Multiserial Problem
dimitris tsiou
dgtsiou at ...67...
Fri Jan 11 14:47:39 CET 2013
Hello to everyone, I wish you a happy new Year!
I am gambas user at about 4 months and I am developing a system for control automation on a Ubuntu 10.04. I'm using the Gambas 2.21 runtime. I have also tried Ubuntu 11.04 for my application. The problem's description is as follows:
An AVR micro polls for some sensor signals and sends asynchronous msgs to the ubuntu PC via /dev/ttyS0. The PC is also communicates with other devices via serial port lines using a multi-serial 4-port RS-232 (PCI card).
After 2-3 hours of normal operation the Control program, running on the ubuntu PC, receives corrupted/no data from the micro. Initially, I was using the event based mechanism for the data reception with Sport_read() event. When the aforementioned problem was raised, I changed my design and I removed the Sport_read by creating an idle event (with a timer event every 300 msecs) and executing READ calls in order to receive micro's data. After Read, the data manipulation is following.
Unfortunately the same problem remains with data received by gambas application. I have already checked the messages transmitted from the micro with cutecom/minicom and it seems that everything is ok (messages successfully delivered).
When I restart the PC (Not the application!) then everything works fine again for another time interval of 3-4 hours.
Has anyone an idea why this happens? Every answer will be really valuable for me.
Thank you in advance
More information about the User
mailing list