but the Host Port is not responding from a USB Touchscreen. Even with TEENSYdUINO 1.53
//Simple test of USB Host Mouse/Keyboard
//HARDWARE : TEENSY 3.6
//RUNS WITH 10' BUYDISPLAY
//DON'T RUN WITH FLATRON T1710
//NOR ON THE LG FLATRON 17MB
//
#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);
int user_axis[64];
uint32_t buttons_prev = 0;
RawHIDController rawhid1(myusb);
RawHIDController rawhid2(myusb, 0xffc90004);
USBDriver *drivers[] = {&hub1, &hub2,&keyboard1, &keyboard2, &joystick1, &hid1, &hid2, &hid3, &hid4, &hid5};
#define CNT_DEVICES (sizeof(drivers)/sizeof(drivers[0]))
const char * driver_names[CNT_DEVICES] = {"Hub1","Hub2", "KB1", "KB2", "JOY1D", "HID1", "HID2", "HID3", "HID4", "HID5"};
bool driver_active[CNT_DEVICES] = {false, false, false, false};
// Lets also look at HID Input devices
USBHIDInput *hiddrivers[] = {&mouse1, &joystick1, &rawhid1, &rawhid2};
#define CNT_HIDDEVICES (sizeof(hiddrivers)/sizeof(hiddrivers[0]))
const char * hid_driver_names[CNT_DEVICES] = {"Mouse1","Joystick1", "RawHid1", "RawHid2"};
bool hid_driver_active[CNT_DEVICES] = {false, 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;
const int ledPin = 13;
void setup()
{
// while (!Serial) ; // wait for Arduino Serial Monitor
Serial.println("\n\nUSB Host Testing");
Serial.println(sizeof(USBHub), DEC);
myusb.begin();
pinMode(ledPin,OUTPUT); //SUR C
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin,LOW);
}
void loop()
{
myusb.Task();
if(mouse1.available())
{
digitalWrite(ledPin,HIGH);
delay(10);
digitalWrite(ledPin,LOW);
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();
}
}
There are lots of devices out there that we do not have support yet for. All of the ones that we have gotten to work is due to either a few us spending our own timeI'm using this program for testing. Running fine with a Buydisplay 10,1", but never running on an ASUS VT207 or a LG FLATRON 17MB. (But these screens which have a classic USB outputs are running on any PC under XP,7, 8 or 10).
Very strange that TEENSY USB HOST don't run with so classic USB Screens outputs.
If USBHost was working, I could replace PC by TEENSY in all my industrial R&D developments.
Many other TEENSY users could greatly benefit of such USB Host functionnality, and replace PC by TEENSY on many industrial applications !
Thanks a lot for your help !
USB Host Testing
960
*** You can user Serial to change what is output ***
R - Turns on or off showing the raw data
Anything else toggles showing the Hid formatted breakdown of the data
*** Device HID1 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
*** Device HID2 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
HIDDumpController Claim: 56a:d8 usage: 10002
HIDDumpController Claim: 56a:d8 usage: d0001
HIDDumpController Claim: 56a:d8 usage: d0001
*** HID Device hdc1 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
*** HID Device hdc2 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
HIDDumpController Claim: 56a:d8 usage: ff000001
HIDDumpController Claim: 56a:d8 usage: ff000001
HIDDumpController Claim: 56a:d8 usage: ff000001
*** HID Device hdc3 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
*** HID Device hdc1 - disconnected ***
*** HID Device hdc2 - disconnected ***
*** HID Device hdc3 - disconnected ***
*** Device HID1 - disconnected ***
*** Device HID2 - disconnected ***
*** Device HID1 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
*** Device HID2 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
HIDDumpController Claim: 56a:d8 usage: 10002
HIDDumpController Claim: 56a:d8 usage: d0001
HIDDumpController Claim: 56a:d8 usage: d0001
*** HID Device hdc1 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
*** HID Device hdc2 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
HIDDumpController Claim: 56a:d8 usage: ff000001
HIDDumpController Claim: 56a:d8 usage: ff000001
HIDDumpController Claim: 56a:d8 usage: ff000001
*** HID Device hdc3 56a:d8 - connected ***
manufacturer: Wacom Co.,Ltd.
product: CTH-661
HID(10002): 01 00 00 00 00 00 00 00 00
Begin topusage:10000 type:2 min:0 max:1
usage=90001, value=0
usage=90002, value=0
usage=90003, value=0
usage=90004, value=0
usage=90005, value=0
Begin topusage:10000 type:6 min:-127 max:127
usage=10030, value=0
usage=10031, value=0
END:
END:
HID(10002): 01 00 00 00 00 00 00 00 00
Begin topusage:10000 type:2 min:0 max:1
usage=90001, value=0
usage=90002, value=0
usage=90003, value=0
usage=90004, value=0
usage=90005, value=0
Begin topusage:10000 type:6 min:-127 max:127
usage=10030, value=0
usage=10031, value=0
END:
END:
HID(10002): 01 00 00 00 00 00 00 00 00
Begin topusage:10000 type:2 min:0 max:1
usage=90001, value=0
usage=90002, value=0
usage=90003, value=0
usage=90004, value=0
usage=90005, value=0
Begin topusage:10000 type:6 min:-127 max:127
usage=10030, value=0
usage=10031, value=0
END:
END:
HID(10002): 01 00 00 00 00 00 00 00 00
Begin topusage:10000 type:2 min:0 max:1
usage=90001, value=0
usage=90002, value=0
usage=90003, value=0
usage=90004, value=0
usage=90005, value=0
Begin topusage:10000 type:6 min:-127 max:127
usage=10030, value=0
usage=10031, value=0
END:
END:
*** Turn off formatted output formated HID data is on ***
HID(10002): 01 00 00 00 00 00 00 00 00
HID(10002): 01 00 00 FC 00 00 00 00 00
HID(10002): 01 00 00 FA 00 00 00 00 00
HID(10002): 01 00 00 00 00 00 00 00 00
HID(10002): 01 00 04 00 00 00 00 00 00
HID(10002): 01 00 03 FC 00 00 00 00 00
HID(10002): 01 00 04 00 00 00 00 00 00
HID(10002): 01 00 05 FD 00 00 00 00 00
HID(10002): 01 00 06 00 00 00 00 00 00
HID(10002): 01 00 05 FA 00 00 00 00 00
HID(10002): 01 00 06 FB 00 00 00 00 00
HID(10002): 01 00 08 FC 00 00 00 00 00
HID(10002): 01 00 05 00 00 00 00 00 00
HID(10002): 01 00 00 00 00 00 00 00 00
HID(10002): 01 00 00 00 00 00 00 00 00
HID(10002): 01 00 03 FD 00 00 00 00 00
USB Host Testing
960
USB2 PLL running
reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20007000
periodictable = 20007000
*** You can user Serial to change what is output ***
R - Turns on or off showing the raw data
Anything else toggles showing the Hid formatted breakdown of the data
port change: 14001403
connect
begin reset
port change: 14001405
port enabled
end recovery
new_Device: 1.5 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 00 00 00 08 6D 04 28 C6 35 04 01 02 00 01
VendorID = 046D, ProductID = C628, Version = 0435
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: 3Dconnexion
enumeration:
Product: SpaceNavigator for Notebooks
enumeration:
Config data length = 41
enumeration:
Configuration Descriptor:
09 02 29 00 01 01 00 80 32
NumInterfaces = 1
ConfigurationValue = 1
09 04 00 00 02 03 00 00 00
Interface = 0
Number of endpoints = 2
Class/Subclass/Protocol = 3(HID) / 0 / 0
09 21 11 01 00 01 22 D9 00
HID, 1 report descriptor
07 05 81 03 08 00 0A
Endpoint = 1 IN
Type = Interrupt
Max Size = 8
Polling Interval = 10
07 05 02 03 08 00 0A
Endpoint = 2 OUT
Type = Interrupt
Max Size = 8
Polling Interval = 10
enumeration:
USBHub memory usage = 960
USBHub claim_device this=200025E0
USBHub memory usage = 960
USBHub claim_device this=200029A0
HIDParser claim this=20005080
HIDParser claim this=200056A0
HIDParser claim this=20005CC0
HIDParser claim this=200031C0
HIDParser claim this=200037E0
HIDParser claim this=20003E00
HIDParser claim this=20004420
HIDParser claim this=20004A40
Descriptor 4 = INTERFACE
HIDParser claim this=20005080
bInterfaceClass = 3
bInterfaceSubClass = 0
bInterfaceProtocol = 0
HID Parser Claim: 09 04 00 00 02 03 00 00 00 09 21 11 01 00 01 22 D9 00 07 05 81 03 08 00 0A 07 05 02 03 08 00 0A
report descriptor size = 217
Two endpoint HID:
endpoint = 81
size = 8
interval = 10
endpoint = 2
size = 8
interval = 10
new_Pipe
allocate_interrupt_pipe_bandwidth
best_bandwidth = 3, at offset = 0, shift= 0
new_Pipe
allocate_interrupt_pipe_bandwidth
best_bandwidth = 4, at offset = 1, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
*** Device HID1 46d:c628 - connected ***
manufacturer: 3Dconnexion
product: SpaceNavigator for Notebooks
control callback (hid)
05 01 09 08 A1 01 A1 00 85 01 16 A2 FE 26 5E 01 36 88 FA 46 78 05 55 0C 65 11 09 30 09 31 09 32 75 10 95 03 81 06 C0 A1 00 85 02 09 33 09 34 09 35 75 10 95 03 81 06 C0 A1 02 85 03 05 01 05 09 19 01 29 02 15 00 25 01 35 00 45 01 75 01 95 02 81 02 95 0E 81 03 C0 A1 02 85 04 05 08 09 4B 15 00 25 01 95 01 75 01 91 02 95 01 75 07 91 03 C0 06 00 FF 09 01 A1 02 15 80 25 7F 75 08 09 3A A1 02 85 05 09 20 95 01 B1 02 C0 A1 02 85 06 09 21 95 01 B1 02 C0 A1 02 85 07 09 22 95 01 B1 02 C0 A1 02 85 08 09 23 95 07 B1 02 C0 A1 02 85 09 09 24 95 07 B1 02 C0 A1 02 85 0A 09 25 95 07 B1 02 C0 A1 02 85 0B 09 26 95 01 B1 02 C0 A1 02 85 13 09 2E 95 01 B1 02 C0 C0 C0
mesg = 22000681
got report descriptor
Found top level collection 10008
find_driver
driver 20002E00
HIDDumpController Claim: 46d:c628 usage: 10008
*** HID Device hdc1 46d:c628 - connected ***
manufacturer: 3Dconnexion
product: SpaceNavigator for Notebooks
HID: 1 - 01 00 00 00 00 00 00 00
HID(10008): 01 00 00 00 00 00 00 00
begin, usage=10000
type= 6
min= -350
max= 350
reportcount=3
usage count=3
Begin topusage:10000 type:6 min:-350 max:350
Input, total bits=48
usage = 10030 sdata = 0
usage=10030, value=0
usage = 10031 sdata = 0
usage=10031, value=0
usage = 10032 sdata = 0
usage=10032, value=0
END:
HID: 1 - 02 00 00 02 00 00 00 00
HID(10008): 02 00 00 02 00 00 00 00
begin, usage=10000
type= 6
min= -350
max= 350
reportcount=3
usage count=3
Begin topusage:10000 type:6 min:-350 max:350
Input, total bits=48
usage = 10033 sdata = 0
usage=10033, value=0
usage = 10034 sdata = 2
usage=10034, value=2
usage = 10035 sdata = 0
usage=10035, value=0
END:
port change: 14001403
connect
begin reset
port change: 14001005
port enabled
end recovery
new_Device: 1.5 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 10 01 00 00 00 08 8A 25 01 00 08 11 01 02 00 01
VendorID = 258A, ProductID = 0001, Version = 1108
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: SINO WEALTH
enumeration:
Product: USB KEYBOARD
enumeration:
Config data length = 59
enumeration:
Configuration Descriptor:
09 02 3B 00 02 01 00 A0 32
NumInterfaces = 2
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
09 04 01 00 01 03 00 00 00
Interface = 1
Number of endpoints = 1
Class/Subclass/Protocol = 3(HID) / 0 / 0
09 21 10 01 00 01 22 9E 00
HID, 1 report descriptor
07 05 82 03 08 00 0A
Endpoint = 2 IN
Type = Interrupt
Max Size = 8
Polling Interval = 10
enumeration:
HIDParser claim this=20005080
USBHub memory usage = 960
USBHub claim_device this=200025E0
USBHub memory usage = 960
USBHub claim_device this=200029A0
HIDParser claim this=200056A0
HIDParser claim this=20005CC0
HIDParser claim this=200031C0
HIDParser claim this=200037E0
HIDParser claim this=20003E00
HIDParser claim this=20004420
HIDParser claim this=20004A40
Descriptor 4 = INTERFACE
HIDParser claim this=20005080
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=200056A0
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=20005CC0
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=200031C0
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=200037E0
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=20003E00
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=20004420
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
HIDParser claim this=20004A40
bInterfaceClass = 3
bInterfaceSubClass = 1
bInterfaceProtocol = 1
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
HIDParser claim this=20005080
bInterfaceClass = 3
bInterfaceSubClass = 0
bInterfaceProtocol = 0
HID Parser Claim: 09 04 01 00 01 03 00 00 00 09 21 10 01 00 01 22 9E 00 07 05 82 03 08 00 0A
report descriptor size = 158
Single endpoint HID:
endpoint = 82
size = 8
interval = 10
new_Pipe
allocate_interrupt_pipe_bandwidth
best_bandwidth = 3, at offset = 0, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
*** Device HID1 258a:1 - connected ***
manufacturer: SINO WEALTH
product: USB KEYBOARD
control callback (hid)
06 01 00 09 80 A1 01 85 02 25 01 15 00 75 01 0A 81 00 0A 82 00 0A 83 00 95 03 81 06 95 05 81 01 C0 06 0C 00 09 01 A1 01 85 03 25 01 15 00 75 01 0A B5 00 0A B6 00 0A B7 00 0A CD 00 0A E2 00 0A A2 00 0A E9 00 0A EA 00 95 08 81 02 0A 83 01 0A 94 01 0A 86 01 0A 88 01 0A 8A 01 0A 92 01 0A A8 02 0A 84 01 95 08 81 02 0A 21 02 0A 23 02 0A 24 02 0A 25 02 0A 26 02 0A 27 02 0A 2A 02 0A B1 02 95 08 81 02 C0 06 00 FF 09 01 A1 01 85 05 15 00 26 FF 00 19 01 29 02 75 08 95 05 B1 02 C0
mesg = 22000681
got report descriptor
Found top level collection 10080
find_driver
driver 20002E00
HIDDumpController Claim: 258a:1 usage: 10080
Found top level collection C0001
find_driver
driver 20002E00
HIDDumpController Claim: 258a:1 usage: c0001
driver 20002EA0
HIDDumpController Claim: 258a:1 usage: c0001
Found top level collection FF000001
find_driver
driver 20002E00
HIDDumpController Claim: 258a:1 usage: ff000001
driver 20002EA0
HIDDumpController Claim: 258a:1 usage: ff000001
driver 20002F40
HIDDumpController Claim: 258a:1 usage: ff000001
*** HID Device hdc1 258a:1 - connected ***
manufacturer: SINO WEALTH
product: USB KEYBOARD
*** HID Device hdc2 258a:1 - connected ***
manufacturer: SINO WEALTH
product: USB KEYBOARD
*** HID Device hdc3 258a:1 - connected ***
manufacturer: SINO WEALTH
product: USB KEYBOARD