Teensy 4.1 USB-Host USB-Hub Mouse-Keyboard Problem

epi

Member
Hello,
i tested this with different usb-hubs, keyboards and mouses, can someone confirm that bug and give a hint to fix it?
My problem is that the keyboard is only working if i connect it before i connect the mouse.

Test:
  1. Mouse connected -> working
  2. Keyboard connected -> working
  3. Keyboard connected and after that Mouse -> working
  4. Mouse+Keyboard connected -> Keyboard not working
  5. Mouse connected after that Keyboard -> Keyboard not working

Tested with the Example Script "Mouse_KeyboardBT" and Arduino 1.8.19/Teensyduino 1.56

Code:
// Simple test of USB Host Mouse/Keyboard
//
// This example is in the public domain

#include "USBHost_t36.h"

USBHost myusb;
USBHub hub1(myusb);
USBHub hub2(myusb);
KeyboardController keyboard1(myusb);
//KeyboardController keyboard2(myusb);
USBHIDParser hid1(myusb);
USBHIDParser hid2(myusb);
USBHIDParser hid3(myusb);
USBHIDParser hid4(myusb);
USBHIDParser hid5(myusb);
MouseController mouse1(myusb);
//JoystickController joystick1(myusb);
//BluetoothController bluet(myusb, true, "0000");   // Version does pairing to device

BluetoothController bluet(myusb);   // version assumes it already was paired

USBDriver *drivers[] = {&hub1, &hub2, &keyboard1, &bluet, &hid1, &hid2, &hid3, &hid4, &hid5};

#define CNT_DEVICES (sizeof(drivers)/sizeof(drivers[0]))
const char * driver_names[CNT_DEVICES] = {"Hub1", "Hub2", "KB1", "Bluet", "HID1" , "HID2", "HID3", "HID4", "HID5"};

bool driver_active[CNT_DEVICES] = {false, false, false, false};

// Lets also look at HID Input devices
USBHIDInput *hiddrivers[] = {&mouse1};

#define CNT_HIDDEVICES (sizeof(hiddrivers)/sizeof(hiddrivers[0]))
const char * hid_driver_names[CNT_HIDDEVICES] = {"Mouse1"};

bool hid_driver_active[CNT_HIDDEVICES] = {false};

BTHIDInput *bthiddrivers[] = {&keyboard1, &mouse1};
#define CNT_BTHIDDEVICES (sizeof(bthiddrivers)/sizeof(bthiddrivers[0]))
const char * bthid_driver_names[CNT_BTHIDDEVICES] = {"Keyboard(BT)", "Mouse(BT)"};
bool bthid_driver_active[CNT_BTHIDDEVICES] = {false};



bool show_changed_only = false;

uint8_t joystick_left_trigger_value = 0;
uint8_t joystick_right_trigger_value = 0;
uint64_t joystick_full_notify_mask = (uint64_t) - 1;

void setup()
{
  while (!Serial) ; // wait for Arduino Serial Monitor
  Serial.begin(115200);
  Serial1.begin(115200);
  Serial.println("\n\nUSB Host Testing");
  Serial.println(sizeof(USBHub), DEC);
  myusb.begin();
  keyboard1.attachPress(OnPress);
  //keyboard2.attachPress(OnPress);
  keyboard1.attachExtrasPress(OnHIDExtrasPress);
  keyboard1.attachExtrasRelease(OnHIDExtrasRelease);
  //keyboard2.attachExtrasPress(OnHIDExtrasPress);
  //keyboard2.attachExtrasRelease(OnHIDExtrasRelease);
}


void loop()
{
  // check to see if the device list has changed:
  UpdateActiveDeviceInfo();

  myusb.Task();

  if (mouse1.available()) {
    Serial.print("Mouse: buttons = ");
    Serial.print(mouse1.getButtons());
    Serial.print(",  mouseX = ");
    Serial.print(mouse1.getMouseX());
    Serial.print(",  mouseY = ");
    Serial.print(mouse1.getMouseY());
    Serial.print(",  wheel = ");
    Serial.print(mouse1.getWheel());
    Serial.print(",  wheelH = ");
    Serial.print(mouse1.getWheelH());
    Serial.println();
    mouse1.mouseDataClear();
  }
}

void OnPress(int key)
{
  Serial.print("key '");
  switch (key) {
    case KEYD_UP       : Serial.print("UP"); break;
    case KEYD_DOWN    : Serial.print("DN"); break;
    case KEYD_LEFT     : Serial.print("LEFT"); break;
    case KEYD_RIGHT   : Serial.print("RIGHT"); break;
    case KEYD_INSERT   : Serial.print("Ins"); break;
    case KEYD_DELETE   : Serial.print("Del"); break;
    case KEYD_PAGE_UP  : Serial.print("PUP"); break;
    case KEYD_PAGE_DOWN: Serial.print("PDN"); break;
    case KEYD_HOME     : Serial.print("HOME"); break;
    case KEYD_END      : Serial.print("END"); break;
    case KEYD_F1       : Serial.print("F1"); break;
    case KEYD_F2       : Serial.print("F2"); break;
    case KEYD_F3       : Serial.print("F3"); break;
    case KEYD_F4       : Serial.print("F4"); break;
    case KEYD_F5       : Serial.print("F5"); break;
    case KEYD_F6       : Serial.print("F6"); break;
    case KEYD_F7       : Serial.print("F7"); break;
    case KEYD_F8       : Serial.print("F8"); break;
    case KEYD_F9       : Serial.print("F9"); break;
    case KEYD_F10      : Serial.print("F10"); break;
    case KEYD_F11      : Serial.print("F11"); break;
    case KEYD_F12      : Serial.print("F12"); break;
    default: Serial.print((char)key); break;
  }
  Serial.print("'  ");
  Serial.print(key);
  Serial.print(" MOD: ");
  if (keyboard1) {
    Serial.print(keyboard1.getModifiers(), HEX);
    Serial.print(" OEM: ");
    Serial.print(keyboard1.getOemKey(), HEX);
    Serial.print(" LEDS: ");
    Serial.println(keyboard1.LEDS(), HEX);
    //} else {
    //Serial.print(keyboard2.getModifiers(), HEX);
    //Serial.print(" OEM: ");
    //Serial.print(keyboard2.getOemKey(), HEX);
    //Serial.print(" LEDS: ");
    //Serial.println(keyboard2.LEDS(), HEX);
  }

  //Serial.print("key ");
  //Serial.print((char)keyboard1.getKey());
  //Serial.print("  ");
  //Serial.print((char)keyboard2.getKey());
  //Serial.println();
}
void OnHIDExtrasPress(uint32_t top, uint16_t key)
{
  Serial.print("HID (");
  Serial.print(top, HEX);
  Serial.print(") key press:");
  Serial.print(key, HEX);
  if (top == 0xc0000) {
    switch (key) {
      case  0x20 : Serial.print(" - +10"); break;
      case  0x21 : Serial.print(" - +100"); break;
      case  0x22 : Serial.print(" - AM/PM"); break;
      case  0x30 : Serial.print(" - Power"); break;
      case  0x31 : Serial.print(" - Reset"); break;
      case  0x32 : Serial.print(" - Sleep"); break;
      case  0x33 : Serial.print(" - Sleep After"); break;
      case  0x34 : Serial.print(" - Sleep Mode"); break;
      case  0x35 : Serial.print(" - Illumination"); break;
      case  0x36 : Serial.print(" - Function Buttons"); break;
      case  0x40 : Serial.print(" - Menu"); break;
      case  0x41 : Serial.print(" - Menu  Pick"); break;
      case  0x42 : Serial.print(" - Menu Up"); break;
      case  0x43 : Serial.print(" - Menu Down"); break;
      case  0x44 : Serial.print(" - Menu Left"); break;
      case  0x45 : Serial.print(" - Menu Right"); break;
      case  0x46 : Serial.print(" - Menu Escape"); break;
      case  0x47 : Serial.print(" - Menu Value Increase"); break;
      case  0x48 : Serial.print(" - Menu Value Decrease"); break;
      case  0x60 : Serial.print(" - Data On Screen"); break;
      case  0x61 : Serial.print(" - Closed Caption"); break;
      case  0x62 : Serial.print(" - Closed Caption Select"); break;
      case  0x63 : Serial.print(" - VCR/TV"); break;
      case  0x64 : Serial.print(" - Broadcast Mode"); break;
      case  0x65 : Serial.print(" - Snapshot"); break;
      case  0x66 : Serial.print(" - Still"); break;
      case  0x80 : Serial.print(" - Selection"); break;
      case  0x81 : Serial.print(" - Assign Selection"); break;
      case  0x82 : Serial.print(" - Mode Step"); break;
      case  0x83 : Serial.print(" - Recall Last"); break;
      case  0x84 : Serial.print(" - Enter Channel"); break;
      case  0x85 : Serial.print(" - Order Movie"); break;
      case  0x86 : Serial.print(" - Channel"); break;
      case  0x87 : Serial.print(" - Media Selection"); break;
      case  0x88 : Serial.print(" - Media Select Computer"); break;
      case  0x89 : Serial.print(" - Media Select TV"); break;
      case  0x8A : Serial.print(" - Media Select WWW"); break;
      case  0x8B : Serial.print(" - Media Select DVD"); break;
      case  0x8C : Serial.print(" - Media Select Telephone"); break;
      case  0x8D : Serial.print(" - Media Select Program Guide"); break;
      case  0x8E : Serial.print(" - Media Select Video Phone"); break;
      case  0x8F : Serial.print(" - Media Select Games"); break;
      case  0x90 : Serial.print(" - Media Select Messages"); break;
      case  0x91 : Serial.print(" - Media Select CD"); break;
      case  0x92 : Serial.print(" - Media Select VCR"); break;
      case  0x93 : Serial.print(" - Media Select Tuner"); break;
      case  0x94 : Serial.print(" - Quit"); break;
      case  0x95 : Serial.print(" - Help"); break;
      case  0x96 : Serial.print(" - Media Select Tape"); break;
      case  0x97 : Serial.print(" - Media Select Cable"); break;
      case  0x98 : Serial.print(" - Media Select Satellite"); break;
      case  0x99 : Serial.print(" - Media Select Security"); break;
      case  0x9A : Serial.print(" - Media Select Home"); break;
      case  0x9B : Serial.print(" - Media Select Call"); break;
      case  0x9C : Serial.print(" - Channel Increment"); break;
      case  0x9D : Serial.print(" - Channel Decrement"); break;
      case  0x9E : Serial.print(" - Media Select SAP"); break;
      case  0xA0 : Serial.print(" - VCR Plus"); break;
      case  0xA1 : Serial.print(" - Once"); break;
      case  0xA2 : Serial.print(" - Daily"); break;
      case  0xA3 : Serial.print(" - Weekly"); break;
      case  0xA4 : Serial.print(" - Monthly"); break;
      case  0xB0 : Serial.print(" - Play"); break;
      case  0xB1 : Serial.print(" - Pause"); break;
      case  0xB2 : Serial.print(" - Record"); break;
      case  0xB3 : Serial.print(" - Fast Forward"); break;
      case  0xB4 : Serial.print(" - Rewind"); break;
      case  0xB5 : Serial.print(" - Scan Next Track"); break;
      case  0xB6 : Serial.print(" - Scan Previous Track"); break;
      case  0xB7 : Serial.print(" - Stop"); break;
      case  0xB8 : Serial.print(" - Eject"); break;
      case  0xB9 : Serial.print(" - Random Play"); break;
      case  0xBA : Serial.print(" - Select DisC"); break;
      case  0xBB : Serial.print(" - Enter Disc"); break;
      case  0xBC : Serial.print(" - Repeat"); break;
      case  0xBD : Serial.print(" - Tracking"); break;
      case  0xBE : Serial.print(" - Track Normal"); break;
      case  0xBF : Serial.print(" - Slow Tracking"); break;
      case  0xC0 : Serial.print(" - Frame Forward"); break;
      case  0xC1 : Serial.print(" - Frame Back"); break;
      case  0xC2 : Serial.print(" - Mark"); break;
      case  0xC3 : Serial.print(" - Clear Mark"); break;
      case  0xC4 : Serial.print(" - Repeat From Mark"); break;
      case  0xC5 : Serial.print(" - Return To Mark"); break;
      case  0xC6 : Serial.print(" - Search Mark Forward"); break;
      case  0xC7 : Serial.print(" - Search Mark Backwards"); break;
      case  0xC8 : Serial.print(" - Counter Reset"); break;
      case  0xC9 : Serial.print(" - Show Counter"); break;
      case  0xCA : Serial.print(" - Tracking Increment"); break;
      case  0xCB : Serial.print(" - Tracking Decrement"); break;
      case  0xCD : Serial.print(" - Pause/Continue"); break;
      case  0xE0 : Serial.print(" - Volume"); break;
      case  0xE1 : Serial.print(" - Balance"); break;
      case  0xE2 : Serial.print(" - Mute"); break;
      case  0xE3 : Serial.print(" - Bass"); break;
      case  0xE4 : Serial.print(" - Treble"); break;
      case  0xE5 : Serial.print(" - Bass Boost"); break;
      case  0xE6 : Serial.print(" - Surround Mode"); break;
      case  0xE7 : Serial.print(" - Loudness"); break;
      case  0xE8 : Serial.print(" - MPX"); break;
      case  0xE9 : Serial.print(" - Volume Up"); break;
      case  0xEA : Serial.print(" - Volume Down"); break;
      case  0xF0 : Serial.print(" - Speed Select"); break;
      case  0xF1 : Serial.print(" - Playback Speed"); break;
      case  0xF2 : Serial.print(" - Standard Play"); break;
      case  0xF3 : Serial.print(" - Long Play"); break;
      case  0xF4 : Serial.print(" - Extended Play"); break;
      case  0xF5 : Serial.print(" - Slow"); break;
      case  0x100: Serial.print(" - Fan Enable"); break;
      case  0x101: Serial.print(" - Fan Speed"); break;
      case  0x102: Serial.print(" - Light"); break;
      case  0x103: Serial.print(" - Light Illumination Level"); break;
      case  0x104: Serial.print(" - Climate Control Enable"); break;
      case  0x105: Serial.print(" - Room Temperature"); break;
      case  0x106: Serial.print(" - Security Enable"); break;
      case  0x107: Serial.print(" - Fire Alarm"); break;
      case  0x108: Serial.print(" - Police Alarm"); break;
      case  0x150: Serial.print(" - Balance Right"); break;
      case  0x151: Serial.print(" - Balance Left"); break;
      case  0x152: Serial.print(" - Bass Increment"); break;
      case  0x153: Serial.print(" - Bass Decrement"); break;
      case  0x154: Serial.print(" - Treble Increment"); break;
      case  0x155: Serial.print(" - Treble Decrement"); break;
      case  0x160: Serial.print(" - Speaker System"); break;
      case  0x161: Serial.print(" - Channel Left"); break;
      case  0x162: Serial.print(" - Channel Right"); break;
      case  0x163: Serial.print(" - Channel Center"); break;
      case  0x164: Serial.print(" - Channel Front"); break;
      case  0x165: Serial.print(" - Channel Center Front"); break;
      case  0x166: Serial.print(" - Channel Side"); break;
      case  0x167: Serial.print(" - Channel Surround"); break;
      case  0x168: Serial.print(" - Channel Low Frequency Enhancement"); break;
      case  0x169: Serial.print(" - Channel Top"); break;
      case  0x16A: Serial.print(" - Channel Unknown"); break;
      case  0x170: Serial.print(" - Sub-channel"); break;
      case  0x171: Serial.print(" - Sub-channel Increment"); break;
      case  0x172: Serial.print(" - Sub-channel Decrement"); break;
      case  0x173: Serial.print(" - Alternate Audio Increment"); break;
      case  0x174: Serial.print(" - Alternate Audio Decrement"); break;
      case  0x180: Serial.print(" - Application Launch Buttons"); break;
      case  0x181: Serial.print(" - AL Launch Button Configuration Tool"); break;
      case  0x182: Serial.print(" - AL Programmable Button Configuration"); break;
      case  0x183: Serial.print(" - AL Consumer Control Configuration"); break;
      case  0x184: Serial.print(" - AL Word Processor"); break;
      case  0x185: Serial.print(" - AL Text Editor"); break;
      case  0x186: Serial.print(" - AL Spreadsheet"); break;
      case  0x187: Serial.print(" - AL Graphics Editor"); break;
      case  0x188: Serial.print(" - AL Presentation App"); break;
      case  0x189: Serial.print(" - AL Database App"); break;
      case  0x18A: Serial.print(" - AL Email Reader"); break;
      case  0x18B: Serial.print(" - AL Newsreader"); break;
      case  0x18C: Serial.print(" - AL Voicemail"); break;
      case  0x18D: Serial.print(" - AL Contacts/Address Book"); break;
      case  0x18E: Serial.print(" - AL Calendar/Schedule"); break;
      case  0x18F: Serial.print(" - AL Task/Project Manager"); break;
      case  0x190: Serial.print(" - AL Log/Journal/Timecard"); break;
      case  0x191: Serial.print(" - AL Checkbook/Finance"); break;
      case  0x192: Serial.print(" - AL Calculator"); break;
      case  0x193: Serial.print(" - AL A/V Capture/Playback"); break;
      case  0x194: Serial.print(" - AL Local Machine Browser"); break;
      case  0x195: Serial.print(" - AL LAN/WAN Browser"); break;
      case  0x196: Serial.print(" - AL Internet Browser"); break;
      case  0x197: Serial.print(" - AL Remote Networking/ISP Connect"); break;
      case  0x198: Serial.print(" - AL Network Conference"); break;
      case  0x199: Serial.print(" - AL Network Chat"); break;
      case  0x19A: Serial.print(" - AL Telephony/Dialer"); break;
      case  0x19B: Serial.print(" - AL Logon"); break;
      case  0x19C: Serial.print(" - AL Logoff"); break;
      case  0x19D: Serial.print(" - AL Logon/Logoff"); break;
      case  0x19E: Serial.print(" - AL Terminal Lock/Screensaver"); break;
      case  0x19F: Serial.print(" - AL Control Panel"); break;
      case  0x1A0: Serial.print(" - AL Command Line Processor/Run"); break;
      case  0x1A1: Serial.print(" - AL Process/Task Manager"); break;
      case  0x1A2: Serial.print(" - AL Select Tast/Application"); break;
      case  0x1A3: Serial.print(" - AL Next Task/Application"); break;
      case  0x1A4: Serial.print(" - AL Previous Task/Application"); break;
      case  0x1A5: Serial.print(" - AL Preemptive Halt Task/Application"); break;
      case  0x200: Serial.print(" - Generic GUI Application Controls"); break;
      case  0x201: Serial.print(" - AC New"); break;
      case  0x202: Serial.print(" - AC Open"); break;
      case  0x203: Serial.print(" - AC Close"); break;
      case  0x204: Serial.print(" - AC Exit"); break;
      case  0x205: Serial.print(" - AC Maximize"); break;
      case  0x206: Serial.print(" - AC Minimize"); break;
      case  0x207: Serial.print(" - AC Save"); break;
      case  0x208: Serial.print(" - AC Print"); break;
      case  0x209: Serial.print(" - AC Properties"); break;
      case  0x21A: Serial.print(" - AC Undo"); break;
      case  0x21B: Serial.print(" - AC Copy"); break;
      case  0x21C: Serial.print(" - AC Cut"); break;
      case  0x21D: Serial.print(" - AC Paste"); break;
      case  0x21E: Serial.print(" - AC Select All"); break;
      case  0x21F: Serial.print(" - AC Find"); break;
      case  0x220: Serial.print(" - AC Find and Replace"); break;
      case  0x221: Serial.print(" - AC Search"); break;
      case  0x222: Serial.print(" - AC Go To"); break;
      case  0x223: Serial.print(" - AC Home"); break;
      case  0x224: Serial.print(" - AC Back"); break;
      case  0x225: Serial.print(" - AC Forward"); break;
      case  0x226: Serial.print(" - AC Stop"); break;
      case  0x227: Serial.print(" - AC Refresh"); break;
      case  0x228: Serial.print(" - AC Previous Link"); break;
      case  0x229: Serial.print(" - AC Next Link"); break;
      case  0x22A: Serial.print(" - AC Bookmarks"); break;
      case  0x22B: Serial.print(" - AC History"); break;
      case  0x22C: Serial.print(" - AC Subscriptions"); break;
      case  0x22D: Serial.print(" - AC Zoom In"); break;
      case  0x22E: Serial.print(" - AC Zoom Out"); break;
      case  0x22F: Serial.print(" - AC Zoom"); break;
      case  0x230: Serial.print(" - AC Full Screen View"); break;
      case  0x231: Serial.print(" - AC Normal View"); break;
      case  0x232: Serial.print(" - AC View Toggle"); break;
      case  0x233: Serial.print(" - AC Scroll Up"); break;
      case  0x234: Serial.print(" - AC Scroll Down"); break;
      case  0x235: Serial.print(" - AC Scroll"); break;
      case  0x236: Serial.print(" - AC Pan Left"); break;
      case  0x237: Serial.print(" - AC Pan Right"); break;
      case  0x238: Serial.print(" - AC Pan"); break;
      case  0x239: Serial.print(" - AC New Window"); break;
      case  0x23A: Serial.print(" - AC Tile Horizontally"); break;
      case  0x23B: Serial.print(" - AC Tile Vertically"); break;
      case  0x23C: Serial.print(" - AC Format"); break;

    }
  }
  Serial.println();
}

void OnHIDExtrasRelease(uint32_t top, uint16_t key)
{
  Serial.print("HID (");
  Serial.print(top, HEX);
  Serial.print(") key release:");
  Serial.println(key, HEX);
}

//=============================================================================
// UpdateActiveDeviceInfo
//=============================================================================
void UpdateActiveDeviceInfo() {
  for (uint8_t i = 0; i < CNT_DEVICES; i++) {
    if (*drivers[i] != driver_active[i]) {
      if (driver_active[i]) {
        Serial.printf("*** Device %s - disconnected ***\n", driver_names[i]);
        driver_active[i] = false;
      } else {
        Serial.printf("*** Device %s %x:%x - connected ***\n", driver_names[i], drivers[i]->idVendor(), drivers[i]->idProduct());
        driver_active[i] = true;

        const uint8_t *psz = drivers[i]->manufacturer();
        if (psz && *psz) Serial.printf("  manufacturer: %s\n", psz);
        psz = drivers[i]->product();
        if (psz && *psz) Serial.printf("  product: %s\n", psz);
        psz = drivers[i]->serialNumber();
        if (psz && *psz) Serial.printf("  Serial: %s\n", psz);

        if (drivers[i] == &bluet) {
          const uint8_t *bdaddr = bluet.myBDAddr();
          // remember it...
          Serial.printf("  BDADDR: %x:%x:%x:%x:%x:%x\n", bdaddr[0], bdaddr[1], bdaddr[2], bdaddr[3], bdaddr[4], bdaddr[5]);
        }
      }
    }
  }
  for (uint8_t i = 0; i < CNT_HIDDEVICES; i++) {
    if (*hiddrivers[i] != hid_driver_active[i]) {
      if (hid_driver_active[i]) {
        Serial.printf("*** HID Device %s - disconnected ***\n", hid_driver_names[i]);
        hid_driver_active[i] = false;
      } else {
        Serial.printf("*** HID Device %s %x:%x - connected ***\n", hid_driver_names[i], hiddrivers[i]->idVendor(), hiddrivers[i]->idProduct());
        hid_driver_active[i] = true;

        const uint8_t *psz = hiddrivers[i]->manufacturer();
        if (psz && *psz) Serial.printf("  manufacturer: %s\n", psz);
        psz = hiddrivers[i]->product();
        if (psz && *psz) Serial.printf("  product: %s\n", psz);
        psz = hiddrivers[i]->serialNumber();
        if (psz && *psz) Serial.printf("  Serial: %s\n", psz);
      }
    }
  }
  // Then Bluetooth devices
  for (uint8_t i = 0; i < CNT_BTHIDDEVICES; i++) {
    if (*bthiddrivers[i] != bthid_driver_active[i]) {
      if (bthid_driver_active[i]) {
        Serial.printf("*** BTHID Device %s - disconnected ***\n", bthid_driver_names[i]);
        bthid_driver_active[i] = false;
      } else {
        Serial.printf("*** BTHID Device %s - connected ***\n", bthid_driver_names[i]); Serial.flush();
        bthid_driver_active[i] = true;
        #if 0

        const uint8_t *psz = bthiddrivers[i]->manufacturer();
        if (psz && *psz) Serial.printf("  manufacturer: %s\n", psz);
        psz = bthiddrivers[i]->product();
        if (psz && *psz) Serial.printf("  product: %s\n", psz);
        psz = bthiddrivers[i]->serialNumber();
        if (psz && *psz) Serial.printf("  Serial: %s\n", psz);
    #endif  
      }
    }
  }
}
 
Last edited:
after some more testing two mouses works without problems so it must be a problem with the keyboard code in the USBHost_t36.h or somewhere else where the keyboard is detected
would be nice if someone can confirm the same problem or let me know that he has not that problem so maybe my teensy is broken.
 
The only problem I have had is with a wireless mouse that registers as a keyboard as well. So if I plug the keyboard in after the mouse it is registers as a 2nd keyboard and needs to be handled.

Regards
 
thanks you are right the keyboard has been registered as 2nd keyboard (KB2) if there is a mouse present.

*** Device KB1 45e:7b2 - connected ***
manufacturer: Microsoft
product: Microsoft� Nano Transceiver v1.0

*** Device KB2 413c:2107 - connected ***
manufacturer: Dell
product: Dell USB Entry Keyboard


The problem is that even with keyboard2 in the code the keys are disabled and the numlock led is not working.
If I should rat, the problem is that the mouse is recognized as keyboard1 and the keyboard controller crashes

Code:
USBDriver *drivers[] = {&hub1, &hub2, &keyboard1, &keyboard2, &hid1, &hid2, &hid3, &hid4, &hid5};

#define CNT_DEVICES (sizeof(drivers)/sizeof(drivers[0]))
const char * driver_names[CNT_DEVICES] = {"Hub1", "Hub2", "KB1", "KB2", "HID1" , "HID2", "HID3", "HID4", "HID5"};

USBHost myusb;
USBHub hub1(myusb);
USBHub hub2(myusb);
KeyboardController keyboard1(myusb);
KeyboardController keyboard2(myusb);
USBHIDParser hid1(myusb);
USBHIDParser hid2(myusb);
USBHIDParser hid3(myusb);
USBHIDParser hid4(myusb);
USBHIDParser hid5(myusb);
MouseController mouse1(myusb);
MouseController mouse2(myusb);

void setup()
{
  while (!Serial) ; // wait for Arduino Serial Monitor
  Serial.begin(115200);
  Serial1.begin(115200);
  Serial.println("\n\nUSB Host Testing");
  Serial.println(sizeof(USBHub), DEC);
  myusb.begin(); 
  keyboard1.attachPress(OnPress);
  keyboard1.attachExtrasPress(OnHIDExtrasPress);
  keyboard1.attachExtrasRelease(OnHIDExtrasRelease);
  keyboard2.attachPress(OnPress);
  keyboard2.attachExtrasPress(OnHIDExtrasPress);
  keyboard2.attachExtrasRelease(OnHIDExtrasRelease);
}
 
Last edited:
ok here some more tests that proves its not a problem that the wireless reciever is registered as keyboard1.
because my logitech reciever is working without problems with my wired dell keyboard.
only the microsoft reciever kills my wired dell keyboard.
the question is what is it that the microsoft wireless reciever is doing that kills the keyboard controller.

two wireless reciever:

1. microsoft wireless reciever buyed as mouse only
*** Device KB1 45e:7b2 - connected ***
manufacturer: Microsoft
product: Microsoft� Nano Transceiver v1.0
*** Device HID1 45e:7b2 - connected ***
manufacturer: Microsoft
product: Microsoft� Nano Transceiver v1.0
*** Device HID2 45e:7b2 - connected ***
manufacturer: Microsoft
product: Microsoft� Nano Transceiver v1.0
*** HID Device Mouse1 45e:7b2 - connected ***
manufacturer: Microsoft
product: Microsoft� Nano Transceiver v1.0


2. logitech wireless reciever buyed as mouse & keyboard
*** Device KB1 46d:c52b - connected ***
manufacturer: Logitech
product: USB Receiver
*** Device HID1 46d:c52b - connected ***
manufacturer: Logitech
product: USB Receiver
*** Device HID2 46d:c52b - connected ***
manufacturer: Logitech
product: USB Receiver
*** HID Device Mouse1 46d:c52b - connected ***
manufacturer: Logitech
product: USB Receiver

microsoft wireless reciever full debug log
Code:
USB Host Testing
960
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 09 00 01 40 40 1A 01 01 11 01 00 01 00 01 
    VendorID = 1A40, ProductID = 0101, Version = 0111
    Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
    Number of Configurations = 1
enumeration:
enumeration:
Product: USB 2.0 Hub
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
  09 02 19 00 01 01 00 E0 32 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 01 09 00 00 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 9(Hub) / 0 / 0
  07 05 81 03 01 00 0C 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 1
    Polling Interval = 12
enumeration:
USBHub memory usage = 960
USBHub claim_device this=200073A0
found possible interface, altsetting=0
number of interfaces found = 1
USBHub control callback
09 29 04 00 00 32 64 00 FF 00 00 00 00 00 00 00 
Hub ports = 4
USBHub control callback
USBHub control callback
USBHub control callback
USBHub control callback
power turned on to all ports
device addr = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012101
HUB Callback (member)
status = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 01 00 
New Port Status
  status=10101  port=2
  state=0
  Device is present: 
  Has Power
USBHub control callback
Port Status Cleared, port=2
getstatus, port = 3
USBHub control callback
01 03 01 00 
New Port Status
  status=10301  port=3
  state=0
  Device is present: 
  Has Power
USBHub control callback
Port Status Cleared, port=3
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=2
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=2
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=3
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=3
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=4
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=4
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=5
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=5
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=6
  Device is present: 
  Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
HUB Callback (member)
status = 4
getstatus, port = 2
USBHub control callback
03 01 10 00 
New Port Status
  status=100103  port=2
  state=7
  Device is present: 
  Enabled, speed = 12 Mbit/sec
  Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
timer event (24999 us): Hello, I'm resettimer, this = 200073A0, timer = 200076D8
port_doing_reset = 2
PORT_RECOVERY
new_Device: 12 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 40 5E 04 B2 07 44 07 01 02 00 01 
    VendorID = 045E, ProductID = 07B2, Version = 0744
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Microsoft
enumeration:
Product: Microsoft® Nano Transceiver v1.0
enumeration:
Config data length = 84
enumeration:
Configuration Descriptor:
  09 02 54 00 03 01 00 A0 32 
    NumInterfaces = 3
    ConfigurationValue = 1
  09 04 00 00 01 03 01 01 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 1(Keyboard)
  09 21 11 01 00 01 22 4B 00 
    HID, 1 report descriptor
  07 05 81 03 08 00 04 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 4
  09 04 01 00 01 03 01 02 00 
    Interface = 1
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 2(Mouse)
  09 21 11 01 00 01 22 DF 00 
    HID, 1 report descriptor
  07 05 82 03 0A 00 01 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 10
    Polling Interval = 1
  09 04 02 00 01 03 00 00 00 
    Interface = 2
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 0 / 0
  09 21 11 01 00 01 22 3F 01 
    HID, 1 report descriptor
  07 05 83 03 20 00 01 
    Endpoint = 3 IN
    Type = Interrupt
    Max Size = 32
    Polling Interval = 1
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20007760
KeyboardController claim this=20007B20
KeyboardController claim this=20007DC0
HIDParser claim this=200051E0
HIDParser claim this=200058A0
HIDParser claim this=20005F60
HIDParser claim this=20006620
HIDParser claim this=20006CE0
Descriptor 4 = INTERFACE
KeyboardController claim this=20007B20
09 04 00 00 01 03 01 01 00 09 21 11 01 00 01 22 4B 00 07 05 81 03 08 00 04 09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 DF 00 07 05 82 03 0A 00 01 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 3F 01 07 05 83 03 20 00 01 
ep = 81
packet size = 8
polling interval = 4
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 3, at offset = 0, shift= 1
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 DF 00 07 05 82 03 0A 00 01 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 3F 01 07 05 83 03 20 00 01 
HIDParser claim this=200051E0
 bInterfaceNumber =   1
 bInterfaceClass =    3
 bInterfaceSubClass = 1
 bInterfaceProtocol = 2
HID Parser Claim: 09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 DF 00 07 05 82 03 0A 00 01 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 3F 01 07 05 83 03 20 00 01 
report descriptor size = 223
Single endpoint HID:
  endpoint = 82
   size = 10
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 3, at offset = 1, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 3F 01 07 05 83 03 20 00 01 
HIDParser claim this=200058A0
 bInterfaceNumber =   2
 bInterfaceClass =    3
 bInterfaceSubClass = 0
 bInterfaceProtocol = 0
HID Parser Claim: 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 3F 01 07 05 83 03 20 00 01 
report descriptor size = 319
Single endpoint HID:
  endpoint = 83
   size = 32
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 5, at offset = 1, shift= 3
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (keyboard)
  mesg = A21
timer event (22768 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
control callback (hid)
05 01 09 02 A1 01 05 01 09 02 A1 02 85 1A 09 01 A1 00 05 09 19 01 29 05 95 05 75 01 15 00 25 01 81 02 75 03 95 01 81 01 05 01 09 30 09 31 95 02 75 10 16 01 80 26 FF 7F 81 06 A1 02 85 12 09 48 95 01 75 02 15 00 25 01 35 01 45 0C B1 02 85 1A 09 38 35 00 45 00 95 01 75 10 16 01 80 26 FF 7F 81 06 C0 A1 02 85 12 09 48 75 02 15 00 25 01 35 01 45 0C B1 02 35 00 45 00 75 04 B1 01 85 1A 05 0C 95 01 75 10 16 01 80 26 FF 7F 0A 38 02 81 06 C0 C0 C0 C0 05 0C 09 01 A1 01 05 01 09 02 A1 02 85 1F 05 0C 0A 38 02 95 01 75 10 16 01 80 26 FF 7F 81 06 85 17 06 00 FF 0A 06 FF 0A 0F FF 15 00 25 01 35 01 45 0C 95 02 75 02 B1 02 0A 04 FF 35 00 45 00 95 01 75 01 B1 02 75 03 B1 01 C0 C0 
  mesg = 22000681
  got report descriptor
Found top level collection 10002
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
Found top level collection C0001
find_driver
  driver 20007B2C
control callback (hid)
05 0C 09 01 A1 01 85 20 06 00 FF 15 00 26 FF 00 75 08 95 12 0A 0A FA B1 02 85 21 06 00 FF 15 00 25 01 75 01 95 10 1A 10 FA 2A 1F FA 81 02 85 28 06 00 FF 1A 10 FA 2A 1F FA B1 02 85 22 06 00 FF 15 00 26 FF 00 75 08 95 1A 0A 0A FA B1 02 85 23 06 00 FF 0A 0A FA B1 02 85 24 06 00 FF 95 1F 0A 0A FA B1 02 85 25 06 00 FF 0A 0A FA B1 02 85 26 06 00 FF 0A 0A FA B1 02 85 27 06 00 FF 0A 0A FA 81 02 85 14 06 00 FF 15 00 25 03 75 02 95 01 0A 01 FE 81 02 75 06 81 01 85 04 06 00 FF 15 00 25 03 75 02 95 01 0A 01 FE 81 02 75 06 81 01 C0 05 0C 09 01 A1 01 85 07 05 0C 19 00 2A FF 03 95 01 75 10 15 00 26 FF 03 81 00 05 07 19 00 29 FF 75 08 26 FF 00 81 00 81 01 06 00 FF 0A 03 FE 0A 04 FE 75 01 95 02 25 01 81 02 0A 05 FF 95 01 75 05 25 1F 81 02 75 01 81 01 1A 01 FD 2A FF FD 15 01 26 FF 00 75 08 81 00 0A 02 FF 26 FF 00 15 00 81 02 C0 06 BC FF 09 88 A1 01 85 08 19 01 29 FF 15 01 26 FF 00 95 01 75 08 81 00 C0 05 01 09 80 A1 01 85 03 19 00 29 FF 15 00 26 FF 00 81 00 C0 
  mesg = 22000681
  got report descriptor
Found top level collection C0001
find_driver
  driver 20007B2C
Found top level collection C0001
find_driver
  driver 20007B2C
Found top level collection FFBC0088
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
No Driver claimed topusage: FFBC0088
Found top level collection 10080
find_driver
  driver 20007B2C
begin, usage=C0000
       type= 2
       min=  0
       max=  1
       reportcount=16
       usage count=255
Input, total bits=16
  usage = FF00FA10  data = 0
  usage = FF00FA11  data = 0
  usage = FF00FA12  data = 0
  usage = FF00FA13  data = 0
  usage = FF00FA14  data = 0
  usage = FF00FA15  data = 0
  usage = FF00FA16  data = 0
  usage = FF00FA17  data = 0
  usage = FF00FA18  data = 0
  usage = FF00FA19  data = 0
  usage = FF00FA1A  data = 0
  usage = FF00FA1B  data = 1
  usage = FF00FA1C  data = 0
  usage = FF00FA1D  data = 0
  usage = FF00FA1E  data = 0
  usage = FF00FA1F  data = 0
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 0
HUB Callback (member)
status = 8
getstatus, port = 3
USBHub control callback
03 03 10 00 
New Port Status
  status=100303  port=3
  state=7
  Device is present: 
  Enabled, speed = 1.5 Mbit/sec
  Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (24999 us): Hello, I'm resettimer, this = 200073A0, timer = 200076D8
port_doing_reset = 3
PORT_RECOVERY
new_Device: 1.5 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 01 00 00 00 08 3C 41 07 21 15 01 01 02 00 01 
    VendorID = 413C, ProductID = 2107, Version = 0115
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Dell
enumeration:
Product: Dell USB Entry Keyboard
enumeration:
Config data length = 34
enumeration:
Configuration Descriptor:
  09 02 22 00 01 01 00 A0 32 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 01 03 01 01 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 1(Keyboard)
  09 21 10 01 00 01 22 41 00 
    HID, 1 report descriptor
  07 05 81 03 08 00 0A 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20007760
KeyboardController claim this=20007DC0
HIDParser claim this=20005F60
HIDParser claim this=20006620
HIDParser claim this=20006CE0
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 00 00 01 03 01 01 00 09 21 10 01 00 01 22 41 00 07 05 81 03 08 00 0A 
ep = 81
packet size = 8
polling interval = 10
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 6, at offset = 0, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (keyboard)
  mesg = A21
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup
*** Device Hub1 1a40:101 - connected ***
  product: USB 2.0 Hub
*** Device KB1 45e:7b2 - connected ***
  manufacturer: Microsoft
  product: Microsoft� Nano Transceiver v1.0
*** Device KB2 413c:2107 - connected ***
  manufacturer: Dell
  product: Dell USB Entry Keyboard
*** Device HID1 45e:7b2 - connected ***
  manufacturer: Microsoft
  product: Microsoft� Nano Transceiver v1.0
*** Device HID2 45e:7b2 - connected ***
  manufacturer: Microsoft
  product: Microsoft� Nano Transceiver v1.0
*** HID Device Mouse1 45e:7b2 - connected ***
  manufacturer: Microsoft
  product: Microsoft� Nano Transceiver v1.0

logitech wireless reciever full debug log
Code:
USB Host Testing
960
USB2 PLL running
 reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
    connect
  begin reset
port change: 18001205
  port enabled
  end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 09 00 01 40 40 1A 01 01 11 01 00 01 00 01 
    VendorID = 1A40, ProductID = 0101, Version = 0111
    Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
    Number of Configurations = 1
enumeration:
enumeration:
Product: USB 2.0 Hub
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
  09 02 19 00 01 01 00 E0 32 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 01 09 00 00 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 9(Hub) / 0 / 0
  07 05 81 03 01 00 0C 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 1
    Polling Interval = 12
enumeration:
USBHub memory usage = 960
USBHub claim_device this=200073A0
found possible interface, altsetting=0
number of interfaces found = 1
USBHub control callback
09 29 04 00 00 32 64 00 FF 00 00 00 00 00 00 00 
Hub ports = 4
USBHub control callback
USBHub control callback
USBHub control callback
USBHub control callback
power turned on to all ports
device addr = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012101
HUB Callback (member)
status = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 01 00 
New Port Status
  status=10101  port=2
  state=0
  Device is present: 
  Has Power
USBHub control callback
Port Status Cleared, port=2
getstatus, port = 3
USBHub control callback
01 03 01 00 
New Port Status
  status=10301  port=3
  state=0
  Device is present: 
  Has Power
USBHub control callback
Port Status Cleared, port=3
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=2
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=2
  Device is present: 
  Has Power
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=3
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=3
  Device is present: 
  Has Power
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=4
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=4
  Device is present: 
  Has Power
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=5
  Device is present: 
  Has Power
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=5
  Device is present: 
  Has Power
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = C
getstatus, port = 2
deferred getstatus, port = 3
USBHub control callback
01 01 00 00 
New Port Status
  status=101  port=2
  state=6
  Device is present: 
  Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
HUB Callback (member)
status = 4
getstatus, port = 2
USBHub control callback
03 01 10 00 
New Port Status
  status=100103  port=2
  state=7
  Device is present: 
  Enabled, speed = 12 Mbit/sec
  Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (19999 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
timer event (24999 us): Hello, I'm resettimer, this = 200073A0, timer = 200076D8
port_doing_reset = 2
PORT_RECOVERY
new_Device: 12 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 00 02 00 00 00 08 6D 04 2B C5 07 12 01 02 00 01 
    VendorID = 046D, ProductID = C52B, Version = 1207
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Logitech
enumeration:
Product: USB Receiver
enumeration:
Config data length = 84
enumeration:
Configuration Descriptor:
  09 02 54 00 03 01 04 A0 31 
    NumInterfaces = 3
    ConfigurationValue = 1
  09 04 00 00 01 03 01 01 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 1(Keyboard)
  09 21 11 01 00 01 22 3B 00 
    HID, 1 report descriptor
  07 05 81 03 08 00 08 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 8
  09 04 01 00 01 03 01 02 00 
    Interface = 1
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 2(Mouse)
  09 21 11 01 00 01 22 94 00 
    HID, 1 report descriptor
  07 05 82 03 08 00 02 
    Endpoint = 2 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 2
  09 04 02 00 01 03 00 00 00 
    Interface = 2
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 0 / 0
  09 21 11 01 00 01 22 5D 00 
    HID, 1 report descriptor
  07 05 83 03 20 00 02 
    Endpoint = 3 IN
    Type = Interrupt
    Max Size = 32
    Polling Interval = 2
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20007760
KeyboardController claim this=20007B20
KeyboardController claim this=20007DC0
HIDParser claim this=200051E0
HIDParser claim this=200058A0
HIDParser claim this=20005F60
HIDParser claim this=20006620
HIDParser claim this=20006CE0
Descriptor 4 = INTERFACE
KeyboardController claim this=20007B20
09 04 00 00 01 03 01 01 00 09 21 11 01 00 01 22 3B 00 07 05 81 03 08 00 08 09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 94 00 07 05 82 03 08 00 02 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 5D 00 07 05 83 03 20 00 02 
ep = 81
packet size = 8
polling interval = 8
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 3, at offset = 0, shift= 1
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 94 00 07 05 82 03 08 00 02 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 5D 00 07 05 83 03 20 00 02 
HIDParser claim this=200051E0
 bInterfaceNumber =   1
 bInterfaceClass =    3
 bInterfaceSubClass = 1
 bInterfaceProtocol = 2
HID Parser Claim: 09 04 01 00 01 03 01 02 00 09 21 11 01 00 01 22 94 00 07 05 82 03 08 00 02 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 5D 00 07 05 83 03 20 00 02 
report descriptor size = 148
Single endpoint HID:
  endpoint = 82
   size = 8
   interval = 2
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 3, at offset = 2, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 5D 00 07 05 83 03 20 00 02 
HIDParser claim this=200058A0
 bInterfaceNumber =   2
 bInterfaceClass =    3
 bInterfaceSubClass = 0
 bInterfaceProtocol = 0
HID Parser Claim: 09 04 02 00 01 03 00 00 00 09 21 11 01 00 01 22 5D 00 07 05 83 03 20 00 02 
report descriptor size = 93
Single endpoint HID:
  endpoint = 83
   size = 32
   interval = 2
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 4, at offset = 1, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (keyboard)
  mesg = A21
timer event (20824 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 8
getstatus, port = 3
control callback (hid)
05 01 09 02 A1 01 85 02 09 01 A1 00 95 10 75 01 15 00 25 01 05 09 19 01 29 10 81 02 95 02 75 0C 16 01 F8 26 FF 07 05 01 09 30 09 31 81 06 95 01 75 08 15 81 25 7F 09 38 81 06 95 01 05 0C 0A 38 02 81 06 C0 C0 05 0C 09 01 A1 01 85 03 95 02 75 10 15 01 26 FF 02 19 01 2A FF 02 81 00 C0 05 01 09 80 A1 01 85 04 95 01 75 02 15 01 25 03 09 82 09 81 09 83 81 00 75 06 81 03 C0 06 BC FF 09 88 A1 01 85 08 95 01 75 08 15 01 26 FF 00 19 01 29 FF 81 00 C0 
  mesg = 22000681
  got report descriptor
Found top level collection 10002
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
Found top level collection C0001
find_driver
  driver 20007B2C
Found top level collection 10080
find_driver
  driver 20007B2C
Found top level collection FFBC0088
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
No Driver claimed topusage: FFBC0088
control callback (hid)
06 00 FF 09 01 A1 01 85 10 95 06 75 08 15 00 26 FF 00 09 01 81 00 09 01 91 00 C0 06 00 FF 09 02 A1 01 85 11 95 13 75 08 15 00 26 FF 00 09 02 81 00 09 02 91 00 C0 06 00 FF 09 04 A1 01 85 20 95 0E 75 08 15 00 26 FF 00 09 41 81 00 09 41 91 00 85 21 95 1F 09 42 81 00 09 42 91 00 C0 
  mesg = 22000681
  got report descriptor
Found top level collection FF000001
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
No Driver claimed topusage: FF000001
Found top level collection FF000002
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
No Driver claimed topusage: FF000002
Found top level collection FF000004
find_driver
  driver 20007B2C
  driver 20007DCC
  driver 20008FEC
No Driver claimed topusage: FF000004
USBHub control callback
01 03 00 00 
New Port Status
  status=301  port=3
  state=6
  Device is present: 
  Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
timer event (20000 us): Debounce Timer, this = 200073A0, timer = 200076B8
ports in use bitmask = 0
HUB Callback (member)
status = 8
getstatus, port = 3
USBHub control callback
03 03 10 00 
New Port Status
  status=100303  port=3
  state=7
  Device is present: 
  Enabled, speed = 1.5 Mbit/sec
  Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (24999 us): Hello, I'm resettimer, this = 200073A0, timer = 200076D8
port_doing_reset = 3
PORT_RECOVERY
new_Device: 1.5 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
  12 01 10 01 00 00 00 08 3C 41 07 21 15 01 01 02 00 01 
    VendorID = 413C, ProductID = 2107, Version = 0115
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: Dell
enumeration:
Product: Dell USB Entry Keyboard
enumeration:
Config data length = 34
enumeration:
Configuration Descriptor:
  09 02 22 00 01 01 00 A0 32 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 01 03 01 01 00 
    Interface = 0
    Number of endpoints = 1
    Class/Subclass/Protocol = 3(HID) / 1(Boot) / 1(Keyboard)
  09 21 10 01 00 01 22 41 00 
    HID, 1 report descriptor
  07 05 81 03 08 00 0A 
    Endpoint = 1 IN
    Type = Interrupt
    Max Size = 8
    Polling Interval = 10
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20007760
KeyboardController claim this=20007DC0
HIDParser claim this=20005F60
HIDParser claim this=20006620
HIDParser claim this=20006CE0
Descriptor 4 = INTERFACE
KeyboardController claim this=20007DC0
09 04 00 00 01 03 01 01 00 09 21 10 01 00 01 22 41 00 07 05 81 03 08 00 0A 
ep = 81
packet size = 8
polling interval = 10
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 5, at offset = 2, shift= 3
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (keyboard)
  mesg = A21
*** Device Hub1 1a40:101 - connected ***
  product: USB 2.0 Hub
*** Device KB1 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device KB2 413c:2107 - connected ***
  manufacturer: Dell
  product: Dell USB Entry Keyboard
*** Device HID1 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID2 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** HID Device Mouse1 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
 
Last edited:
if i compare the debug logs the following error message is only present in the microsoft wireless reciever debug logs have someone a clue what that error means ?

Code:
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup

come on guys it's just a microsoft reciever and a wired dell keyboard if we not get microsoft+dell products running we will never fly to the mars ;-)
 
Last edited:
@epi - A quick question. I assume you are using a hub. How many physical device are plugged into the wireless receivers, wired keyboard etc.. In the sketch above I noticed that you have:
Code:
USBHub hub1(myusb);
USBHub hub2(myusb);

That will support two physical USB devices plugged into the hub. If you use a third port you will need to add another hub port define:
Code:
USBHub hub3(myusb);

Just a shot in the dark:)

Edit: Forget this post I did not fully understand what you were doing. It's not going to help:(
 
Last edited:
its a powered 4 port hub and i also tested it with another unpowered 4 port hub.
just to prove you are wrong i added some USBHub to the code but it not resolve the issue.
i thinks as the error message in the debug log shows there is a KeyboardController Callback error.

Hub Example 1
port1: microsoft reciever (mouse) https://www.amazon.com/Microsoft-Wireless-Mobile-Mouse-4000/dp/B002DPUUL4
port2: dell keyboard (not working):
port3: empty
port4: empty

Hub Example 2:
port1: logitech reciever (mouse)
port2: dell keyboard (working)
port3: empty
port4: empty
 
Last edited:
its a powered 4 port hub and i also tested it with another unpowered 4 port hub.
just to prove you are wrong i added some USBHub to the code but it not resolve the issue.
i thinks as the error message in the debug log shows there is a KeyboardController Callback error.

Hub Example 1
port1: microsoft reciever (mouse)
port2: dell keyboard (not working):
port3: empty
port4: empty

Hub Example 2:
port1: logitech reciever (mouse)
port2: dell keyboard (working)
port3: empty
port4: empty

See the edit in my post. I do not have a Microsoft wireless keyboard/mouse combo but I do have Logitech ones and wired keyboards and wired mice. Going to play with this using your sketch.
 
i also tried to set the microsoft reciever to "PROTOCOL Boot" with keyboard.cpp but i get the same KeyboardController Callback "Error Followup".
 
Sorry distracted with other things...

Who knows, maybe one or more resources are taken up...

That is if you have two hub objects, each hub actually sets up for N connections, but depending on your Hub some actually are composite hubs. That is a 8 connection hub may be built up with 2 or 3 smaller hubs...

Also some devices like keyboards have built in hub... I have a dell one like that...

Also some devices may consume/use multiple HID devices....


If me, I would turn on debug code look at the define at the start of USBHost_t36.h is a define that turns out lots of the debugging outputs, I would turn that on and see if it shows up anything.

Also checking each object like hid to see if looks like they are free or not...
 
hello KurtE thanks for your response
if i enable all debug msg in USBHost_t36h and ehci.cpp the only output is that there is a USB Error but i don't know where to change the code to just skip the device as keyboard if there is any error.
a workaround maybe would be if the microsoft reciever is just used as mouse and not also as keyboard by the USBHost_t36h if there is any usb error found or just skip it as keyboard by vendorid.

Code:
ISR: 8C083
 USB Error
 USB Periodic
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup
 
Last edited:
hello KurtE thanks for your response
if i enable all debug msg in USBHost_t36h and ehci.cpp the only output is that there is a USB Error but i don't know where to change the code to just skip the device as keyboard if there is any error.
a workaround maybe would be if the microsoft reciever is just used as mouse and not also as keyboard by the USBHost_t36h if there is any usb error found or just skip it as keyboard by vendorid.

Code:
ISR: 8C083
 USB Error
 USB Periodic
KeyboardController Callback (member)
  KB Data: 00 00 00 00 00 00 00 00 
ERROR Followup

Which product is this? i.e. do you have link for amazon...

I hsve used/tested on Microsoft combination mouse, keyboard in the past: Ones like: https://smile.amazon.com/Microsoft-Ergonomic-Desktop-Keyboard-L5V-00002/dp/B00DUV01SC
But they probably have many different versions..
 
bump

10 chars

Edit: I am thinking it has to do with occupation order of KeyboardController
 
Sorry, but hard to know what is going on with this. And details about some of thest things.

For example the Microsoft Mouse, is it it's own hook up that emulates normal wired keyboard? I have some MS combo units that did that.
Or is it for example Bluetooth? And then if it is Bluetooth, and it uses BLE, then we don't have support yet. I have such a mouse that does not work.

So often times we end up needing to know exactly which device as they may not all talk the same.
 
I completely understand, but for some people that used a Teensy 4.1 board (that I know of) it works out of the box, and other just wont (depending on their setup), talking Mouse + Keyboard (and USB Hub).
For example I had a similar issue on this setup: https://forum.pjrc.com/threads/70452-Keyboard-not-working-properly-(USB-Host)
Mostly both work individually connected, but not via USB Hub indidivually connected.

"Mouse only" works 100% of the time, usually.
What bothers me the most currently is that for example the Logitech G Pro Superlight (a popular gaming mouse; the only mouse that does this in 20+ mices!), keeps holding the Control Button on a Keyboard Interface, as well as keeps turning off after a while and never wakes up (internal battery save mode). Although directly connected to a Windows/Linux/Mac machine it works perfectly fine, also wakes again w/o additional software.

If you could look into the Logitech G Pro Superlight (with a KeyboardController inside the flashed script; https://www.amazon.de/Logitech-Gaming-Maus-Ultra-leicht-programmierbare-Akkulaufzeit/dp/B07W4DHKTD), that be great.
I would love to discuss this and help fix those nasty bugs.

Last version I tested these things was on 1.56.
 
Last edited:
With some of these mice, I have purchased different ones. But not sure about $150 mouse 8)

Might be interesting to see what messages it generates when plugged in. and/or turned on. And compare it to others
 
Okay, I did some more testings, sometimes it picks up the devices in the wrong order. Making the kb light up, but not work. Replugging the hub (with Mouse+KB) multiple times fixes it.
For example it takes the Keyboard from your mouse as keyboardcontroller, which makes these things happen (my assumption). The MouseController does not have these issues, because only one exists (from the Mouse).
Maybe its possible to prioritize keyboards first?
 
Last edited:
I think one possible way to fix this is to occupy the KeyboardController with a HID device without Mouse Interface first before the one with mouse interface.
 
@KurtE - my computer didn't stop my getting to the post #20 'downloader' (and didn't see an obvious attack) it displayed an HTML that won't attach as a file. Here is a TEXT copy of the content.
Code:
USB-Verbundgerät

Connection Status	Device connected
Current Configuration	1
Speed	Full (12 Mbit/s)
Device Address	30
Number Of Open Pipes	3
Device Descriptor USB Receiver
Offset	Field	Size	Value	Description
0	bLength	1	12h	
1	bDescriptorType	1	01h	Device
2	bcdUSB	2	0200h	USB Spec 2.0
4	bDeviceClass	1	00h	Class info in Ifc Descriptors
5	bDeviceSubClass	1	00h	
6	bDeviceProtocol	1	00h	
7	bMaxPacketSize0	1	40h	64 bytes
8	idVendor	2	046Dh	Logitech, Inc.
10	idProduct	2	C547h	
12	bcdDevice	2	0402h	4.02
14	iManufacturer	1	01h	"Logitech"
15	iProduct	1	02h	"USB Receiver"
16	iSerialNumber	1	00h	
17	bNumConfigurations	1	01h	
Configuration Descriptor 1 Bus Powered, 98 mA
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	02h	Configuration
2	wTotalLength	2	0054h	
4	bNumInterfaces	1	03h	
5	bConfigurationValue	1	01h	
6	iConfiguration	1	04h	"MPR04.02_B0009"
7	bmAttributes	1	A0h	Bus Powered, Remote Wakeup
4..0: Reserved		...00000 	
5: Remote Wakeup		..1..... 	Yes
6: Self Powered		.0...... 	No, Bus Powered
7: Reserved (set to one)
(bus-powered for 1.0)		1....... 	
8	bMaxPower	1	31h	98 mA
Interface Descriptor 0/0 HID, 1 Endpoint
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	04h	Interface
2	bInterfaceNumber	1	00h	
3	bAlternateSetting	1	00h	
4	bNumEndpoints	1	01h	
5	bInterfaceClass	1	03h	HID
6	bInterfaceSubClass	1	01h	Boot Interface
7	bInterfaceProtocol	1	02h	Mouse
8	iInterface	1	00h	
HID Descriptor
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	21h	HID
2	bcdHID	2	0111h	1.11
4	bCountryCode	1	00h	
5	bNumDescriptors	1	01h	
6	bDescriptorType	1	22h	Report
7	wDescriptorLength	2	0053h	83 bytes
Endpoint Descriptor 81 1 In, Interrupt, 1 ms
Offset	Field	Size	Value	Description
0	bLength	1	07h	
1	bDescriptorType	1	05h	Endpoint
2	bEndpointAddress	1	81h	1 In
3	bmAttributes	1	03h	Interrupt
1..0: Transfer Type		......11 	Interrupt
7..2: Reserved		000000.. 	
4	wMaxPacketSize	2	0040h	64 bytes
6	bInterval	1	01h	1 ms
Interface Descriptor 1/0 HID, 1 Endpoint
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	04h	Interface
2	bInterfaceNumber	1	01h	
3	bAlternateSetting	1	00h	
4	bNumEndpoints	1	01h	
5	bInterfaceClass	1	03h	HID
6	bInterfaceSubClass	1	01h	Boot Interface
7	bInterfaceProtocol	1	01h	Keyboard
8	iInterface	1	00h	
HID Descriptor
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	21h	HID
2	bcdHID	2	0111h	1.11
4	bCountryCode	1	00h	
5	bNumDescriptors	1	01h	
6	bDescriptorType	1	22h	Report
7	wDescriptorLength	2	0085h	133 bytes
Endpoint Descriptor 82 2 In, Interrupt, 1 ms
Offset	Field	Size	Value	Description
0	bLength	1	07h	
1	bDescriptorType	1	05h	Endpoint
2	bEndpointAddress	1	82h	2 In
3	bmAttributes	1	03h	Interrupt
1..0: Transfer Type		......11 	Interrupt
7..2: Reserved		000000.. 	
4	wMaxPacketSize	2	0040h	64 bytes
6	bInterval	1	01h	1 ms
Interface Descriptor 2/0 HID, 1 Endpoint
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	04h	Interface
2	bInterfaceNumber	1	02h	
3	bAlternateSetting	1	00h	
4	bNumEndpoints	1	01h	
5	bInterfaceClass	1	03h	HID
6	bInterfaceSubClass	1	00h	
7	bInterfaceProtocol	1	00h	
8	iInterface	1	00h	
HID Descriptor
Offset	Field	Size	Value	Description
0	bLength	1	09h	
1	bDescriptorType	1	21h	HID
2	bcdHID	2	0111h	1.11
4	bCountryCode	1	00h	
5	bNumDescriptors	1	01h	
6	bDescriptorType	1	22h	Report
7	wDescriptorLength	2	0036h	54 bytes
Endpoint Descriptor 83 3 In, Interrupt, 1 ms
Offset	Field	Size	Value	Description
0	bLength	1	07h	
1	bDescriptorType	1	05h	Endpoint
2	bEndpointAddress	1	83h	3 In
3	bmAttributes	1	03h	Interrupt
1..0: Transfer Type		......11 	Interrupt
7..2: Reserved		000000.. 	
4	wMaxPacketSize	2	0040h	64 bytes
6	bInterval	1	01h	1 ms
Interface 0 HID Report Descriptor Mouse
Item Tag (Value)	Raw Data
Usage Page (Generic Desktop)	05 01 
Usage (Mouse)	09 02 
Collection (Application)	A1 01 
    Usage (Pointer)	09 01 
    Collection (Physical)	A1 00 
        Report Count (16)	95 10 
        Report Size (1)	75 01 
        Logical Minimum (0)	15 00 
        Logical Maximum (1)	25 01 
        Usage Page (Button)	05 09 
        Usage Minimum (Button 1)	19 01 
        Usage Maximum (Button 16)	29 10 
        Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 02 
        Report Count (2)	95 02 
        Report Size (16)	75 10 
        Logical Minimum (-32767)	16 01 80 
        Logical Maximum (32767)	26 FF 7F 
        Usage Page (Generic Desktop)	05 01 
        Usage (X)	09 30 
        Usage (Y)	09 31 
        Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)	81 06 
        Report Count (1)	95 01 
        Report Size (8)	75 08 
        Logical Minimum (-127)	15 81 
        Logical Maximum (127)	25 7F 
        Usage (Wheel)	09 38 
        Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)	81 06 
        Report Count (1)	95 01 
        Usage Page (Consumer Devices)	05 0C 
        Usage (AC Pan)	0A 38 02 
        Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)	81 06 
    End Collection	C0 
    Usage Page (Vendor-Defined 1)	06 00 FF 
    Usage (Vendor-Defined 241)	09 F1 
    Report Size (8)	75 08 
    Report Count (5)	95 05 
    Logical Minimum (0)	15 00 
    Logical Maximum (255)	26 FF 00 
    Input (Data,Ary,Abs)	81 00 
End Collection	C0 
Interface 1 HID Report Descriptor Keyboard
Item Tag (Value)	Raw Data
Usage Page (Generic Desktop)	05 01 
Usage (Keyboard)	09 06 
Collection (Application)	A1 01 
    Report ID (1)	85 01 
    Usage Page (Keyboard/Keypad)	05 07 
    Usage Minimum (Keyboard Left Control)	19 E0 
    Usage Maximum (Keyboard Right GUI)	29 E7 
    Logical Minimum (0)	15 00 
    Logical Maximum (1)	25 01 
    Report Size (1)	75 01 
    Report Count (8)	95 08 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 02 
    Report Count (5)	95 05 
    Usage Page (LEDs)	05 08 
    Usage Minimum (Num Lock)	19 01 
    Usage Maximum (Kana)	29 05 
    Output (Data,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)	91 02 
    Report Count (1)	95 01 
    Report Size (3)	75 03 
    Output (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)	91 03 
    Report Count (112)	95 70 
    Report Size (1)	75 01 
    Usage Page (Keyboard/Keypad)	05 07 
    Usage Minimum (Keyboard a and A)	19 04 
    Usage Maximum (Keyboard F24)	29 73 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 02 
    Report Count (5)	95 05 
    Usage Minimum (Keyboard International 1)	19 87 
    Usage Maximum (Keyboard International 5)	29 8B 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 02 
    Report Count (3)	95 03 
    Usage Minimum (Keyboard LANG1)	19 90 
    Usage Maximum (Keyboard LANG3)	29 92 
    Input (Data,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 02 
End Collection	C0 
Usage Page (Consumer Devices)	05 0C 
Usage (Consumer Control)	09 01 
Collection (Application)	A1 01 
    Report ID (3)	85 03 
    Report Count (2)	95 02 
    Report Size (16)	75 10 
    Logical Minimum (1)	15 01 
    Logical Maximum (767)	26 FF 02 
    Usage Minimum (Consumer Control)	19 01 
    Usage Maximum	2A FF 02 
    Input (Data,Ary,Abs)	81 00 
End Collection	C0 
Usage Page (Generic Desktop)	05 01 
Usage (System Control)	09 80 
Collection (Application)	A1 01 
    Report ID (4)	85 04 
    Report Count (1)	95 01 
    Report Size (2)	75 02 
    Logical Minimum (1)	15 01 
    Logical Maximum (3)	25 03 
    Usage (System Sleep)	09 82 
    Usage (System Power Down)	09 81 
    Usage (System Wake Up)	09 83 
    Input (Data,Ary,Abs)	81 00 
    Report Size (1)	75 01 
    Logical Minimum (0)	15 00 
    Logical Maximum (1)	25 01 
    Usage (Undefined)	09 9B 
    Input (Data,Var,Rel,NWrp,Lin,Pref,NNul,Bit)	81 06 
    Report Size (5)	75 05 
    Input (Cnst,Var,Abs,NWrp,Lin,Pref,NNul,Bit)	81 03 
End Collection	C0 
Interface 2 HID Report Descriptor Vendor-Defined 1
Item Tag (Value)	Raw Data
Usage Page (Vendor-Defined 1)	06 00 FF 
Usage (Vendor-Defined 1)	09 01 
Collection (Application)	A1 01 
    Report ID (16)	85 10 
    Report Count (6)	95 06 
    Report Size (8)	75 08 
    Logical Minimum (0)	15 00 
    Logical Maximum (255)	26 FF 00 
    Usage (Vendor-Defined 1)	09 01 
    Input (Data,Ary,Abs)	81 00 
    Usage (Vendor-Defined 1)	09 01 
    Output (Data,Ary,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)	91 00 
End Collection	C0 
Usage Page (Vendor-Defined 1)	06 00 FF 
Usage (Vendor-Defined 2)	09 02 
Collection (Application)	A1 01 
    Report ID (17)	85 11 
    Report Count (19)	95 13 
    Report Size (8)	75 08 
    Logical Minimum (0)	15 00 
    Logical Maximum (255)	26 FF 00 
    Usage (Vendor-Defined 2)	09 02 
    Input (Data,Ary,Abs)	81 00 
    Usage (Vendor-Defined 2)	09 02 
    Output (Data,Ary,Abs,NWrp,Lin,Pref,NNul,NVol,Bit)	91 00 
End Collection	C0 
This report was generated by USBlyzer
 
Back
Top