connecting to serial port + python
gagsl-py2 at yahoo.com.ar
Thu Jul 5 08:41:32 CEST 2007
En Tue, 03 Jul 2007 10:01:51 -0300, Japan Shah <shahjapan at gmail.com>
> I am trying to connect my Nokia 6610 using usb cable,
> I have installed usb-serial driver of it.
> I hv tested it with Hyperterminal and it works fine.
> but when I wrote a python script I am not able to receive the responce
> from the device.
> lines = self.sock.read(100)
If the response contains less than 100 bytes, the above line will block.
> command = ['AT','ATI','ATl1','AT+GMMM']
> for cmd in command:
Don't you have to send <ENTER> after each command? "\n"
> th = connect_serial(conn1)
You can't have four threads all reading the same serial port. The device
sends its responses sequentially anyway.
More information about the Python-list