Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: Teensy RawHID appears twice in Windows 10 Device Manager

  1. #1
    Junior Member
    Join Date
    Dec 2019
    Posts
    11

    Teensy RawHID appears twice in Windows 10 Device Manager

    Why does a Teensy LC with RawHID Basic code show up twice in Windows 10 Device Manager ?
    This is unaltered Example code .

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,573
    perhaps just Windows confusion - what happens when that one T_LC is unplugged? Do both disappear?

  3. #3
    Junior Member
    Join Date
    Dec 2019
    Posts
    11
    Yes, both disappear when unplugged.
    Below are the entries in Device Manager

    Click image for larger version. 

Name:	Capture2.PNG 
Views:	2 
Size:	10.5 KB 
ID:	19067
    Click image for larger version. 

Name:	Capture1.PNG 
Views:	2 
Size:	10.5 KB 
ID:	19068

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,085
    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");

  5. #5
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    698
    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.

    Click image for larger version. 

Name:	Anmerkung 2020-02-14 232658.jpg 
Views:	4 
Size:	55.7 KB 
ID:	19069

    EDIT: ups, cross post

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,573
    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.

  7. #7
    Junior Member
    Join Date
    Dec 2019
    Posts
    11
    Quote Originally Posted by luni View Post
    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.

    Click image for larger version. 

Name:	Anmerkung 2020-02-14 232658.jpg 
Views:	4 
Size:	55.7 KB 
ID:	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.

    .

  8. #8
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    698
    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...l=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.

  9. #9
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,573
    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

  10. #10
    Junior Member
    Join Date
    Dec 2019
    Posts
    11
    Quote Originally Posted by luni View Post
    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...l=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.


    Quote Originally Posted by defragster View Post
    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 .

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,288
    Quote Originally Posted by ieee488 View 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?
    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, 0xFFAB, 0x0200);
            if (r <= 0) {
                    // Arduino-based example is 16C0:0486:FFAB:0200
                    r = rawhid_open(1, 0x16C0, 0x0486, 0xFFAB, 0x0200);
                    if (r <= 0) {
                            printf("no rawhid device found\n");
                            return -1;
                    }
            }
            printf("found rawhid device\n");

  12. #12
    Junior Member
    Join Date
    Dec 2019
    Posts
    11
    Quote Originally Posted by PaulStoffregen View Post
    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, 0xFFAB, 0x0200);
            if (r <= 0) {
                    // Arduino-based example is 16C0:0486:FFAB:0200
                    r = rawhid_open(1, 0x16C0, 0x0486, 0xFFAB, 0x0200);
                    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.

    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •