473,320 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 4275

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.