Hi,
I just cloned your repo and tried to open /dev/usbtmc0, where my Tektronix AFG3102 is attached,
but got the following error:
Traceback (most recent call last):
File "./test.py", line 5, in
open_serial_port()
File "TektronixAFG3021B.py", line 71, in open_serial_port
ser.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 282, in open
self._reconfigurePort()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 311, in _reconfigurePort
raise SerialException("Could not configure port: %s" % msg)
serial.serialutil.SerialException: Could not configure port: (56, 'Invalid request code')
The problem occurs in function open_serial_port, the relevant code segment is
...
ser = serial.Serial()
ser.port = serial_port
ser.baudrate = 9600
ser.bytesize = 8
ser.parity = 'N'
ser.stopbits = 1
ser.timeout = None
ser.xonxoff = 0
ser.rtscts = 0
ser.open()
print ser.is_open()
...
I made minor changes, as you can see, but still can't see the problem.
Any idea, what went wrong?
Best, Matthias