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

Discussion in 'Python' started by pauland80@gmail.com, Jun 6, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. 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
     
    Troels Thomsen, Jun 6, 2007
    #2
    1. Advertising

  3. Re: [pyserial - winXP] Serial port stop receiving data after a fewhours, raise no error

    <> 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
     
    Hendrik van Rooyen, Jun 7, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    767
  2. Replies:
    4
    Views:
    2,075
    marina_dan
    Oct 31, 2011
  3. terry
    Replies:
    5
    Views:
    891
    Gabriel Genellina
    May 3, 2008
  4. zxo102
    Replies:
    3
    Views:
    381
    zxo102
    Oct 12, 2008
  5. John Nagle
    Replies:
    1
    Views:
    1,590
    Tim Golden
    Mar 31, 2011
Loading...

Share This Page