Teensy RawHID appears twice in Windows 10 Device Manager

Status
Not open for further replies.

ieee488

Member
Why does a Teensy LC with RawHID Basic code show up twice in Windows 10 Device Manager ?
This is unaltered Example code .
 
Yes, both disappear when unplugged.
Below are the entries in Device Manager

Capture2.PNG
Capture1.PNG
 
I believe when you choose USB as RAWHID, it acutally does create 2

That is the one RAWHID is the one you would talk to using the normal RAWHID stuff.

The 2nd one is the Serial Emulation HID... This is created for many of the USB types, as to allow you to go to the Arduino Serial monitor and see what ever is output like: Serial.println("Test program");
 
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.

Anmerkung 2020-02-14 232658.jpg

EDIT: ups, cross post
 
Good post & cross post. Dev Mgr is always a chore to read - and T_LC not on desk just now. Seeing both go away says the right two were found and they are as noted live not confusion.
 
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

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?

2. In Linux Mint 18.3 , the RawHid_Test code stops after a few seconds. Why?

Again, I have not modified either pieces of software.

.
 
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?

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.

I can't comment on your Linux question and stability of the RawHid Test program. Maybe Paul will chime in here.
 
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.
wow! Thank you. That is very help. That is exactly the sort of example that I need.


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

Thank you. I will apply the uDev rules again. I just upgraded today from Linux Mint 18.0 to 18.3 .
 
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?

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");
 
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");

Thank you.

Lots of code to keep me busy for awhile. :)

.
 
Status
Not open for further replies.
Back
Top