We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Arduino serial port can be found as a symlink in /dev/serial/by-id/
We could look for a symlink with arduino in the name in that dir intead of just trying ttyACM0 and ttyACM1
The text was updated successfully, but these errors were encountered:
A possible easy way to do this in python is to use serial.tools.list_ports: It can be invoked from command line:
python -m serial.tools.list_ports -v
Giving for the Arduino Leo:
pi@brewpi ~ $ python -m serial.tools.list_ports -v
/dev/ttyACM0 desc: ttyACM0 hwid: USB VID:PID=2341:8036 1 ports found
And for the Spark Core:
pi@raspberrypi ~ $ python -m serial.tools.list_ports -v /dev/ttyACM0 desc: ttyACM0 hwid: USB VID:PID=1d50:607d SNR=6D7517794852 1 ports found
We can distinguish between devices from their VID:PID
The list_ports module is intended to be used from the command line, but can be used from a python script by including the platform specific version:
https://github.com/elcojacobs/brewpi-script/blob/feature/dfu-flash-tool/utils/flash-dfu.py#L30
Sorry, something went wrong.
I have added automatic detection to the brewpi connector, it has all the various IDs registered - tried and tested code so that would be a good start.
No branches or pull requests
The Arduino serial port can be found as a symlink in
/dev/serial/by-id/
We could look for a symlink with arduino in the name in that dir intead of just trying ttyACM0 and ttyACM1
The text was updated successfully, but these errors were encountered: