Pyserial not getting response every time, input/output errors

Rainy andrei.avk at
Tue Aug 12 22:15:22 CEST 2008

Carsten Haese wrote:
> Rainy wrote:
> > Hello!
> >
> > I'm having some trouble with pyserial package, I'm sending commands
> > and reading responses from a custom pcb, and sometimes I get a proper
> > response, at other times I get nothing, and sometimes I get about half
> > of the response string with beginning cut off. About half the time an
> > empty string is returned, the other ~half time good response, and more
> > rarely I get partial response.
> >
> > When I try to use the same Serial instance to send/receive a few
> > times, I end up getting an input/output error.
> >
> > Here are some examples:
> >
> >>>> ser = serial.Serial('/dev/ttyAM1', 115200, timeout=0.1)
> One possible point of failure is that you're not supplying any
> parameters for the data format (byte size, parity, stop bits) and flow
> control. The Serial object will assume defaults, and those defaults may
> or may not be correct.
> Try to find out what data format and flow control you should be using
> and set explicit Serial parameters accordingly.
> Hope this helps,
> --
> Carsten Haese

Thanks for the reply, Carsten, I should have mentioned.. yes, I did
that defaults pyserial's providing are correct with pcb maker.

More information about the Python-list mailing list