472,975 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,975 software developers and data experts.

[pyserial - winXP] Serial port stop receiving data after a few hours, raise no error

Hello,

My soft passively listen to a device sending +- 300 bytes of data each
second. After several hours of work, the soft abruptly stops receiving
data without any error, (while the device sends properly, of course)
and I need to restart it (the python soft) to "reactivate" the ports.

I read that when the serial port encounters an error (frame error or
so, I imagine?) it stop receiving data until the library function
"getCommError()" is called.

Am I on the good track? Can I call this function from my pyserial
code?

Why pyserial does'nt raise a serial.SerialException in this case?
Notes:
---------
I'm not working with plain serial ports, I use serial over USB (FTDI
or so) and serial over Ethernet (moxa.com).
I'm in 115k 8N1 and I use 4 ports simultaneously
I use python 2.4 with pyserial 2.2 on Windows XP.
TIA,
Paul André

Jun 6 '07 #1
2 4222

I read that when the serial port encounters an error (frame error or
so, I imagine?) it stop receiving data until the library function
"getCommError()" is called.

Troels:
I think you are right
Am I on the good track? Can I call this function from my pyserial
code?
Why pyserial does'nt raise a serial.SerialException in this case?

Troels:
Well , you have the source, don't you ?
The serial lib has a handle somwhere.
Call getCommError with that ? Or ?

tpt
Jun 6 '07 #2
<pa*******@gmail.comwrote:
>Hello,

My soft passively listen to a device sending +- 300 bytes of data each
second. After several hours of work, the soft abruptly stops receiving
data without any error, (while the device sends properly, of course)
and I need to restart it (the python soft) to "reactivate" the ports.

I read that when the serial port encounters an error (frame error or
so, I imagine?) it stop receiving data until the library function
"getCommError()" is called.

Am I on the good track? Can I call this function from my pyserial
code?

Why pyserial does'nt raise a serial.SerialException in this case?
Notes:
---------
I'm not working with plain serial ports, I use serial over USB (FTDI
or so) and serial over Ethernet (moxa.com).
I'm in 115k 8N1 and I use 4 ports simultaneously
I use python 2.4 with pyserial 2.2 on Windows XP.
ooooh! - I am not sure of this, but I have heard rumours that
the USB drivers are responsible...

Its unlikely to be the Python - so far when I have had Serial
Hassles - its been either finger trouble on my part, or some
underlying thing freaking out - four ports at 115200
means a char potentially every 21 microsecs - not quite trivial.

- Hendrik

Jun 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: engsol | last post by:
Has anyone done a script that will rspond to the serial com port(s) receive buffer interrupt, as opposed to polling and timeouts? Win2000 is the main interest right now. Thanks Norm B
2
by: kamarudin samsudin | last post by:
Hi all, I try to invoke python serial script via my browser using PHP (exec function). For the serial communication, i used pySerial module. It fine when it run it as root but when i try to run...
13
by: Bob Greschke | last post by:
We have some equipment that communicates at 57600 baud RS232. The path from the PC is USB to a Phillips USB hub, then off of that a TUSB3410 USB/Serial converter. The driver for the 3410 chip...
6
by: googlinggoogler | last post by:
Hiya, I've got a PIC microcontroller reading me humidity data via rs232, this is in ASCII format. I can view this data easily using hyperterminal or pyserial and convert it to its value...
7
by: alexandre_irrthum | last post by:
Hi there, I am trying to use pyserial to read data from a temperature logger device (T-logger). T-logger is based on the DS1615 temperature recorder chip (Dallas Semiconductor). According to the...
0
by: pauland80 | last post by:
<snip> <snip> Late thanks for your both answers! (Please excuse me for that) The problem was a bug in the device firmware. But before finding this, I dugg lightly in the pyserial source...
3
by: naveen.sabapathy | last post by:
Hi, I am trying to use virtual serial ports to develop/test my serial communication program. Running in to trouble... I am using com0com to create the virtual ports. The virtual ports seem to...
1
by: JAMoore84 | last post by:
Hi Guys, I have a project where I'd like to save GPS data that is streamed to a Sony Vaio over bluetooth. I can monitor the data stream over Hyper Terminal, but I'd like to use python to...
1
by: Rich | last post by:
Hello, I am working on a python library for sending and receiving data from a Subaru's ECU (the fuel injection computer) via the OBD-II port and an OBD to USB cable, with the Subaru Select Monitor...
1
by: rfarley | last post by:
Hi, I am using the pyserial module and am trying to read the serial port from an accelerometer (LIS302DL). It has an option in which you write "*debug\r\n" and then you read the data (three...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.