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
http://informixdb.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to