Teensy 4.0 First Beta Test

Status
Not open for further replies.
Paul has this qvgatest_touch that fits the ILI9341 - hopefully the pinout matches the new boards like Paul linked?

The Ebay unit Kurt linked is setup for rPi header to SPI - FrankB's style board would be nice there!

Just wondered about pin duplication - T4b1 is 9 pins and std T_3.2 is 7 pins tall. That is a rather LargE board! Worth the wait for cost - hopefully it runs right.
…...

Think you meant to send this link for the qygatest board. Yeah, that was what I was thinking - maybe add it for the next revision, or add the RPi connector as well. Probably will set it up so you just jumper it to the CS pin you want :)

Yes it is a rather "largE" board - it is about the same length as the Paul's breakout board but an inch and a quarter larger in width (most of that is taken up by the added space for the Arduino headers and a little bit extra for the other stuff on the board. Hopefully, in future designs their is a trace to cut for the USB pwr.

Like you said the price is right compared to the $84 dollars OSHpark wanted for 3 boards. Don't know if we are allowed to post a picture of the breakout board or not yet.
 
Think you meant to send this link for the qygatest board.
...

Indeed that was the intended link - I got the name right - then copy of PermaLink was off by 1 …

FrankB - makes sense to wait for another step or two toward final T4 layout. Let me know if you see any better fix for my hacks to get your Compile.cmd to work with T4. Something abbreviated somewhere in boards.txt that causes the parsing to break for T4. Just realize I forgot to note the one other change [teensy4b not 40] in the notes I put on Tset's readme.
 
TDM:

I think I have to calculate the PLL speed for 2 x AUDIO_SAMPLE_RATE_EXACT - that allows TDM on SAI1 and I2S on SAI2, I hope -> means I have to edit i2s-output and input again.
I have all signals now, they look correct, but again no output from my CS42448 TDM-Board... lol.. I'll find the reason...

@Paul: Thank you! DHL tried to deliver, but I was not @home. They left a message and want 21€.. don't know for what :). I asked them via contact-form on their site but have no answer - have to wait for the invoice.

lol... that took me some time.. the t4-test-board has no 5V, but the old CS42448-test-board needs it. solved, works :) Pullrequest* tomorrow. I'll solder a vin-patch-wire to my test.board.
focusing on a not-existing-software-problem while it is a hardware-problem is... what I learned: always check ALL connections.. :)


*together with I2S2
 
Last edited:
USBHost_t36 testing

Thought I would do a change of pace and try out some of the pieces of the USB Host T3.6 ...

So I am trying out a hacked up version of my SerialTest program. Hacked up as USB Serial still does not work properly for input. So using Serial1 for input...
So far so good :D

First up some USB to Serial adapters:

Silicon Labs:
Code:
*** Device userial 10c4:ea60 - connected ***
  manufacturer: Silicon Labs
  product: CP2102 USB to UART Bridge Controller

Then the Adafruit ones... I fried their actual USB to serial adapter a couple of days ago, but same chip as in their metro board, which fixed this library for a couple of weeks ago...
Code:
*** Device userial 10c4:ea60 - connected ***
  manufacturer: Silicon Labs
  product: CP2104 USB to UART Bridge Controller
Serial Available
Serial Available
Received: aReceived: bReceived: cReceived: dReceived: 
Received:

Also an adapter from Prolific:
Code:
*** Device userial - disconnected ***
*** Device userial 67b:2303 - connected ***
  manufacturer: Prolific Technology Inc.
  product: USB-Serial Controller

A Robotis OpenCM9.04 board, running simple sketch:
Code:
void setup() {
  while (!Serial) ;
  Serial.begin(115200);
}

void loop() {
  while (Serial.available()) {
    Serial.write(Serial.read());
  }
}

Code:
*** Device userial fff1:ff48 - connected ***
  manufacturer: ROBOTIS
  product: ROBOTIS ComPort
Serial Available
Serial Available
abcd
And a Teensy LC running same sketch:
Code:
*** Device userial 16c0:483 - connected ***
  manufacturer: Teensyduino
  product: USB Serial
  Serial: 1114250
Serial Available
Serial Available
Serial Available
Serial Available
A Teensy

Next up try some mice and keyboards and ...
 
if you (or Paul) were a good fee, and I had two wishes free... I'd wish a usb-stick (memory) driver and a usb-soundcard-driver :)
 
if you (or Paul) were a good fee, and I had two wishes free... I'd wish a usb-stick (memory) driver and a usb-soundcard-driver :)

Some of those are probably beyond my pay grade :D ;) Also I am guessing that they are beyond my USB tracing hardware ability. I can do some with the Logic Pro, but only at the lower speeds, so works fine for things like Serial, keyboard, mice, joysticks, ... But I would assume that USB drives would run at the higher speed and would need the hardware like Paul has... As for SOund card, not sure. I think I have a couple of them sitting around here somewhere...

As for more USB host testing.

I have tried a few Keyboards and Mice and they appear to be working. This includes:

Micrososoft Sculpt wireless combo
Code:
*** Device KB1 45e:7a5 - connected ***
  manufacturer: Microsoft
  product: Microsoft® 2.4GHz Transceiver v9.0
*** Device HID1 45e:7a5 - connected ***
  manufacturer: Microsoft
  product: Microsoft® 2.4GHz Transceiver v9.0
*** Device HID2 45e:7a5 - connected ***
  manufacturer: Microsoft
  product: Microsoft® 2.4GHz Transceiver v9.0
*** HID Device Mouse1 45e:7a5 - connected ***
  manufacturer: Microsoft
  product: Microsoft® 2.4GHz Transceiver v9.0

Logitech Wireless combo
Code:
*** Device KB1 46d:c517 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID1 46d:c517 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** HID Device Mouse1 46d:c517 - connected ***
  manufacturer: Logitech
  product: USB Receiver

Gigabyte Keyboard
Code:
* Device KB1 4d9:a06b - connected ***
  manufacturer: E-Signal
  product: GIGABYTE Keyboard
Gigabyte vendor: force boot protocol
*** Device HID1 4d9:a06b - connected ***
  manufacturer: E-Signal
  product: GIGABYTE Keyboard
*** Device HID2 4d9:a06b - connected ***
  manufacturer: E-Signal
  product: GIGABYTE Keyboard

Belkin Mouse:
Code:
*** Device HID1 1241:1177 - connected ***
*** HID Device Mouse1 1241:1177 - connected ***

Dell keyboard that has built in Hub:
Code:
*** Device Hub1 413c:1004 - connected ***
  manufacturer: Dell
  product: Dell USB Keyboard Hub
*** Device KB1 413c:2006 - connected ***
  manufacturer: Dell
  product: Dell USB Keyboard Hub
*** Device HID1 413c:2006 - connected ***
  manufacturer: Dell
  product: Dell USB Keyboard Hub

Then add belkin mouse plugged into HUB of keyboard
Code:
*** Device HID2 1241:1177 - connected ***
*** HID Device Mouse1 1241:1177 - connected ***

Then simple USB Hub that I plugged in HP mouse:
Code:
*** Device Hub1 5e3:608 - connected ***
  product: USB2.0 Hub
*** Device HID1 461:4e66 - connected ***
  manufacturer: PixArt
  product: HP USB Optical Mouse
*** HID Device Mouse1 461:4e66 - connected ***
  manufacturer: PixArt
  product: HP USB Optical Mouse

So far they all appear to be working
 
if you (or Paul) were a good fee, and I had two wishes free... I'd wish a usb-stick (memory) driver and a usb-soundcard-driver :)

..and with two more wishes a wlan-stick-driver (would be ok for a fixed chipset only) and a bluetooth-stick-driver... lol.. good night.
 
..and with two more wishes a wlan-stick-driver (would be ok for a fixed chipset only) and a bluetooth-stick-driver... lol.. good night.
Actually I have parts of the bluetooth working now...

As mentioned in a few other threads like: https://forum.pjrc.com/threads/54587-USBHost_t36-working-with-PS4-gamepad-in-Teensy-3-6
and https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth

Some of the interesting issues is how to deal with things like pairing and trust.

Also issues like: should Bluetooth be something completely different or integrated with other devices.

Example: Mouse or Keyboard. Already today we don't worry about if a keyboard is a HID device or is hard USB Boot device. They just need to define a mouse object and maybe one or more HID devices, that may also be used and the user program just talks to the keyboard object.

Well what about a Bluetooth keyboard? Should it work like HID devices, where you might have one or more Bluetooth objects, which then look for a corresponding keyboard object and talks through it? That is how I have tried to structure it.

Current stuff is up at: https://github.com/KurtE/USBHost_t36/tree/WIP2-Bluetooth

I will need to see about updating it to the things that have changed since then...
 
Actually I have parts of the bluetooth working now...

As mentioned in a few other threads like: https://forum.pjrc.com/threads/54587-USBHost_t36-working-with-PS4-gamepad-in-Teensy-3-6
and https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth

Some of the interesting issues is how to deal with things like pairing and trust.

Also issues like: should Bluetooth be something completely different or integrated with other devices.

Example: Mouse or Keyboard. Already today we don't worry about if a keyboard is a HID device or is hard USB Boot device. They just need to define a mouse object and maybe one or more HID devices, that may also be used and the user program just talks to the keyboard object.

Well what about a Bluetooth keyboard? Should it work like HID devices, where you might have one or more Bluetooth objects, which then look for a corresponding keyboard object and talks through it? That is how I have tried to structure it.

Current stuff is up at: https://github.com/KurtE/USBHost_t36/tree/WIP2-Bluetooth

I will need to see about updating it to the things that have changed since then...

Hi Kurt/Tim
Can always look at the Bluetooth stuff that is in USB Host Shield 2.0 for inspiration.

Look back a bunch of posts - I did some testing the other day on USB host, especially with my PS4 joystick, wired to the hub and direct. But you inspired Kurt to go back and do some more testing:

AMAZON BASICS Wireless Mouse: Identified the receiver and mouse input was received and printed.

Logitech Unifying Receiver: Picked it up the receiver:
Code:
*** Device KB2 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID3 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID4 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver

When I turned on the mouse it did see it:
Code:
*** HID Device Mouse1 46d:c52b - connected ***
  manufacturer: Logitech
  product: USB Receiver
but did not see any mouse inputs. For a Logitech K400+ keyboard it is not recognized as being connected. But then again, it isn't recognized by windows 10 either - just the receiver. Same holds true for the mouse

I will have to give your Bluetooth stuff a try
 
I had these 4 Mice (1w/ktbd) handy for USB Host Test - all four worked:
Code:
  product: USB Receiver
[B]*** Device HID2 46d:c52f - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** HID Device Mouse1 46d:c52f - connected ***[/B]
  manufacturer: Logitech
  product: USB Receiver

*** Device HID1 - disconnected ***
*** Device HID2 - disconnected ***
*** HID Device Mouse1 - disconnected ***

[B]*** Device HID1 45e:e1 - connected ***
  manufacturer: Microsoft
  product: Microsoft Wireless Optical Mouse� 1.00
*** HID Device Mouse1 45e:e1 - connected ***[/B]
  manufacturer: Microsoft
  product: Microsoft Wireless Optical Mouse� 1.00

*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***

[B]*** Device KB1 46d:c534 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** Device HID1 46d:c534 - connected ***
  manufacturer: Logitech
  product: USB Receiver
*** HID Device Mouse1 46d:c534 - connected ***[/B]
  manufacturer: Logitech
  product: USB Receiver
key 'a'  97 MOD: 0 OEM: 4 LEDS: 0

*** HID Device Mouse1 - disconnected ***
*** Device KB1 - disconnected ***
*** Device HID1 - disconnected ***

[B]*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***[/B]
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
Mouse: buttons = 3,  mouseX = 0,  mouseY = 0,  wheel = 0,  wheelH = 0

*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***

Here is a old USB_2 with wired mouse plugged in:
Code:
*** Device Hub1 5e3:608 - connected ***
  product: USB2.0 Hub
*** Device Hub1 - disconnected ***
*** Device Hub1 5e3:608 - connected ***
  product: USB2.0 Hub
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 - disconnected ***

Something Funny - Repeat disconnect/reconnect - with that Amazon BASICS USB3 HUB
This continues when Mouse is unplugged::
Code:
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 - disconnected ***
*** Device HID1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device HID1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
  manufacturer: Logitech
  product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 - disconnected ***
*** Device HID1 - disconnected ***
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device Hub1 - disconnected ***
 
Tim
I just plugged in a Amazon Basic USB 3.0 hub and without anything else on it I am seeing the same thing as you:
Code:
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device Hub1 - disconnected ***
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
*** Device Hub1 - disconnected ***

If you notice it is also showing it as a USB 2.0 hub, so maybe it has something to do with USB 2.0 vs 3.0.

EDIT: forgot, my USB 2.0 hub doesn't do this.
 
Tim
I just plugged in a Amazon Basic USB 3.0 hub and without anything else on it I am seeing the same thing as you:
...
If you notice it is also showing it as a USB 2.0 hub, so maybe it has something to do with USB 2.0 vs 3.0.

EDIT: forgot, my USB 2.0 hub doesn't do this.

Crazy it should act that way. I should have sent it back for being slow - though it may be different with TyComm only didn't re-swap the 3 Teensy setup back to that and look at start timing - was going to do that when T4 gets complete/update to USB.

Did you have that already? - The numbers suggest it is the same as the one I have.

<NOTE:> I didn't test all functions here - at least one mouse wheel was ignored. Just checked all were recognized.

Had to go downstairs to get USB3 cable for the next hub - I found these things that all showed up - including my original Rosewill twin 7 port hub.

Code:
*** Device KB1 46d:c31c - connected ***
  manufacturer: Logitech
  product: USB Keyboard
*** Device HID1 46d:c31c - connected ***
  manufacturer: Logitech
  product: USB Keyboard
*** Device KB1 - disconnected ***
*** Device HID1 - disconnected ***
*** Device HID1 45e:e1 - connected ***
  manufacturer: Microsoft
  product: Microsoft Wireless Optical Mouse� 1.00
*** HID Device Mouse1 45e:e1 - connected ***
  manufacturer: Microsoft
  product: Microsoft Wireless Optical Mouse� 1.00
Mouse: buttons = 0,  mouseX = 0,  mouseY = 1,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = -1,  mouseY = 0,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 0,  mouseY = 1,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 1,  mouseY = 0,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 1,  mouseY = 1,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 1,  mouseY = -1,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 1,  mouseY = -1,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = -1,  mouseY = 0,  wheel = 0,  wheelH = 0
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device HID1 45e:47 - connected ***
  manufacturer: Microsoft
  product: Microsoft 5-Button Mouse with IntelliEy
*** HID Device Mouse1 45e:47 - connected ***
  manufacturer: Microsoft
  product: Microsoft 5-Button Mouse with IntelliEy
Mouse: buttons = 0,  mouseX = 1,  mouseY = 0,  wheel = 0,  wheelH = 0
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device HID1 45e:797 - connected ***
  product: USB Optical Mouse
*** HID Device Mouse1 45e:797 - connected ***
  product: USB Optical Mouse
Mouse: buttons = 0,  mouseX = 12,  mouseY = 16,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 38,  mouseY = 31,  wheel = 0,  wheelH = 0
Mouse: buttons = 0,  mouseX = 35,  mouseY = 21,  wheel = 0,  wheelH = 0
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device HID1 46d:c016 - connected ***
  manufacturer: Logitech
  product: Optical USB Mouse
*** HID Device Mouse1 46d:c016 - connected ***
  manufacturer: Logitech
  product: Optical USB Mouse
*** Device HID1 - disconnected ***
*** HID Device Mouse1 - disconnected ***
*** Device Hub1 5e3:608 - connected ***
  product: USB2.0 Hub
*** Device Hub2 5e3:608 - connected ***
  product: USB2.0 Hub
*** Device Hub1 - disconnected ***
*** Device Hub2 - disconnected ***


The HooToo USB3 Super Speed hub Connects then reconnects ONE TIME - then stable - here is debug::
Code:
USB Host Testing
960
USB2 PLL running
 reset waited 5
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20007000
periodictable = 20007000
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 09 21 11 28 70 85 00 01 00 01 
    VendorID = 2109, ProductID = 2811, Version = 8570
    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=20005E00
found possible interface, altsetting=0
number of interfaces found = 1
*** Device Hub1 2109:2811 - connected ***
  product: USB 2.0 HUB
      
USBHub control callback
09 29 04 E9 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
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
USBDriver (dev->drivers) list: 20005E00
disconnect driver 20005E00
USBDriver (available_drivers) list: 20005E00 -> 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
delete_Pipe 20006560
  Free transfers
    * 536896224 * remove * free
  Free transfers attached to QH
    * 536900864
* Delete Pipe completed
delete_Pipe 20007400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536900736
* Delete Pipe completed
removed Device_t from devlist
  disable
*** Device Hub1 - disconnected ***
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 09 21 11 28 70 85 00 01 00 01 
    VendorID = 2109, ProductID = 2811, Version = 8570
    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=20005E00
found possible interface, altsetting=0
number of interfaces found = 1
*** Device Hub1 2109:2811 - connected ***
  product: USB 2.0 HUB
      
USBHub control callback
09 29 04 E9 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 = 2
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012102

Here is Debug for the Amazon Basics in case it shows anything::
Code:
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 10 02 09 00 01 40 09 21 11 28 70 90 01 02 00 01 
    VendorID = 2109, ProductID = 2811, Version = 9070
    Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: VIA Labs, Inc.         
enumeration:
Product: USB2.0 Hub             
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
  09 02 19 00 01 01 00 E0 00 
    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=20005E00
found possible interface, altsetting=0
number of interfaces found = 1
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
USBHub control callback
09 29 04 E9 01 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 = 3
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012103
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
USBDriver (dev->drivers) list: 20005E00
disconnect driver 20005E00
USBDriver (available_drivers) list: 20005E00 -> 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
delete_Pipe 20006560
  Free transfers
    * 536900928 * remove * free
  Free transfers attached to QH
    * 536896224
* Delete Pipe completed
delete_Pipe 20007400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536900864
* Delete Pipe completed
removed Device_t from devlist
  disable
*** Device Hub1 - disconnected ***
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 10 02 09 00 01 40 09 21 11 28 70 90 01 02 00 01 
    VendorID = 2109, ProductID = 2811, Version = 9070
    Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: VIA Labs, Inc.         
enumeration:
Product: USB2.0 Hub             
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
  09 02 19 00 01 01 00 E0 00 
    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=20005E00
found possible interface, altsetting=0
number of interfaces found = 1
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
USBHub control callback
09 29 04 E9 01 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 = 4
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012104
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
USBDriver (dev->drivers) list: 20005E00
disconnect driver 20005E00
USBDriver (available_drivers) list: 20005E00 -> 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
delete_Pipe 20006560
  Free transfers
    * 536900864 * remove * free
  Free transfers attached to QH
    * 536900736
* Delete Pipe completed
delete_Pipe 20007400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536896224
* Delete Pipe completed
removed Device_t from devlist
  disable
*** Device Hub1 - disconnected ***
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 10 02 09 00 01 40 09 21 11 28 70 90 01 02 00 01 
    VendorID = 2109, ProductID = 2811, Version = 9070
    Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
    Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: VIA Labs, Inc.         
enumeration:
Product: USB2.0 Hub             
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
  09 02 19 00 01 01 00 E0 00 
    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=20005E00
found possible interface, altsetting=0
number of interfaces found = 1
*** Device Hub1 2109:2811 - connected ***
  manufacturer: VIA Labs, Inc.         
  product: USB2.0 Hub             
USBHub control callback
09 29 04 E9 01 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 = 5
new_Pipe
allocate_interrupt_pipe_bandwidth
  ep interval = 12
  interval = 256
 best_bandwidth = 2, at offset = 0
pipe cap1 = F0012105
port change: 1C00100A
    disconnect
disconnect_Device:
USBDriver (available_drivers) list: 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
USBDriver (dev->drivers) list: 20005E00
disconnect driver 20005E00
USBDriver (available_drivers) list: 20005E00 -> 20004100 -> 20003C00 -> 20003E80 -> 200044E0 -> 200049E0 -> 20004EE0 -> 200053E0 -> 200058E0 -> 20006340
delete_Pipe 20006560
  Free transfers
    * 536896224 * remove * free
  Free transfers attached to QH
    * 536900800
* Delete Pipe completed
delete_Pipe 20007400
  shut down async schedule
  Free transfers
  Free transfers attached to QH
    * 536900736
* Delete Pipe completed
removed Device_t from devlist
  disable
*** Device Hub1 - disconnected ***
 
Last edited:
News (problems) from the usdhc front
Situation
I can send commands to uSD and also read sectors from the disk
with one caveat:
It seems that on read I need in addition to 128 uint32 accessed to data port an extra read, which seems to be some sort of CRC
I say some sort, as it does NOT correspond to the documented CRC
e.g. reading the MBR (record 0) the additional word reads 0xE8E8E8E8 while the CRC is F01F

Update:
The additional word I was reading/writing was due to wrong Block Attribute register.

Still have problems with write….
 
@WMXZ: Congratulations on getting uSD read resolved! I took the update text back to the prior linked post.

Like Kurt I found the USB_Host Serial to see a Connected Teensy - one of my Serial Debug T_3.1's - but would need another Teensy with altered Echo - and maybe another Teensy on PC USB with UART connect to T4 hosted - for BiDirectional testing with Primary USB write only.
USB Host Testing - Serial
*** Device USERIAL1 16c0:483 - connected ***
manufacturer: Teensyduino
product: USB Serial
Serial: 868130
*** Device USERIAL1 - disconnected ***
 
Crazy it should act that way. I should have sent it back for being slow - though it may be different with TyComm only didn't re-swap the 3 Teensy setup back to that and look at start timing - was going to do that when T4 gets complete/update to USB.

Did you have that already? - The numbers suggest it is the same as the one I have.

<NOTE:> I didn't test all functions here - at least one mouse wheel was ignored. Just checked all were recognized.

Had to go downstairs to get USB3 cable for the next hub - I found these things that all showed up - including my original Rosewill twin 7 port hub.

…..


The HooToo USB3 Super Speed hub Connects then reconnects ONE TIME - then stable - here is debug::
...

Morning Tim
Yes I that laying around for a while so decided to try it. It is probably the same one. One of the things I was thinking about was maybe the teesny is not providing enough power so its resetting itself? Just thinking out loud.

I also just hooked up a T3.5 running a sketch that outputs to serial and hooked it to the T4 using USB_Serial as a test as well:
Code:
USB Host Testing - Serial
*** Device USERIAL1 16c0:483 - connected ***
  manufacturer: Teensyduino
  product: USB Serial
  Serial: 4529580
*HEARTBEAT* 9325
*HEARTBEAT* 13328
*HEARTBEAT* 17331
*HEARTBEAT* 21334
Which is what the T3.5 should be outputting

EDIT: I also attached a FTDI (USB to serial adapter) with the serial sketch and identified it correctly:
Code:
USB Host Testing - Serial
*** Device USERIAL1 403:6001 - connected ***
  manufacturer: FTDI
  product: FT232R USB UART
  Serial: AI05SPQ6
 
Last edited:
LOGICTECH UNIFYING RECEIVER
In a previous post I mentioned that UBSHOST was able to recognize a Logitech Unifying Receiver but not any devices trying to link with it. After doing a bit more research this morning is that Logitech has a special software that works with windows when you use this device with other Logitech devices. So that resolved the issue with why my windows 10 will see the receiver but not the devices attached.

Looking at this article: Logitech Unifying Receiver Protocol? one response I guess sums it up:
This is Avery, aka Tequals0. The USB dongle is a USB HID mouse/keyboard device, so all that traffic that you are seeing is basically generic HID traffic- if you want to pair your phone to your dongle, you will have to emulate the wireless traffic, not the USB traffic-that is generated by the dongle.
The answers go on to describe the HID++ protocol. It goes on to provide links to docs and other a lot of detailed info on what is needed to pair.

EDIT: I did find a pairing tool in 'c' but not sure where I even start to try it with USBHOST:
Code:
/*
 * Copyright 2011 Benjamin Tissoires <benjamin.tissoires@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <linux/input.h>
#include <linux/hidraw.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>

#define USB_VENDOR_ID_LOGITECH			(__u32)0x046d
#define USB_DEVICE_ID_UNIFYING_RECEIVER		(__s16)0xc52b
#define USB_DEVICE_ID_UNIFYING_RECEIVER_2	(__s16)0xc532

int main(int argc, char **argv)
{
	int fd;
	int res;
	struct hidraw_devinfo info;
	char magic_sequence[] = {0x10, 0xFF, 0x80, 0xB2, 0x01, 0x00, 0x00};

	if (argc == 1) {
		errno = EINVAL;
		perror("No hidraw device given");
		return 1;
	}

	/* Open the Device with non-blocking reads. */
	fd = open(argv[1], O_RDWR|O_NONBLOCK);

	if (fd < 0) {
		perror("Unable to open device");
		return 1;
	}

	/* Get Raw Info */
	res = ioctl(fd, HIDIOCGRAWINFO, &info);
	if (res < 0) {
		perror("error while getting info from device");
	} else {
		if (info.bustype != BUS_USB ||
		    info.vendor != USB_VENDOR_ID_LOGITECH ||
		    (info.product != USB_DEVICE_ID_UNIFYING_RECEIVER &&
		     info.product != USB_DEVICE_ID_UNIFYING_RECEIVER_2)) {
			errno = EPERM;
			perror("The given device is not a Logitech "
				"Unifying Receiver");
			return 1;
		}
	}

	/* Send the magic sequence to the Device */
	res = write(fd, magic_sequence, sizeof(magic_sequence));
	if (res < 0) {
		printf("Error: %d\n", errno);
		perror("write");
	} else if (res == sizeof(magic_sequence)) {
		printf("The receiver is ready to pair a new device.\n"
		"Switch your device on to pair it.\n");
	} else {
		errno = ENOMEM;
		printf("write: %d were written instead of %ld.\n", res,
			sizeof(magic_sequence));
		perror("write");
	}
	close(fd);
	return 0;
}

If you can point me in the right direction to how I can give this I try I may play around with it.
 
Last edited:
Morning Tim
Yes I that laying around for a while so decided to try it. It is probably the same one. One of the things I was thinking about was maybe the teesny is not providing enough power so its resetting itself? Just thinking out loud.
...

You have something Mike, it is a powered Hub - I had a 6" M<>F extender and my powered Amazon Basic wouldn't reach T4 - didn't bother to swap out the 24" M<>F extender to allow power cord on hub to reach, even though I wondered.
Using the 24" USB extender to reach powered Amazon Basic HUB running SerailTest.ino gives this:
*** Device Hub1 2109:2811 - connected ***
manufacturer: VIA Labs, Inc.
product: USB2.0 Hub

Same with Mouse.ino:
USB Host Testing
960
*** Device Hub1 2109:2811 - connected ***
manufacturer: VIA Labs, Inc.
product: USB2.0 Hub
*** Device HID1 46d:c044 - connected ***
manufacturer: Logitech
product: USB-PS/2 Optical Mouse
*** HID Device Mouse1 46d:c044 - connected ***
manufacturer: Logitech
product: USB-PS/2 Optical Mouse
Mouse: buttons = 1, mouseX = 0, mouseY = 0, wheel = 0, wheelH = 0

That may be why the HooToo restarted once too - It's 5V power wart is not at hand - probably where I found the USB3 cable it requires.

Paul - Good work on that provided breakout routing the Host USB lines to a nice connector - and porting the T_3.6 code!

BTW: Really enjoying building from SublimeText with latest Tset.cmd&boards.txt revision to FrankB's Compile.cmd with TyComm. { Ctrl+Shift+B run to create Compile.cmd (6,1,1,y), Then Ctrl+Shift+B to run Compile.cmd first time, then F7 to rebuild/upload after } … will work from anything Windows that can execute the Compile.cmd in the Sketch Directory … or the one below it by Teensy Folder name.
 
@defragster, Tim
Glad that was it - I couldn't find my power adapter (the minute I put something away I can't find it), I had wanted to test it this morning. Getting bad with this stuff - I go to sleep dreaming of the T4.
 
LOGITECH UNIFYING RECEIVER - WORKAROUND

Ok. Got it working but did a quick and dirty workaround. I paired my keyboard/mouspad, K400+ wireless, with the receiver on the PC. Then I attached the receiver to the T4 and ran the "Mouse.ino" sketch and all is working:
USB Host Testing
960
*** 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
Mouse: buttons = 0, mouseX = 0, mouseY = 0, wheel = 0, wheelH = 0
key 't' 116 MOD: 0 OEM: 17 LEDS: 0
key 'h' 104 MOD: 0 OEM: B LEDS: 0
key 'i' 105 MOD: 0 OEM: C LEDS: 0
key 's' 115 MOD: 0 OEM: 16 LEDS: 0
Mouse: buttons = 0, mouseX = -1, mouseY = 0, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 0, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 2, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 2, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 2, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = 0, mouseY = 1, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 0, wheel = 0, wheelH = 0
Mouse: buttons = 0, mouseX = -1, mouseY = 0, wheel = 0, wheelH = 0
 
SDHC is working on T4

Still have problems with write….

OK, this is done: Got SDHC working both on T3.6 and T4.
(had two silly errors)

Tomorrow will clean-up code and will submit tomorrow PR to Paul's repository (stay tuned).
 
Status
Not open for further replies.
Back
Top