On 10/02/2010 12:03, steve wrote:
On 02/09/2010 04:35 AM, M.Ganesh wrote:
Hi All,Umm, a quick glance at that pyserial documentation tells me that the
I am trying to use python& pyserial on Ubuntu 9.10 to communicate with
a serial device. I need to be able to set the parity bit Mark/Space for
this particular device. I understand linux/posix compliant OSs don't
natively support this. I googled and found this
[http://www.lothosoft.ch/thomas/libmip/markspaceparity.php] link and
implemented that in my code. With this I am able to send only one byte
with my desired parity and the port somehow goes back to 'No parity'
after one byte.
parity mode setting can be done using the module constants:
http://pyserial.sourceforge.net/pyserial_api.html#constants
is this how you are setting the parity bit ?
I am assuming that pyserial should do the RIGHT THING(tm) irrespective
of the OS, which might not be true if instead you are twiddling around
using the termios module (as suggested in the link you posted).
cheers,
- steve
PS: You can also direct your python specific questions to the
bangpypers mailing list where a number of Indian pythoniasts hang out:
http://mail.python.org/mailman/listinfo/bangpypers