USBHost_t36 Problem

Status
Not open for further replies.
I could plug into my computer to see if it shows as a HUB versus single device - what Windows tool will show you what you need to see? The device at hand is noted in post #79 >> KEYBOARD&MOUSE. As noted that thread - a similar but lone wireless keyboard will be here for testing 7/28/17.

<edit> that post had bad link text - corrected - but post #1 above copied it :(

DevMan shows this 'composite device' { no new hub } when I plug the 'USB receiver' in:
PCIROOT(0)#PCI(1502)#PCI(0000)#USBROOT(0)#USB(4)
ACPI(_SB_)#ACPI(PCI0)#ACPI(PE22)#PCI(0000)#USBROOT(0)#USB(4)

usb.inf:392c3d53461eda3a:Composite.Dev.NT:10.0.15063.0:USB\COMPOSITE

Plugged into a different port and scrolling Properties I see it does have two children - I suppose Mouse and keyboard:
USB\VID_046D&PID_C534&MI_00\9&2d8ebcee&0&0000
USB\VID_046D&PID_C534&MI_01\9&2d8ebcee&0&0001

The working device is labeled 'MSFT mouse and keyboard detection driver' and it too has two children - but works on T_3.6:
USB\VID_045E&PID_00F9&MI_00\9&261cd622&0&0000
USB\VID_045E&PID_00F9&MI_01\9&261cd622&0&0001

Oddly when I plug it in to Win 10 PC - it spazzes and repeats the 'x' key - I saw something of that on Teensy when I moved some papers - it is an OLD radio system - thus the 6 foot cord to receiver noted in other thread.
 
Last edited:
Difficult to say without seeing the USB descriptors. Maybe this a rare case of a keyboard not using the HID "boot protocol"? The current driver only works with boot protocol. Someday I'll write a full HID parser, but that it likely a long way off.

Of course it could be all sorts of other things.

To get a little more info, you could uncomment this line in USBHost_t36:

Code:
// #define USBHOST_PRINT_DEBUG
 
Is this the keyboard in question?

... Are you sure that's the right one?

Yes, that is one of TWO I got - one with and one without mouse. Both are listed in that other thread - both Logitec brand - both act the same - no sign of recognition. Somewhere my first question was if there was a WIN PC tool I could run that would give you a quick USB connection info view that might show what can/not be fixed.

It seemed logical that the device was perhaps setup to present two devices when it came with a mouse - it seems whatever issue it has is the same on that Keyboard only model - the cost was like $2 less - in fact that keyboard alone is now $20 and I paid less than that when the mouse was in box ready to run with extra Duracell batterie.
 
Is this the keyboard in question?

https://www.amazon.com/Logitech-K360-Wireless-Keyboard-Compact/dp/B007PJ4PN2

When I view it on Amazon, it does not appear to have any mouse stuff. Are you sure that's the right one?

Tried a different brand and it fails to be recognized as well:
- I just got another new Wireless keyboard and it also DOES NOT WORK with Teensy64 :( Comes right up on my desktop.

Microsoft 850 PZ3-00001 Black RF Wireless Standard Keyboard

My old defective MSFT keyboard worked - but the "X" is toast. I'm not sure which Frank has that luckily works for him.
 
Tried a different brand and it fails to be recognized as well:


My old defective MSFT keyboard worked - but the "X" is toast. I'm not sure which Frank has that luckily works for him.

Hm. Can you please measure the voltage on the USB-HOST connector with the wireless transmitter attached ?
The traces on my first board rev are a bit thin.
 
Last edited:
I probably could look it up, but is there a simple test sketch for testing this...

Might take me a little to figure out a hardware setup... I may need to order a connector... Thought I had one, but it has the wrong layout... (handles 2 USB ports for UP board plus external Serial port)

I could try out a few keyboards and see if they work... I have an old DELL keyboard I use with my linux boards
Using it with linux it shows up as from from lite-on...
Code:
   2.571317] usb 1-1.3: new low-speed USB device number 4 using dwc_otg
[    2.731501] usb 1-1.3: New USB device found, idVendor=04ca, idProduct=0027
[    2.741113] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.750486] usb 1-1.3: Product: USB Multimedia Keyboard
[    2.760107] usb 1-1.3: Manufacturer: Lite-On Technology Corp.
[    2.785378] input: Lite-On Technology Corp. USB Multimedia Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:04CA:0027.0002/input/input1
[    2.862645] hid-generic 0003:04CA:0027.0002: input,hidraw1: USB HID v1.10 Keyboard [Lite-On Technology Corp. USB Multimedia Keyboard] on usb-20980000.usb-1.3/input0
[    2.902340] input: Lite-On Technology Corp. USB Multimedia Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.3/1-1.3:1.1/0003:04CA:0027.0003/input/input2
I also have a few logitech wireless keyboards and a few Microsoft wireless setups
 
Paul/Frank:

Good news Paul.

RE Frank post #8 above:
Can you please measure the voltage on the USB-HOST connector with the wireless transmitter attached ?
The traces on my first board rev are a bit thin.

USB Battery Box: VIN shows 5.1V and the hot pin on USB shows 4.74

From Computer VIN is 5.03 and the hot USB pin is 4.65

That is with the USB adapter ON and OFF, The only drop is about 0.01 when the adapter is put on before power up.

When I power it up with an OLD 2GB FLASH drive I get USB connect SPEW showing the device online.

If that voltage is Low let me know - perhaps I can run a wire to supplement the trace?

As noted - I did have the MSFT wireless connect, and no problem with one or more wired keyboards I tried.
 
Paul/Frank:

Good news Paul.

RE Frank post #8 above:

USB Battery Box: VIN shows 5.1V and the hot pin on USB shows 4.74

From Computer VIN is 5.03 and the hot USB pin is 4.65

That is with the USB adapter ON and OFF, The only drop is about 0.01 when the adapter is put on before power up.

When I power it up with an OLD 2GB FLASH drive I get USB connect SPEW showing the device online.

If that voltage is Low let me know - perhaps I can run a wire to supplement the trace?

As noted - I did have the MSFT wireless connect, and no problem with one or more wired keyboards I tried.

Thank you! I just wanted to make sure that is no hardware problem.
 
The Logitech K360 keyboard arrived yesterday. I'm testing it now.

It seems to be working fine. I'm running the "Test" example and when I type on the keyboard, the keystrokes show up in the serial monitor.

sc.png
 
Actually they are one in the same ;) He released beta 4 with it....

But: don't think that would change anything, at least I did not see any changes with the keyboard part of the code...

Trying to debug mouse on other thread.

Actually right now trying to figure out how to get more of the descriptor for the mouse to know which one you have... Or more specific things like how wide the button field is, likewise for X and Y as I have 4 different mice, one has 8 bit coordinates, another 2 I think have 12 bit an 4th has 16 bit...
 
Note: you might want to try the simple test program he showed, maybe using the Beta version of the T3.6 that had the host adapter. I have not done that yet, but did purchase an adapter for a T3.6 from Amazon, which I have plugged into one of the DIP like board adapters, which I used to debug stuff on...

And I have tested the Wireless Logitech keyboard/mouse combo... The Ergo wave type...

Most of the keys work fine, but not the things like function keys or other special characters
 
Thanks Kurt - I see that post there NOW - just before the post I replied to. Download completed - installing as I type.

I'll give it a try with the same on my three wireless units.
 
Maybe unlikely - but you can test again with 240MHz and 120MHz F-BUS?
There must be a reason why it does not work for defragster!
Or an other race condition... ? Ideas ?
 
Your welcome...

I know I should probably try to understand more of the USB stuff, before I continue to fiddle trying to understand the mouse/keyboard stuff.

But for example in the new mouse code, I would like to be able to get the mouse_report_desc like structure. Example, as defined if making a Teensy into Mouse:
Code:
static uint8_t mouse_report_desc[] = {
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x02,                     // Usage (Mouse)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x01,                     //   REPORT_ID (1)
        0x05, 0x09,                     //   Usage Page (Button)
        0x19, 0x01,                     //   Usage Minimum (Button #1)
        0x29, 0x08,                     //   Usage Maximum (Button #8)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x25, 0x01,                     //   Logical Maximum (1)
        0x95, 0x08,                     //   Report Count (8)
        0x75, 0x01,                     //   Report Size (1)
        0x81, 0x02,                     //   Input (Data, Variable, Absolute)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x30,                     //   Usage (X)
        0x09, 0x31,                     //   Usage (Y)
        0x09, 0x38,                     //   Usage (Wheel)
        0x15, 0x81,                     //   Logical Minimum (-127)
        0x25, 0x7F,                     //   Logical Maximum (127)
        0x75, 0x08,                     //   Report Size (8),
        0x95, 0x03,                     //   Report Count (3),
        0x81, 0x06,                     //   Input (Data, Variable, Relative)
        0x05, 0x0C,                     //   Usage Page (Consumer)
        0x0A, 0x38, 0x02,               //   Usage (AC Pan)
        0x15, 0x81,                     //   Logical Minimum (-127)
        0x25, 0x7F,                     //   Logical Maximum (127)
        0x75, 0x08,                     //   Report Size (8),
        0x95, 0x01,                     //   Report Count (1),
        0x81, 0x06,                     //   Input (Data, Variable, Relative)
        0xC0,                           // End Collection
        0x05, 0x01,                     // Usage Page (Generic Desktop)
        0x09, 0x02,                     // Usage (Mouse)
        0xA1, 0x01,                     // Collection (Application)
        0x85, 0x02,                     //   REPORT_ID (2)
        0x05, 0x01,                     //   Usage Page (Generic Desktop)
        0x09, 0x30,                     //   Usage (X)
        0x09, 0x31,                     //   Usage (Y)
        0x15, 0x00,                     //   Logical Minimum (0)
        0x26, 0xFF, 0x7F,               //   Logical Maximum (32767)
        0x75, 0x10,                     //   Report Size (16),
        0x95, 0x02,                     //   Report Count (2),
        0x81, 0x02,                     //   Input (Data, Variable, Absolute)
        0xC0                            // End Collection
};
For example with this I think I can deduce that the Buttons will be one byte and probably the first byte of a report. (size of 1 count of 8) and likewise
the X, Y values are 8 bit values (1 byte) Looks like 3 values so third is probably wheel and they have relative values 0xff or 0x01 for small moves...

But how can I update the mouse.cpp to get this data? My guess is over time will also need/want this in the keyboard area, to be able to retrieve special keys...
But again probably better to talk about on the Mouse thread...
 
Maybe unlikely - but you can test again with 240MHz and 120MHz F-BUS?
There must be a reason why it does not work for defragster!
Or an other race condition... ? Ideas ?

I'll try out the new beta 4 shortly with the "TEST" sample and run at various speeds. I grabbed my K66 T_3.6 first beta board so I'll have PJRC hardware with USB connection to rule out the Teensy64 PCB.
 
Using the K66 PROTO and TD_ 1.38b4 { IDE 1.8.3 } it WORKS - still fails on FrankB Teensy64 PCB <EDIT> at 240 and 180 MHz:

LOGITECH K360 ( this shows bump in F_BUS, it also works stock F_BUS at 180 and 240 F_CPU )::
USB Host Testing
F_BUS == 120000000 and F_CPU ==240000000
key 'w' 119
key 'o' 111
key 'r' 114
key 'k' 107
key 's' 115

Then I HOT plugged the MSFT #850 and added this:
key 'm' 109
key 's' 115
key 'f' 102
key 't' 116

So "opps" - the problem seems to be on FrankB PCB ( "as I soldered it" )?

Added notes - Using FrankB Teensy64 PCB { with display and SD card removed }:
If I plug WIRED I can hotplug it and it works again.
If I start with WIRELESS it fails to show and then when I hotplug WIRED it does not show up.

I can pull T_3.6 from PCB sockets - and it has USB pinned - but I cannot find the 'USB A to USB Motherboard 4-Pin Header' I bought 9/4/16 to test it to see that T_3.6 runs off the PCB.

IDE Notes: The IDE SerMon works fine to upload and restart on my windows 10 box - TyCommander not loaded - one T_3.6 connected at a time.
 
Last edited:
Using the K66 PROTO and TD_ 1.38b4 { IDE 1.8.3 } it WORKS - still fails on FrankB Teensy64 PCB <EDIT> at 240 and 180 MHz:

LOGITECH K360 ( this shows bump in F_BUS, it also works stock F_BUS at 180 and 240 F_CPU )::


Then I HOT plugged the MSFT #850 and added this:


So "opps" - the problem seems to be on FrankB PCB ( "as I soldered it" )?

Added notes - Using FrankB Teensy64 PCB { with display and SD card removed }:
If I plug WIRED I can hotplug it and it works again.
If I start with WIRELESS it fails to show and then when I hotplug WIRED it does not show up.

I can pull T_3.6 from PCB sockets - and it has USB pinned - but I cannot find the 'USB A to USB Motherboard 4-Pin Header' I bought 9/4/16 to test it to see that T_3.6 runs off the PCB.

IDE Notes: The IDE SerMon works fine to upload and restart on my windows 10 box - TyCommander not loaded - one T_3.6 connected at a time.


Hm. Why do other devices work ? Please solder a short wire between the USB-HOST socket 5V pin to the 5V on the "USB Host Port".
Did you solder the shield of the USB connector ?
 
Last edited:
timusb.png
I found the photo that you posted in the other thread. Please resolder the pin in the red circle and add a short wire (red line).
And pls. check the other solder-points. You mentioned that the display gets darker when you press a joystick-button - this is not normal, too.
 
Status
Not open for further replies.
Back
Top