Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [pyserial - winXP] Serial port stop receiving data after a few hours, raise no error

Reply
Thread Tools

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

 
 
pauland80@gmail.com
Guest
Posts: n/a
 
      06-06-2007
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é

 
Reply With Quote
 
 
 
 
Troels Thomsen
Guest
Posts: n/a
 
      06-06-2007

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


 
Reply With Quote
 
 
 
 
Hendrik van Rooyen
Guest
Posts: n/a
 
      06-07-2007
<(E-Mail Removed)> wrote:
>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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"raise (type, value, traceback)" and "raise type, value, traceback" Jack Bates Python 0 05-02-2011 05:23 PM
raise Exception or raise Exception() ernest Python 2 11-14-2010 08:14 PM
[pyserial - winXP] Serial port stop receiving data after a few hours, raise no error pauland80@gmail.com Python 0 08-07-2007 09:06 PM
raise or not to raise [Newbie] Jacol Python 5 02-05-2007 11:46 PM
Perl program for sending/receiving files via a serial port Manoj K.S Perl Misc 2 12-03-2003 03:08 PM



Advertisments