-
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
Is there a way to specify which teensy is programmed via its serial number? #56
Comments
Hi @hmaarrfk, |
You can try Only works on linux. I did the bad thing on releasing the feature on conda forge as well |
Thank you. That's helpful for me!! I will try it. |
Greetings, This is the output from usb-devices for my teensy:
As you see, my serial-number is 7365140. I had issues flashing my teensy and noticed that the serial-number which gets parsed out of your code is not matching to my serial-number. I added some prints to your code: ...
if (dev->descriptor.iSerialNumber) {
// langid 0x0409 is English US
r = usb_get_string(h, dev->descriptor.iSerialNumber, 0x0409, buf, 128);
if (r < 0) {
usb_close(h);
continue;
}
// Seemsl like 16 bit wide chars are being sent
for (i=0; i < r/2; i++){
buf[i] = buf[i * 2];
}
printf("%s\n", buf);
// The first char seems to be of value 16
// meaning DATA LINK ESCAPE. Who knows what that means???
read_serial_number = &buf[1];
printf("%s\n", read_serial_number);
} else {
... Here is the output of PlatformIO using your changes + outputs from me:
Any idea why this happens? |
do you have two teensies connected? |
In the run shown above, no. |
are you using a standard intel based computer? I've been using this for quite some time and it seems to be "working" but maybe there is a bug.... |
For use cases where we have multiple teensies connected, is it possible to specify which one we program via their serial number? usb port?
The text was updated successfully, but these errors were encountered: