No, there is no Windows confusion. Raw Hid implements two interfaces and the device manager shows those two as it is supposed to do. One is the RAW HID interface and the other is the SerEmu interface which (besides being a replacement for Serial) is required to switch the Teensy into Bootloader mode. You see this better if you use the device manager in connection mode. (You need to follow the USB Tree from Root Hub to the attached Hubs down to the connected Teensy. You will see that it implements the two interfaces). Alternatively, you can use TyCommander it directly shows the two interfaces.
View attachment 19069
EDIT: ups, cross post
How does the RawHid_Test program that I downloaded from https://www.pjrc.com/teensy/rawhid.html know which of the two interfaces to send bytes to?
wow! Thank you. That is very help. That is exactly the sort of example that I need.I don't know the sources of that program but usually you'd look for a device with the correct VID/PID, then you know what interfaces it has and just use them? Here https://forum.pjrc.com/threads/56963-Teensy-HID-C-project?p=210528&viewfull=1#post210528 a post where I show how to use the Raw HID from a C# program.
Re #2: Linux - have the latest uDev rules been applied? Don't use Linux - but prior comments seem to indicate that ModemMgr or other may wake up and take control of the Teensy. Were posts on that in recent weeks.
<edit> : add post link :: pjrc.com/threads/58952-Can-no-longer-program-on-Ubuntu-18-04-3-LTS?p=225754&viewfull=1#post225754
1. How does the RawHid_Test program that I downloaded from https://www.pjrc.com/teensy/rawhid.html know which of the two interfaces to send bytes to?
// C-based example is 16C0:0480:FFAB:0200
r = rawhid_open(1, 0x16C0, 0x0480, [B][COLOR="#B22222"]0xFFAB, 0x0200[/COLOR][/B]);
if (r <= 0) {
// Arduino-based example is 16C0:0486:FFAB:0200
r = rawhid_open(1, 0x16C0, 0x0486, [B][COLOR="#B22222"]0xFFAB, 0x0200[/COLOR][/B]);
if (r <= 0) {
printf("no rawhid device found\n");
return -1;
}
}
printf("found rawhid device\n");
These usage page and usage index numbers distinguish the RawHID interface from other HID interfaces on the same device.
Code:// C-based example is 16C0:0480:FFAB:0200 r = rawhid_open(1, 0x16C0, 0x0480, [B][COLOR="#B22222"]0xFFAB, 0x0200[/COLOR][/B]); if (r <= 0) { // Arduino-based example is 16C0:0486:FFAB:0200 r = rawhid_open(1, 0x16C0, 0x0486, [B][COLOR="#B22222"]0xFFAB, 0x0200[/COLOR][/B]); if (r <= 0) { printf("no rawhid device found\n"); return -1; } } printf("found rawhid device\n");