Issues with USB Keyboard via USBHost_t36.h

arrow

New member
Is there any way to suppress the debugging messages? I do not have `#define USBHOST_PRINT_DEBUG` anywhere in my sketch. Additionally, in the USBHost_t36.h file itself, this line is commented out. Despite this, my serial console is absolutely getting spammed with messages such as "KeyboardController: topusage= 10000 usage=70066, value=0"

I am at a loss as to what to do. I need a relatively clean serial port for debugging other aspects of my project and the KeyboardController spam makes it impossible to see anything else.
 
Go into the USBHost_t36 library source file keyboard.cpp
and look at the function:
Code:
void KeyboardController::hid_input_data(uint32_t usage, int32_t value)
{
    // Hack ignore 0xff00 high words as these are user values...
    USBHDBGSerial.printf("KeyboardController: topusage= %x usage=%X, value=%d\n", topusage_, usage, value);
    if ((usage & 0xffff0000) == 0xff000000) return;
    // If this is the TOPUSAGE_KEYBOARD do in it's own function
    if (process_hid_keyboard_data(usage, value))
        return;


    // Special case if this is a battery level message
    if ((topusage_ == 0xc0000) && (usage == 0x60020)) {
        battery_level_ = map (value, lgmin_, lgmax_, 0, 100);
        USBHDBGSerial.printf("\tBattery level: %d min: %u max: %u percent: %u\n", value, lgmin_, lgmax_, battery_level_);


        return;
    }
And comment out (or delete the lines that look like: USBHDBGSerial.printf(...

Actually looks like: that was already done in a Pull request that was merged a while ago.
So try to simply download the current version from: https://github.com/PaulStoffregen/USBHost_t36
 
This is part of Teensyduino, no? If so, it doesn't appear that i have an update candidate within the Board Manager. :(

I noticed that a lot of things appear out of date with my Teensyduino installation, which is currently using version 1.59.0. The CMSIS DSP library included is a relatively ancient version 1.5.1 Is my installation borked, or is this just the current state of affairs with the board support?
 
Yes, it is part of Teensyduino and there have not been any releases with these changes in place.
You can still download the updated version from Paul's github... Or mine is now up to data as well.

Or you could wait for a release. Note: the last beta release was back last October (about 4 months ago), or if you only run on releases
The last one was about a year ago.

Not heard/seen much up here recently to know how eminent the next one might be.

EDIT: You still have the option of simply editing the file I mentioned above and comment out or delete the print statements.
 
Last edited:
Back
Top