Re: Pyserial never read

2006-03-02 Thread luca72
Hello i how can set with pyserial the following data? > byte delay= 4 > serial control line: > dtr = high > rts= low Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-23 Thread Peter Hansen
Dennis Lee Bieber wrote: dt = "D036EC" print repr("".join([chr(int(dt[2*x:2*x+2],16)) for x in range(len(dt)//2)])) > > '\xd06\x00\x00\xec' By the way, for future reference, this way beats the above hands down: >>> import binascii >>> binascii.unhexlify("D036EC") '\xd06\x00\x00

Re: Pyserial never read

2006-02-23 Thread luca72
Hello ALSO... YOU NEVER SPECIFY A VARIABLE TO RECEIVE THE DATA -- ANYTHING YOU DO READ IS BEING DUMPED ON THE FLOOR! I see the read data with a sniffer. with the same serial caracteristic in delphi i obtain the right answer. I use serial writestr and serial readstr. If the serial package is

Re: Pyserial never read

2006-02-22 Thread sam
Thanks for the info Grant. It'll teach me not to read the documentation :>) Sam -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-22 Thread Grant Edwards
On 2006-02-22, sam <[EMAIL PROTECTED]> wrote: > luca72 wrote: >> Thanks to all for the help, >> >> here you find the code, pls note if i use handshaking = 1 the >> application don't start. >> in the delphi configuratio of com port if i use or not handshaking the >> application work. >> Best Regards

Re: Pyserial never read

2006-02-22 Thread sam
luca72 wrote: > Thanks to all for the help, > > here you find the code, pls note if i use handshaking = 1 the > application don't start. > in the delphi configuratio of com port if i use or not handshaking the > application work. > Best Regards at all > > Luca > > import serial > import win

Re: Pyserial never read

2006-02-22 Thread Petr Jakes
Well, I think it is better to start with some simple code first. Try to read serial port and print it out. something like this could work: import serial s = serial.Serial(port=2,baudrate=38400, timeout=20) while 1: print s.readline() Petr Jakes -- http://mail.python.org/mailman/listinfo/p

Re: Pyserial never read

2006-02-22 Thread Grant Edwards
On 2006-02-22, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: >> Anything's possible, but given that in his original post he says it >> works when he uses Delphi, it seems unlikely making a change to the >> hardware is necessary. > > Sorry missed that bit! > > Pyserial works very well in my exper

Re: Pyserial never read

2006-02-22 Thread luca72
Thanks to all for the help, here you find the code, pls note if i use handshaking = 1 the application don't start. in the delphi configuratio of com port if i use or not handshaking the application work. Best Regards at all Luca import serial import win32file port = 2 ba

Re: Pyserial never read

2006-02-21 Thread Nick Craig-Wood
Peter Hansen <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood wrote: > > luca72 <[EMAIL PROTECTED]> wrote: > > > >> Thanks for your help, but it don't solve the problem. > >> I receive only the echo and full stop. > > > > Try swapping pins 2 and 3 in the lead. > > Anything's possible, but given th

Re: Pyserial never read

2006-02-21 Thread Peter Hansen
luca72 wrote: > Thanks for your help, but it don't solve the problem. > I receive only the echo and full stop. If you want help, you'll do better to post small pieces of code that you are actually using, rather than making us guess or imagine what you are doing. There are perhaps a dozen things

Re: Pyserial never read

2006-02-21 Thread Peter Hansen
Nick Craig-Wood wrote: > luca72 <[EMAIL PROTECTED]> wrote: > >> Thanks for your help, but it don't solve the problem. >> I receive only the echo and full stop. > > Try swapping pins 2 and 3 in the lead. Anything's possible, but given that in his original post he says it works when he uses Delph

Re: Pyserial never read

2006-02-21 Thread Nick Craig-Wood
luca72 <[EMAIL PROTECTED]> wrote: > Thanks for your help, but it don't solve the problem. > I receive only the echo and full stop. Try swapping pins 2 and 3 in the lead. -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-

Re: Pyserial never read

2006-02-18 Thread luca72
Thanks for your help, but it don't solve the problem. I receive only the echo and full stop. Many Thanks Best Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-17 Thread [EMAIL PROTECTED]
Hello, I'm not sure I understand precisely your question but maybe you can try a readline and a flushinput like that: import serial port= 0 # or the port where you're device is connected baudrate=9600 # or the baudrate of your device s = serial.Serial(port, baudrate) # Open the port for i in r

Re: Pyserial never read

2006-02-17 Thread luca72
Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyserial never read

2006-02-17 Thread jdhmistey
I don't know alot about python but I could help you with english? eventhough it was really good best regards- Just -- http://mail.python.org/mailman/listinfo/python-list

Pyserial never read

2006-02-16 Thread luca72
Hello at all sorry for my english but i'm Italian. I use pyserial to communicate via rs232 with an extarnal device called smartmouse. I write the exact line that i want , but when i read i read only the echo ond not the other bytes. When i meke the same project with delphi i solve this problem with