Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 6 FirstFirst ... 4 5 6
Results 126 to 130 of 130

Thread: Teensy 3.6 USB Host support

  1. #126
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,649
    I am having some fun as well.

    Here is an updated version with a little more goodies which I will flesh out some more here...

    In particular for many of the usages, it gives a logical Name to it...
    So for example if you output USAGE 10030 it shows (X) at the end 10031(Y)... 9000x shows BUTTON...

    Also there is a new mode (C)
    Which only tries to show some of the data that is changing...

    I am thinking about maybe adding as an example as I believe that others could use this to help extend the library to support their devices.

    Thoughts?

    Edit here shows a mouse...
    Code:
    ***
     Now Showing all data ***
    
    *** Device HID1 1241: 1177 - connected ***
    HIDDumpController Claim: 1241:1177 usage: 10002
    *** HID Device hdc1 1241: 1177 - connected ***
    HID(10002): 00 00 00 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=0(X)
        usage=10031, value=0(Y)
        usage=10038, value=0(Wheel)
      END:
    HID(10002): 00 02 FF 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=2(X)
        usage=10031, value=-1(Y)
        usage=10038, value=0(Wheel)
      END:
    HID(10002): 00 01 FF 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=1(X)
        usage=10031, value=-1(Y)
        usage=10038, value=0(Wheel)
      END:
    HID(10002): 00 03 FC 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=3(X)
        usage=10031, value=-4(Y)
        usage=10038, value=0(Wheel)
      END:
    HID(10002): 00 03 FB 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=3(X)
        usage=10031, value=-5(Y)
        usage=10038, value=0(Wheel)
      END:
    HID(10002): 00 FF 00 00 77 08 02 78 
    Begin topusage:10000 type:2 min:0 max:1
      usage=90001, value=0 (BUTTON 1)
      usage=90002, value=0 (BUTTON 2)
      usage=90003, value=0 (BUTTON 3)
      Begin topusage:10000 type:6 min:-127 max:127
        usage=10030, value=-1(X)
        usage=10031, value=0(Y)
        usage=10038, value=0(Wheel)
      END:
    ***
     Now Showing changed data only ***
    
    HID(10002): 00 00 01 00 77 08 02 78 
    usage=10030, value=0(X)
    usage=10031, value=1(Y)
    HID(10002): 00 00 01 00 77 08 02 78 
    HID(10002): 00 FF 01 00 77 08 02 78 
    usage=10030, value=-1(X)
    HID(10002): 00 00 01 00 77 08 02 78 
    usage=10030, value=0(X)
    HID(10002): 00 00 02 00 77 08 02 78 
    usage=10031, value=2(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    HID(10002): 00 00 02 00 77 08 02 78 
    HID(10002): 00 FF 01 00 77 08 02 78 
    usage=10030, value=-1(X)
    usage=10031, value=1(Y)
    HID(10002): 00 00 03 00 77 08 02 78 
    usage=10030, value=0(X)
    usage=10031, value=3(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    usage=10031, value=2(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    HID(10002): 00 00 02 00 77 08 02 78 
    HID(10002): 00 00 03 00 77 08 02 78 
    usage=10031, value=3(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    usage=10031, value=2(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    HID(10002): 00 01 02 00 77 08 02 78 
    usage=10030, value=1(X)
    HID(10002): 00 00 01 00 77 08 02 78 
    usage=10030, value=0(X)
    usage=10031, value=1(Y)
    HID(10002): 00 00 02 00 77 08 02 78 
    usage=10031, value=2(Y)
    HID(10002): 00 00 01 00 77 08 02 78 
    usage=10031, value=1(Y)
    HID(10002): 00 00 01 00 77 08 02 78 
    HID(10002): 00 00 01 00 77 08 02 78 
    HID(10002): 00 00 01 00 77 08 02 78 
    HID(10002): 00 00 01 00 77 08 02 78 
    HID(10002): 00 01 FF 00 77 08 02 78 
    usage=10030, value=1(X)
    usage=10031, value=-1(Y)
    HID(10002): 00 00 FF 00 77 08 02 78 
    usage=10030, value=0(X)
    HID(10002): 00 01 00 00 77 08 02 78 
    usage=10030, value=1(X)
    usage=10031, value=0(Y)
    HID(10002): 00 01 FE 00 77 08 02 78 
    usage=10031, value=-2(Y)
    HID(10002): 00 01 FF 00 77 08 02 78 
    usage=10031, value=-1(Y)
    HID(10002): 00 01 FE 00 77 08 02 78 
    usage=10031, value=-2(Y)
    HID(10002): 00 01 FE 00 77 08 02 78 
    HID(10002): 00 01 FE 00 77 08 02 78 
    HID(10002): 00 01 FE 00 77 08 02 78 
    HID(10002): 00 00 FE 00 77 08 02 78 
    usage=10030, value=0(X)
    HID(10002): 00 00 FE 00 77 08 02 78 
    HID(10002): 00 00 FE 00 77 08 02 78 
    HID(10002): 00 00 FE 00 77 08 02 78 
    HID(10002): 00 00 FE 00 77 08 02 78 
    HID(10002): 00 01 FF 00 77 08 02 78 
    usage=10030, value=1(X)
    usage=10031, value=-1(Y)
    HID(10002): 00 00 FF 00 77 08 02 78 
    usage=90003, value=0 (BUTTON 3)
    usage=10031, value=-1(Y)
    HID(10002): 00 00 FF 00 77 08 02 78 
    HID(10002): 00 FF 00 00 77 08 02 78 
    usage=10030, value=-1(X)
    usage=10031, value=0(Y)
    *** Device HID1 - disconnected ***
    *** HID Device hdc1 - disconnected ***
    Attached Files Attached Files

  2. #127
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,649
    With Keyboards, Most keyboards mark themselves as boot devices and there is a fixed known format for them.

    However for example I did plug in a Dell Multimedia keyboard and I may extend my code some for it. But if you press some of the special keys like the sort of Arrow on the top left it prints out USAGE C0224 and I don't currently print out anything special for it.

    And if you look at the different usages: https://www.usb.org/sites/default/fi.../hut1_12v2.pdf
    This is Usage Page C (Consumer) you see 224 is: AC Back...

    May add those in as well.

  3. #128
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,649
    I went ahead and added my current version of this sketch to my branch of the library (https://github.com/KurtE/USBHost_t36...ceInfo-Example) and issued a Pull Request: https://github.com/PaulStoffregen/USBHost_t36/pull/39

  4. #129
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,649
    Quote Originally Posted by LERAY View Post
    Fortunetely, of course, I'm using this excellent screen for other uses, with PC's ! I'm waiting for the time when I could replace the PC by TEENSY with GUI interfaces, provided that the USBHost port will run correctly one day... Hoping that one day TEENSY's Father includes an HDMI shield ! (or a chip for example Techtoys or Broadcom for the PI including Graphics 2D and 3D capabilities). After all, it's possible with roughly the same PCB format as TEENSY...
    Again can only do so much to help support these devices when I don't have any such device...

    However as I have mentioned, I have done a new example, which is in a new branch of my Fork and have issued a PR to hopefully add it for the next release.
    You can grab it from: https://github.com/KurtE/USBHost_t36.../HIDDeviceInfo

    This sketch should hopefully give us some information about your touch screen, like what is the form of the HID packets sent (assuming it actually is HID...)
    May take a few attempts depending on how different it is from some currently supported device.

  5. #130
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,649
    Quick note (mostly talking to myself)...
    Added another class (2 files) to example sketch which implement a USB class that only does the claim method... And never claims, but prints out information about the devices that it sees...

    So now with the Tablet I see a lot of information up front like:
    Code:
    USB HID Device Info Program
    
    This Sketch shows information about plugged in HID devices
    
    *** You can control the output by simple character input to Serial ***
    R - Turns on or off showing the raw data
    C - Toggles showing changed data only on or off
    <anything else> - toggles showing the Hid formatted breakdown of the data
    
    
    USBDeviceInfo claim this=20005D08
    ** Device Level **
      vid=56A
      pid=D8
      bDeviceClass = 0
      bDeviceSubClass = 0
      bDeviceProtocol = 0
    09 04 00 00 01 03 01 02 00 09 21 00 01 00 01 22 B0 00 07 05 81 03 09 00 04 09 04 01 00 01 03 00
    00 00 09 21 00 01 00 01 22 4B 00 07 05 82 03 40 00 04 
    
    USBDeviceInfo claim this=20005D08
    ** Interface Level **
    09 04 00 00 01 03 01 02 00 09 21 00 01 00 01 22 B0 00 07 05 81 03 09 00 04 09 04 01 00 01 03 00
    00 00 09 21 00 01 00 01 22 4B 00 07 05 82 03 40 00 04 
     number end points = 1
     bInterfaceClass =    3
     bInterfaceSubClass = 1
     bInterfaceProtocol = 2
    report descriptor size = 176
    Single endpoint HID:
      endpoint = 81
       size = 9
       interval = 4
    
    USBDeviceInfo claim this=20005D08
    ** Interface Level **
    09 04 01 00 01 03 00 00 00 09 21 00 01 00 01 22 4B 00 07 05 82 03 40 00 04 
     number end points = 1
     bInterfaceClass =    3
     bInterfaceSubClass = 0
     bInterfaceProtocol = 0
    report descriptor size = 75
    Single endpoint HID:
      endpoint = 82
       size = 64
       interval = 4
    *** 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 - Yes
    HIDDumpController Claim: 56a:d8 usage: d0001 - NO (Usage: 402e0000)
    HIDDumpController Claim: 56a:d8 usage: d0001 - Yes
    *** 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 - NO (Usage: 402e0000)
    HIDDumpController Claim: 56a:d8 usage: ff000001 - NO (Usage: 402e0000)
    HIDDumpController Claim: 56a:d8 usage: ff000001 - Yes
    *** HID Device hdc3 56a: d8 - connected ***
      manufacturer: Wacom Co.,Ltd.
      product: CTH-661
    Over time may flesh in more of the details, like handle more than two end points and maybe add text like what the different class names or interface classes are...

    But again just getting data

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •