Closed kb1lqc closed 6 years ago
Looking at the serial port (printing) when I use each command helps identify if it's working. This is simply printing the serialPort
variable which is a pyserial instance.
-b
(.venv) bryce@bryce-ubuntu:~/Documents/git/faradayio-cli$ sudo .venv/bin/faradayio-cli KB1LQC 2 -b 9600
Executing faradayio-cli version 0.0.4
Serial<id=0x7f77a4616d30, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False)
Looks good!
--baud
(.venv) bryce@bryce-ubuntu:~/Documents/git/faradayio-cli$ sudo .venv/bin/faradayio-cli KB1LQC 2 --baud 9600
Executing faradayio-cli version 0.0.4
Serial<id=0x7f82a573c198, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False)
Also looks good!
--timeout
(.venv) bryce@bryce-ubuntu:~/Documents/git/faradayio-cli$ sudo .venv/bin/faradayio-cli KB1LQC 2 --timeout 5
Executing faradayio-cli version 0.0.4
Serial<id=0x7f1614d61278, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=5, xonxoff=False, rtscts=False, dsrdtr=False)
Again looks good...
--writetimeout
(.venv) bryce@bryce-ubuntu:~/Documents/git/faradayio-cli$ sudo .venv/bin/faradayio-cli KB1LQC 2 --writetimeout 6
Executing faradayio-cli version 0.0.4
Serial<id=0x7f444bf076a0, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False)
I can't see write_timeout
in the serial port instance when printed even though I know I set it. pyserial
may not show it as an option when printing out the instance. Therefore I'm going to count this as complete unless it causes a problem in the future at which point we will deal with it.
In #32 I added in the following command line arguments to
faradayio-cli
:baud
serial port baud rate (default 115200)timeout
serial port read timeout (default 0)writetimeout
serial port write timeout (default None)