-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add options --vid=<VID> --pid=<PID> --serial=<SERIAL> for soft reset with libusb #65
base: master
Are you sure you want to change the base?
Conversation
Thank you for sending this PR! I, too, would love to see this merged. The https://github.com/kinx-project/kint keyboard controller uses the Teensy, but also specifies a custom USB VID/PID. It would be very convenient to be able to easily soft reset it when programming. |
I'm reluctant to add a feature which only works on 1 platform. |
Thank you very much for your message. I perfectly understand that, but soft reset is actually only implemented for libusb anyway. I will not try to extend that feature to others platforms outside of what is actually implemented, and without some confidence that the work will be merged at some point. So this narrow the discussion to extend the proposal to hard reset. Please see this first pull request as the potential beginning of the process. The --vid and --pid proposed patch is not platform dependent, but the default value depend on the hard or soft reset. A way to manage that is to convert opt_vid / opt_pid later and default them to NULL, then to test the opt_vid and opt_pid at the open_usb_device() call from the hard and soft reset. Like: The --serial proposed patch is very platform dependent. I will not be able to test others platform myself, so the only way forward if to find help from enough peoples to test all the platforms. That said, if you at least agree on the architecture of the patch, this will allow others to more easily implement that feature on others platforms. Will be happy to read more from you. Best Regards |
…tions --vid and --pid.
Last commit propose an other way to manage the default hard and soft vid and pid. I think this is cleaner than the proposal in my last message. |
Was just coming to request that Unfortunately it seems to fail to actually perform the soft reset. It says "Soft reset performed" but the board doesn't reset. With the older version I had been using, it works. |
Hello,
I am aware that this is not the first pull request asking for that critical feature absolutely required to remotely update multiples boards connected to the same computer. The VID and PID options allow to control boards with custom USB descriptor. Tested on Debian 11 with 4 Teensy 4.1 board behind a external hub and each with custom USB composite descriptors (ACM + ACM + HID + HID).
The code only touch the soft reset for libusb. If you like the idea, feel free to extend that to other reset and libraries.
Best regards.
Jean-Christian