-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
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
feat(linux): add support for serial number filtering #6
base: master
Are you sure you want to change the base?
Conversation
Why is the filter option used with opening the rebootor device? Can you change the usage documentation to clarify that the serial number is used only for soft reboot? |
@PaulStoffregen Was not really sure if it would be needed there, but hard_reboot sounded pretty close to soft_reboot...! I'll fix that. |
9cbdbc0
to
67b0756
Compare
I recently came across this while trying to solve a similar problem. Would be great to get this merged then I don't have to maintain a custom fork. Thanks. |
I'm also maintaining a custom fork with this change and would rather not have to. |
@mgcrea Are you still maintaining this repo? It would be great to get this change in. I also have a fork with this change. It seems weird to not include it in the release. |
@@ -243,6 +243,42 @@ usb_dev_handle * open_usb_device(int vid, int pid) | |||
} | |||
} | |||
#endif | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this block needs to be above the ifdef LIBUSB_HAS_GET_DRIVER_NP block. Otherwise devices that are not selected (because the serial number doesn't match) will be detached from the kernel and not added back. We should only detach the kernel driver if we're actually going to update the device.
A quick hack to enable serialNumber filtering support (to address #5 to flash multiple teensys).
Only patched linux, so not ready for merge but might be useful to somebody.