Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgcrea
Copy link

@mgcrea mgcrea commented Mar 25, 2015

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.

@PaulStoffregen
Copy link
Owner

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?

@mgcrea
Copy link
Author

mgcrea commented Mar 25, 2015

@PaulStoffregen Was not really sure if it would be needed there, but hard_reboot sounded pretty close to soft_reboot...! I'll fix that.

@mgcrea mgcrea force-pushed the master branch 3 times, most recently from 9cbdbc0 to 67b0756 Compare March 25, 2015 16:46
@hardillb
Copy link

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.

@memoryhole
Copy link

I'm also maintaining a custom fork with this change and would rather not have to.

@zz-netflix
Copy link

@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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants