T3.6 USB Host - Bluetooth

Not sure what device it might help for - or that I have any of them ...

Was just a note - in case it might help if Mike does not use that (kr)aPPle stuff. I don't expect Fire's have the Developer exposed? Even activating on Android used to take a secret handshake:

Well have to correct you, the HCI stuff came from unix - I have a hard time even using my wife's apple when she gets stuck :). I only have Windows and Android and Teensy stuff :)
 
Not sure what the correction was? Just noting the HCI events can be recorded on Android - didn't say they invented it? Was not sure if it is complete, useful or relevant to the events at hand. Android probably doesn't have xBox1Bt support for instance?

Apple stuff is different for sure - which is why it suits some people who get used to it. I cringe when somebody has something apple - though I suffer through if it will help them. A local Mom lost her daughter to cancer with many months of texts she wanted to save - so I took the phone and found an app to download it before it was lost as the phone store told her they couldn't help - luckily the app was free … but painful (on a few fronts) hours to make sure I preserved it. My non computer hobby has a scoring system developed - started working with Kindles and such as they were cheap - but went all iPad as the bit of high end and size they had made them more reliable and usable - and Android support is now secondary clone and works okay - but everyone uses iPads. And the they have fully replaced the old paper score system nationwide - that first tried to work with PALMs - with no paper iPad collection and review that does WiFi to Master device from 5-10+ devices and then onto the Web with a couple of buttons.
 
@KurtE/@defragster

Still playing around with USBHost and the Intuos digitizer. I mentioned that there are three IDs, FF0D0001, FF0D0080 and 10002. The interesting thing is that for 10002 there is are no values available - always 0 while I do see HID data. For FF0D0001 I do get usage page and usage ids but the data makes absolutely no sense in positioning. Now for the fun piece, for FF0D0080 - No usage data at all - it all comes out as HID data. It looks like I need another function like we used for MouseController::process_bluetooth_HID_data.

Using that link for descriptors:
FF0D0001
Code:
0x06, 0x0D, 0xFF,  // Usage Page ([COLOR="#FF0000"]Vendor Defined 0xFF0D[/COLOR])
0x09, 0x01,        // Usage (0x01)
0xA1, 0x01,        // Collection (Application)
0x85, 0x02,        //   Report ID (2)
0xA1, 0x00,        //   Collection (Physical)
0x06, 0x00, 0xFF,  //     Usage Page (Vendor Defined 0xFF00)
0x09, 0x01,        //     Usage (0x01)
0x15, 0x00,        //     Logical Minimum (0)
0x26, 0xFF, 0x00,  //     Logical Maximum (255)
0x75, 0x08,        //     Report Size (8)
0x95, 0x09,        //     Report Count (9)
0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              //   End Collection
0x09, 0x01,        //   Usage (0x01)
0x85, 0x02,        //   Report ID (2)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x03,        //   Report ID (3)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x04,        //   Report ID (4)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x05,        //   Report ID (5)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x10,        //   Report ID (16)
0x95, 0x02,        //   Report Count (2)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x11,        //   Report ID (17)
0x95, 0x10,        //   Report Count (16)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x13,        //   Report ID (19)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x07,        //   Report ID (7)
0x95, 0x09,        //   Report Count (9)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x20,        //   Report ID (32)
0x95, 0x05,        //   Report Count (5)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x21,        //   Report ID (33)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x22,        //   Report ID (34)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x23,        //   Report ID (35)
0x95, 0x0E,        //   Report Count (14)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x14,        //   Report ID (20)
0x95, 0x1F,        //   Report Count (31)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x30,        //   Report ID (48)
0x96, 0x02, 0x00,  //   Report Count (2)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x31,        //   Report ID (49)
0x96, 0x09, 0x01,  //   Report Count (265)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x32,        //   Report ID (50)
0x96, 0x08, 0x01,  //   Report Count (264)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x33,        //   Report ID (51)
0x95, 0x01,        //   Report Count (1)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x24,        //   Report ID (36)
0x95, 0x1F,        //   Report Count (31)
0xB1, 0x02,        //   Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile)
0x09, 0x01,        //   Usage (0x01)
0x85, 0x25,        //   Report ID (37)
0x95, 0x04,        //   Report Count (4)
0xB1, 0x1F,        //   Feature (Const,Var,Rel,Wrap,Nonlinear,Preferred State,No Null Position,Non-volatile)
0x85, 0xC0,        //   Report ID (-64)
0x09, 0x00,        //   Usage (0x00)
0x95, 0x09,        //   Report Count (9)
0x81, 0x02,        //   Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              // End Collection

Next call back (10002):
Code:
0x05, 0x01,        // Usage Page (Generic Desktop Ctrls)
0x09, 0x02,        // Usage (Mouse)
0xA1, 0x01,        // Collection (Application)
0x85, 0x01,        //   Report ID (1)
0x09, 0x01,        //   Usage (Pointer)
0xA1, 0x00,        //   Collection (Physical)
0x05, 0x09,        //     Usage Page (Button)
0x19, 0x01,        //     Usage Minimum (0x01)
0x29, 0x05,        //     Usage Maximum (0x05)
0x15, 0x00,        //     Logical Minimum (0)
0x25, 0x01,        //     Logical Maximum (1)
0x95, 0x05,        //     Report Count (5)
0x75, 0x01,        //     Report Size (1)
0x81, 0x02,        //     Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x01,        //     Report Count (1)
0x75, 0x03,        //     Report Size (3)
0x81, 0x01,        //     Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x01,        //     Usage Page (Generic Desktop Ctrls)
0x09, 0x30,        //     Usage (X)
0x09, 0x31,        //     Usage (Y)
0x15, 0x81,        //     Logical Minimum (-127)
0x25, 0x7F,        //     Logical Maximum (127)
0x75, 0x08,        //     Report Size (8)
0x95, 0x02,        //     Report Count (2)
0x81, 0x06,        //     Input (Data,Var,Rel,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              //   End Collection
0xC0,              // End Collection

and the third (FF000080):
Code:
0x06, 0x00, 0xFF,  // Usage Page (Vendor Defined 0xFF00)
0x09, 0x80,        // Usage (0x80)
0xA1, 0x01,        // Collection (Application)
0x85, 0x02,        //   Report ID (2)
0x09, 0x01,        //   Usage (0x01)
0x15, 0x00,        //   Logical Minimum (0)
0x26, 0xFF, 0x00,  //   Logical Maximum (255)
0x75, 0x08,        //   Report Size (8)
0x95, 0x3F,        //   Report Count (63)
0x81, 0x03,        //   Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x85, 0x03,        //   Report ID (3)
0x09, 0x01,        //   Usage (0x01)
0x15, 0x00,        //   Logical Minimum (0)
0x26, 0xFF, 0x00,  //   Logical Maximum (255)
0x75, 0x08,        //   Report Size (8)
0x95, 0x3F,        //   Report Count (63)
0x81, 0x03,        //   Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0,              // End Collection
 
@defragster
Oh - I got confused since you mentioned Mike and (kr)apple in the same sentence :)

Not sure what the correction was? Just noting the HCI events can be recorded on Android - didn't say they invented it? Was not sure if it is complete, useful or relevant to the events at hand. Android probably doesn't have xBox1Bt support for instance?
Actually I think it can - I have to check. I know I paired once of the controllers with my android, maybe it was the ps3.
 
Good Morning @mjs513 and @defragster and...

With the Tablet (looks like mine might arrive today, not sure if I will be in town to pick it up or not...)

My guess is it might need some initialization to tell it to use the Mouse like report...

Wonder what this device did if you told it to work as a boot protocol device?

We did that with one keyboard (see function KeyboardController::forceBootProtocol), which screwed up some mice (logitech and MS) when it was a combo unit... So maybe long shot...
 
Good Morning @mjs513 and @defragster and...

With the Tablet (looks like mine might arrive today, not sure if I will be in town to pick it up or not...)

My guess is it might need some initialization to tell it to use the Mouse like report...

Wonder what this device did if you told it to work as a boot protocol device?

We did that with one keyboard (see function KeyboardController::forceBootProtocol), which screwed up some mice (logitech and MS) when it was a combo unit... So maybe long shot...

You got me on the forceBootProtocol but I did manage to do a workaround. 0d0001 is the digitizer with the pen, 0080 seems to be the digitizer(mouse) in finger mode, i.e., you use your finger instead of the pen (more stable as far as I am concerned). In the later mode it comes out as rawhid so I modified the rawhid claim to include this device (pid/vid) so now I can get data in the example I am using :).

Now I do have a c++ question for you, sorry tried a few things but just can't get it. In the raw hid function you have:
Code:
    while (len) {
      uint8_t cb = (len > 16) ? 16 : len;
      const uint8_t *p = data;
      uint8_t i;
      for (i = 0; i < cb; i++) {
        Serial.printf("%02x ", *p++);
      }
      Serial.print(": ");
      for (i = 0; i < cb; i++) {
        Serial.write(((*data >= ' ') && (*data <= '~')) ? *data : '.');
        data++;
      }
      len -= cb;
      Serial.println();
    }
  }
Real simple question is how to put data in an array? When you are ready let me know I will attach the updated lib.

EDIT: Never mind = was putting it in the wrong place
 
Last edited:
@KurtE/@defragster

Well got my kludge working for the intuos PTS tablet. Here is what I did for a test:

View attachment USBHost_t36-WIP.zip

At least its a starting point to see the data.

EDIT: Doesn't seem to want to work on the T$ beta though. Keep loosing the USB and loosing usb device in windows.
 
Last edited:
@mjs513 - good you got some headway - bummer on the intermittent T$_b - only thoughts are pogo push and 15s reset, anything showing on debug_ser#4?
 
Ok tried to move a post but seems I messed up where it goes:
On the USBHost_t36 Bluetooth I posted a status of trying to get a digitizer working (https://forum.pjrc.com/threads/49358-T3-6-USB-Host-Bluetooth?p=202188&viewfull=1#post202188) but I keep having the same type of problem, i.e., loosing USB and connection to PC. No need to do a 15s reset though, can load a sketch with just tapping the pgm button. Not lights blinking either.

@defragster asked if I see anything strange on Serial4 so I hooked it up and the only thing that shows is a bunch of UART messages:
Code:
UART received: 0
UART received: 13
UART received: 10
deleted,,,,
UART received: 112
UART received: 13
UART received: 10
So not sure what is causing the problem.

EDIT: Ok seemed to resolve the problem with not running I commented out Bluetooth device and seems to be working again.... So will put this back on the other thread. Seems I always find the problem after I post it - most of the time sorry :)
 
@defragster or somebody

Can you delete that other thread with the same name I just created ! Help!
 
Hi @mjs513 and @defragster ...

The tablet arrived. played with it some on my PC and then tried on T4... Had to remember to add in the Serial1.begin(2000000); in mouse.ino
And I enabled debug printing and I don't think it actually ever called off to the mouse code to try to get the hid report...

Then hooked up to RPI3 and took a look at the HID stuff... What a huge HID stuff:
Code:
Usage Page (FF0Dh),                     ; FF0Dh, vendor-defined
Usage (01h),
Collection (Application),
    Report ID (16),
    Usage (20h),
    Physical Minimum (0),
    Physical Maximum (0),
    Logical Minimum (0),
    Logical Maximum (1),
    Collection (Physical),
        Usage (42h),
        Usage (44h),
        Usage (5Ah),
        Logical Maximum (1),
        Report Size (1),
        Report Count (3),
        Input (Variable),
        Report Count (2),
        Input (Constant, Variable),
        Usage (32h),
        Usage (36h),
        Report Count (2),
        Input (Variable),
        Report Count (1),
        Input (Constant, Variable),
        Usage (0130h),
        Unit (Centimeter),
        Unit Exponent (13),
        Physical Maximum (15200),
        Logical Maximum (15200),
        Report Size (24),
        Report Count (1),
        Input (Variable),
        Usage (0131h),
        Physical Maximum (9500),
        Logical Maximum (9500),
        Input (Variable),
        Usage (30h),
        Unit Exponent (0),
        Unit,
        Logical Maximum (4095),
        Report Size (16),
        Input (Variable),
        Report Size (8),
        Report Count (6),
        Input (Constant, Variable),
        Usage (0132h),
        Logical Maximum (63),
        Report Size (8),
        Report Count (1),
        Input (Variable),
        Usage (5Bh),
        Usage (5Ch),
        Logical Minimum (-2147483648),
        Logical Maximum (2147483647),
        Report Size (32),
        Report Count (2),
        Input (Variable),
        Usage (77h),
        Logical Minimum (0),
        Logical Maximum (4095),
        Report Size (16),
        Report Count (1),
        Input (Variable),
    End Collection,
    Report ID (17),
    Unit,
    Unit Exponent (0),
    Physical Minimum (0),
    Physical Maximum (0),
    Usage (39h),
    Collection (Physical),
        Usage (0910h),
        Usage (0911h),
        Usage (0912h),
        Usage (0913h),
        Logical Minimum (0),
        Logical Maximum (1),
        Report Size (1),
        Report Count (4),
        Input (Variable),
        Report Count (4),
        Input (Constant, Variable),
        Report Size (8),
        Report Count (7),
        Input (Constant, Variable),
    End Collection,
    Report ID (19),
    Unit,
    Unit Exponent (0),
    Physical Minimum (0),
    Physical Maximum (0),
    Usage (1013h),
    Collection (Physical),
        Usage (043Bh),
        Logical Minimum (0),
        Logical Maximum (100),
        Report Size (7),
        Report Count (1),
        Input (Variable),
        Usage (0404h),
        Logical Maximum (1),
        Report Size (1),
        Input (Variable),
        Usage (00h),
        Logical Maximum (255),
        Report Size (8),
        Input (Variable),
        Report Size (8),
        Report Count (6),
        Input (Constant, Variable),
    End Collection,
    Usage (0Eh),
    Collection (Logical),
        Report ID (2),
        Usage (1002h),
        Logical Minimum (2),
        Logical Maximum (2),
        Report Size (8),
        Report Count (1),
        Feature (Variable),
        Report ID (3),
        Usage (1003h),
        Logical Minimum (0),
        Logical Maximum (255),
        Report Count (1),
        Feature (Variable),
        Report ID (4),
        Usage (1004h),
        Logical Minimum (1),
        Logical Maximum (1),
        Report Count (1),
        Feature (Variable),
        Report ID (7),
        Usage (1009h),
        Logical Minimum (0),
        Logical Maximum (255),
        Report Count (1),
        Feature (Variable),
        Feature (Constant, Variable),
        Usage (1007h),
        Usage (00h),
        Logical Maximum (65535),
        Report Size (16),
        Report Count (2),
        Feature (Variable),
        Report Size (8),
        Report Count (9),
        Feature (Constant, Variable),
        Report ID (12),
        Usage (0D30h),
        Usage (0D31h),
        Usage (0D32h),
        Usage (0D33h),
        Unit (Centimeter),
        Unit Exponent (13),
        Physical Minimum (0),
        Physical Maximum (200),
        Logical Minimum (0),
        Logical Maximum (400),
        Report Size (16),
        Report Count (4),
        Feature (Variable),
        Report ID (13),
        Usage (100Dh),
        Unit,
        Unit Exponent (0),
        Physical Maximum (0),
        Logical Maximum (1),
        Report Size (8),
        Report Count (1),
        Feature (Variable),
        Report ID (20),
        Usage (1014h),
        Logical Maximum (255),
        Report Count (13),
        Feature (Variable),
        Report ID (204),
        Usage (10CCh),
        Report Count (2),
        Feature (Variable),
        Report ID (49),
        Usage (1031h),
        Logical Maximum (100),
        Report Count (3),
        Feature (Variable),
        Report Count (2),
        Feature (Constant, Variable),
    End Collection,
    Usage (10ACh),
    Collection (Logical),
        Logical Minimum (0),
        Logical Maximum (255),
        Report Size (8),
        Report ID (172),
        Usage (00h),
        Report Count (191),
        Input (Variable),
        Report ID (21),
        Usage (00h),
        Report Count (14),
        Feature (Variable),
        Report ID (51),
        Usage (00h),
        Report Count (18),
        Feature (Variable),
        Report ID (68),
        Usage (00h),
        Report Count (4),
        Feature (Variable),
        Report ID (69),
        Usage (00h),
        Report Count (32),
        Feature (Variable),
        Report ID (96),
        Usage (00h),
        Report Count (63),
        Feature (Variable),
        Report ID (97),
        Usage (00h),
        Report Count (62),
        Feature (Variable),
        Report ID (98),
        Usage (00h),
        Report Count (62),
        Feature (Variable),
        Report ID (101),
        Usage (00h),
        Report Count (4),
        Feature (Variable),
        Report ID (102),
        Usage (00h),
        Report Count (4),
        Feature (Variable),
        Report ID (103),
        Usage (00h),
        Report Count (4),
        Feature (Variable),
        Report ID (104),
        Usage (00h),
        Report Count (17),
        Feature (Variable),
        Report ID (111),
        Usage (00h),
        Report Count (62),
        Feature (Variable),
        Report ID (205),
        Usage (00h),
        Report Count (2),
        Feature (Variable),
        Report ID (22),
        Usage (00h),
        Report Count (14),
        Feature (Variable),
        Report ID (53),
        Usage (00h),
        Report Count (10),
        Feature (Variable),
    End Collection,
    Report ID (208),
    Usage (01h),
    Report Count (8),
    Feature (Variable),
    Report ID (209),
    Usage (01h),
    Report Count (260),
    Feature (Variable),
    Report ID (210),
    Usage (01h),
    Report Count (260),
    Feature (Variable),
    Report ID (211),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (212),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (213),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (214),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (215),
    Usage (01h),
    Report Count (8),
    Feature (Variable),
    Report ID (216),
    Usage (01h),
    Report Count (12),
    Feature (Variable),
    Report ID (217),
    Usage (01h),
    Report Count (1280),
    Feature (Variable),
    Report ID (218),
    Usage (01h),
    Report Count (516),
    Feature (Variable),
    Report ID (219),
    Usage (01h),
    Report Count (6),
    Feature (Variable),
    Report ID (220),
    Usage (01h),
    Report Count (2),
    Feature (Variable),
    Report ID (221),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (222),
    Usage (01h),
    Report Count (4),
    Feature (Variable),
    Report ID (223),
    Usage (01h),
    Report Count (34),
    Feature (Variable),
    Report ID (224),
    Usage (01h),
    Report Count (1),
    Feature (Variable),
    Report ID (225),
    Usage (01h),
    Report Count (2),
    Feature (Variable),
    Report ID (226),
    Usage (01h),
    Report Count (2),
    Feature (Variable),
    Report ID (227),
    Usage (01h),
    Report Count (2),
    Feature (Variable),
    Report ID (228),
    Usage (01h),
    Report Count (511),
    Feature (Variable),
End Collection
That is the HID report is I believe: it is about: 47*16+ 7 = 759 bytes long...
And verified in debug printing:
Code:
HID Parser Claim: 09 04 00 00 01 03 00 00 00 09 21 10 01 00 01 22 F7 02 07 05 81 03 40 00 01
report descriptor size = 759

Then notice in code: if (descsize > sizeof(descriptor)) return false; // can't fit the report descriptor
and if you look in usbhost_t36.h you see: uint8_t descriptor[512];

So fails! Might see what it does if I make it 800...
 
@defragster - thanks for correcting - probably forgot to change one of the check boxes. Was nervous that I would delete this one since it had the same name.

@KurtE
Wow - that really is a long descriptor block is really long. Mine wasn't nearly that long. Have you checked out what they did on Linux for the Wacom table - might help: https://code.woboq.org/linux/linux/drivers/hid/wacom_wac.h.html.

What tablet did you get?
 
First the simple part:
I ordered: https://smile.amazon.com/gp/product/B079HL9YSF

Which after I changed the code for 800, I now see:
Code:
USB Host Testing
960
*** Device HID1 56a:374 - connected ***
  manufacturer: Wacom Co.,Ltd.
  product: Intuos S
  Serial: 8HH00R2103114

I have not tried it yet on Linux, other than on RPI3 to get the Hid dump...

Some of the debug output from Our stuff... After the Hid Parser claimed:
Code:
HIDParser claim this=20006920
 bInterfaceClass =    3
 bInterfaceSubClass = 0
 bInterfaceProtocol = 0
HID Parser Claim: 09 04 00 00 01 03 00 00 00 09 21 10 01 00 01 22 F7 02 07 05 81 03 40 00 01
report descriptor size = 759
Single endpoint HID:
  endpoint = 81
   size = 64
   interval = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
 best_bandwidth = 5, at offset = 0, shift= 0
Descriptor 33 = HID
Descriptor 5 = ENDPOINT
control callback (hid)
06 0D FF 09 01 A1 01 85 10 09 20 35 00 45 00 15 00 25 01 A1 00 09 42 09 44 09 5A 25 01 75 01 95 03 81 02 95 02 81 03 09 32 09 36 95 02 81 02 95 01 81 03 0A 30 01 65 11 55 0D 47 60 3B 00 00 27 60 3B 00 00 75 18 95 01 81 02 0A 31 01 47 1C 25 00 00 27 1C 25 00 00 81 02 09 30 55 00 65 00 26 FF 0F 75 10 81 02 75 08 95 06 81 03 0A 32 01 25 3F 75 08 95 01 81 02 09 5B 09 5C 17 00 00 00 80 27 FF FF FF 7F 75 20 95 02 81 02 09 77 15 00 26 FF 0F 75 10 95 01 81 02 C0 85 11 65 00 55 00 35 00 45 00 09 39 A1 00 0A 10 09 0A 11 09 0A 12 09 0A 13 09 15 00 25 01 75 01 95 04 81 02 95 04 81 03 75 08 95 07 81 03 C0 85 13 65 00 55 00 35 00 45 00 0A 13 10 A1 00 0A 3B 04 15 00 25 64 75 07 95 01 81 02 0A 04 04 25 01 75 01 81 02 09 00 26 FF 00 75 08 81 02 75 08 95 06 81 03 C0 09 0E A1 02 85 02 0A 02 10 15 02 25 02 75 08 95 01 B1 02 85 03 0A 03 10 15 00 26 FF 00 95 01 B1 02 85 04 0A 04 10 15 01 25 01 95 01 B1 02 85 07 0A 09 10 15 00 26 FF 00 95 01 B1 02 B1 03 0A 07 10 09 00 27 FF FF 00 00 75 10 95 02 B1 02 75 08 95 09 B1 03 85 0C 0A 30 0D 0A 31 0D 0A 32 0D 0A 33 0D 65 11 55 0D 35 00 46 C8 00 15 00 26 90 01 75 10 95 04 B1 02 85 0D 0A 0D 10 65 00 55 00 45 00 25 01 75 08 95 01 B1 02 85 14 0A 14 10 26 FF 00 95 0D B1 02 85 CC 0A CC 10 95 02 B1 02 85 31 0A 31 10 25 64 95 03 B1 02 95 02 B1 03 C0 0A AC 10 A1 02 15 00 26 FF 00 75 08 85 AC 09 00 96 BF 00 81 02 85 15 09 00 95 0E B1 02 85 33 09 00 95 12 B1 02 85 44 09 00 95 04 B1 02 85 45 09 00 95 20 B1 02 85 60 09 00 95 3F B1 02 85 61 09 00 95 3E B1 02 85 62 09 00 95 3E B1 02 85 65 09 00 95 04 B1 02 85 66 09 00 95 04 B1 02 85 67 09 00 95 04 B1 02 85 68 09 00 95 11 B1 02 85 6F 09 00 95 3E B1 02 85 CD 09 00 95 02 B1 02 85 16 09 00 95 0E B1 02 85 35 09 00 95 0A B1 02 C0 85 D0 09 01 96 08 00 B1 02 85 D1 09 01 96 04 01 B1 02 85 D2 09 01 96 04 01 B1 02 85 D3 09 01 96 04 00 B1 02 85 D4 09 01 96 04 00 B1 02 85 D5 09 01 96 04 00 B1 02 85 D6 09 01 96 04 00 B1 02 85 D7 09 01 96 08 00 B1 02 85 D8 09 01 96 0C 00 B1 02 85 D9 09 01 96 00 05 B1 02 85 DA 09 01 96 04 02 B1 02 85 DB 09 01 96 06 00 B1 02 85 DC 09 01 96 02 00 B1 02 85 DD 09 01 96 04 00 B1 02 85 DE 09 01 96 04 00 B1 02 85 DF 09 01 96 22 00 B1 02 85 E0 09 01 96 01 00 B1 02 85 E1 09 01 96 02 00 B1 02 85 E2 09 01 96 02 00 B1 02 85 E3 09 01 96 02 00 B1 02 85 E4 09 01 96 FF 01 B1 02 C0
  mesg = 22000681
  got report descriptor
Found top level collection FF0D0001
find_driver
  driver 200042EC
  driver 2000458C
  driver 20006220
MouseController::claim_collection: topusage=ff0d0001
  driver 200076EC
  driver 20007580
Rawhid Claim: 56a:374 usage: ff0d0001
  driver 20007620
Rawhid Claim: 56a:374 usage: ff0d0001
No Driver claimed topusage: FF0D0001
Note: I added Print for Mouse controller to see if it was called, also put in at end that no Driver actually claimed report as I have mistakenly thought in the past that the Rawhid claimed it and
actually no one claimed it...

Note: this table does not appear to work at all with finger other than to press one of the 4 buttons... Then it does dump debug data showing what we received from the device. It does work with their pen, which is interesting as it send data even when I move the pen maybe half inch above the tablet....

With data like:
HID: 1 - 10 40 75 3A 00 2D 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Code:
00 00 00 00 00
HID: 1 - 10 40 DC 3A 00 17 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
HID: 1 - 10 40 38 3B 00 06 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
HID: 1 - 10 00 38 3B 00 06 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Edit: The Tablet works with my old PC running Ubuntu 18.04...

Some information from dmesg;
Code:
[  104.847347] usb 1-1.4: new full-speed USB device number 4 using ehci-pci
[  104.958831] usb 1-1.4: New USB device found, idVendor=056a, idProduct=0374
[  104.958835] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  104.958837] usb 1-1.4: Product: Intuos S
[  104.958839] usb 1-1.4: Manufacturer: Wacom Co.,Ltd.
[  104.958842] usb 1-1.4: SerialNumber: 8HH00R2103114
[  105.006752] input: Wacom Intuos S Pen as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:056A:0374.0004/input/input17
[  105.006851] input: Wacom Intuos S Pad as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:056A:0374.0004/input/input19
[  105.006925] wacom 0003:056A:0374.0004: hidraw2: USB HID v1.10 Device [Wacom Co.,Ltd. Intuos S] on usb-0000:00:1a.0-1.4/input0
kurt@kurt-XPS-8300:~$
 
Last edited:
@KurtE

Yep - that is the same problem I had when I started. Its probably using FF0D0001 instead of 10002. Did you give the version I had a try? Its strange how the thing works.....

May order the Intous S so we are on the same page

At the time, I almost purchased the wireless bluetooth one (https://smile.amazon.com/dp/B079J2FSQ7) as to maybe kill two birds with one stone, but, thought I was getting the one closer to the one you had...

So far I have not tried your version yet... May soon, but was trying to work through the issues, to see what makes sense... Like why I was not seeing it even attempt to use the mouse HID stuff...

I hacked the mouse code to try to accept the data, but it does not understand the data:
Code:
hidclaim_t MouseController::claim_collection(USBHIDParser *driver, Device_t *dev, uint32_t topusage)
{
	// only claim Desktop/Mouse
	USBHDBGSerial.printf("MouseController::claim_collection: topusage=%x\n", topusage);
	if ((topusage != 0x10002) && (topusage != 0x10001)) {
		// See if this is Wacom tablet... 
		if ((topusage != 0xff0d0001) || (dev->idVendor != 0x56a || (dev->idProduct) != 0x374)) return CLAIM_NO;
		USBHDBGSerial.printf("Wacom Hack: *** claimed ***\n");

	}
	// only claim from one physical device
	if (mydevice != NULL && dev != mydevice) return CLAIM_NO;

Clicking the buttons:
Code:
HID: 1 - 11 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=4
       usage count=4
Input, total bits=4
  usage = FF0D0910  data = 1
  usage = FF0D0911  data = 0
  usage = FF0D0912  data = 0
  usage = FF0D0913  data = 0
HID: 1 - 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=4
       usage count=4
Input, total bits=4
  usage = FF0D0910  data = 0
  usage = FF0D0911  data = 0
  usage = FF0D0912  data = 0
  usage = FF0D0913  data = 0

Hover or touch tablet...
Code:
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=4
       usage count=4
Input, total bits=4
  usage = FF0D0910  data = 1
  usage = FF0D0911  data = 0
  usage = FF0D0912  data = 0
  usage = FF0D0913  data = 0
HID: 1 - 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=4
       usage count=4
Input, total bits=4
  usage = FF0D0910  data = 0
  usage = FF0D0911  data = 0
  usage = FF0D0912  data = 0
  usage = FF0D0913  data = 0
HID: 1 - 10 40 B5 08 00 7F 02 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=3
       usage count=3
Input, total bits=3
  usage = FF0D0042  data = 0
  usage = FF0D0044  data = 0
  usage = FF0D005A  data = 0
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=2
       usage count=2
Input, total bits=2
  usage = FF0D0032  data = 0
  usage = FF0D0036  data = 1
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  15200
       reportcount=1
       usage count=1
Input, total bits=24
  usage = FF0D0130  data = 2229
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  9500
       reportcount=1
       usage count=1
Input, total bits=24
  usage = FF0D0131  data = 639
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  4095
       reportcount=1
       usage count=1
Input, total bits=16
  usage = FF0D0030  data = 0
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  63
       reportcount=1
       usage count=1
Input, total bits=8
  usage = FF0D0132  data = 63
begin, usage=FF0D0000
       type= 2
       min=  -2147483648
       max=  2147483647
       reportcount=2
       usage count=2
Input, total bits=64
  usage = FF0D005B  sdata = 0
  usage = FF0D005C  sdata = 0
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  4095
       reportcount=1
       usage count=1
Input, total bits=16
  usage = FF0D0077  data = 0
HID: 1 - 10 40 9C 08 00 8A 02 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 
@KurtE

Mine seems to be unique in that it does both pen and finger - don't even think they make it anymore :(. One good thing about yours is that it looks like its following what I see in the Linux driver (not even close for the version I have). This is what I found in the driver:
Code:
#define WACOM_HID_UP_WACOMDIGITIZER     0xff0d0000
#define WACOM_HID_SP_PAD                0x00040000
#define WACOM_HID_SP_BUTTON             0x00090000
#define WACOM_HID_SP_DIGITIZER          0x000d0000
#define WACOM_HID_SP_DIGITIZERINFO      0x00100000
#define WACOM_HID_WD_DIGITIZER          (WACOM_HID_UP_WACOMDIGITIZER | 0x01)
#define WACOM_HID_WD_PEN                (WACOM_HID_UP_WACOMDIGITIZER | 0x02)
#define WACOM_HID_WD_SENSE              (WACOM_HID_UP_WACOMDIGITIZER | 0x36)
#define WACOM_HID_WD_DIGITIZERFNKEYS    (WACOM_HID_UP_WACOMDIGITIZER | 0x39)
#define WACOM_HID_WD_SERIALNUMBER       (WACOM_HID_UP_WACOMDIGITIZER | 0x5b)
#define WACOM_HID_WD_SERIALHI           (WACOM_HID_UP_WACOMDIGITIZER | 0x5c)
#define WACOM_HID_WD_TOOLTYPE           (WACOM_HID_UP_WACOMDIGITIZER | 0x77)
#define WACOM_HID_WD_DISTANCE           (WACOM_HID_UP_WACOMDIGITIZER | 0x0132)
#define WACOM_HID_WD_TOUCHSTRIP         (WACOM_HID_UP_WACOMDIGITIZER | 0x0136)
#define WACOM_HID_WD_TOUCHSTRIP2        (WACOM_HID_UP_WACOMDIGITIZER | 0x0137)
#define WACOM_HID_WD_TOUCHRING          (WACOM_HID_UP_WACOMDIGITIZER | 0x0138)
#define WACOM_HID_WD_TOUCHRINGSTATUS    (WACOM_HID_UP_WACOMDIGITIZER | 0x0139)
#define WACOM_HID_WD_REPORT_VALID       (WACOM_HID_UP_WACOMDIGITIZER | 0x01d0)
#define WACOM_HID_WD_ACCELEROMETER_X    (WACOM_HID_UP_WACOMDIGITIZER | 0x0401)
#define WACOM_HID_WD_ACCELEROMETER_Y    (WACOM_HID_UP_WACOMDIGITIZER | 0x0402)
#define WACOM_HID_WD_ACCELEROMETER_Z    (WACOM_HID_UP_WACOMDIGITIZER | 0x0403)
#define WACOM_HID_WD_BATTERY_CHARGING   (WACOM_HID_UP_WACOMDIGITIZER | 0x0404)
#define WACOM_HID_WD_TOUCHONOFF         (WACOM_HID_UP_WACOMDIGITIZER | 0x0454)
#define WACOM_HID_WD_BATTERY_LEVEL      (WACOM_HID_UP_WACOMDIGITIZER | 0x043b)
#define WACOM_HID_WD_EXPRESSKEY00       (WACOM_HID_UP_WACOMDIGITIZER | 0x0910)
#define WACOM_HID_WD_EXPRESSKEYCAP00    (WACOM_HID_UP_WACOMDIGITIZER | 0x0950)
#define WACOM_HID_WD_MODE_CHANGE        (WACOM_HID_UP_WACOMDIGITIZER | 0x0980)
#define WACOM_HID_WD_MUTE_DEVICE        (WACOM_HID_UP_WACOMDIGITIZER | 0x0981)
#define WACOM_HID_WD_CONTROLPANEL       (WACOM_HID_UP_WACOMDIGITIZER | 0x0982)
#define WACOM_HID_WD_ONSCREEN_KEYBOARD  (WACOM_HID_UP_WACOMDIGITIZER | 0x0983)
#define WACOM_HID_WD_BUTTONCONFIG       (WACOM_HID_UP_WACOMDIGITIZER | 0x0986)
#define WACOM_HID_WD_BUTTONHOME         (WACOM_HID_UP_WACOMDIGITIZER | 0x0990)
#define WACOM_HID_WD_BUTTONUP           (WACOM_HID_UP_WACOMDIGITIZER | 0x0991)
#define WACOM_HID_WD_BUTTONDOWN         (WACOM_HID_UP_WACOMDIGITIZER | 0x0992)
#define WACOM_HID_WD_BUTTONLEFT         (WACOM_HID_UP_WACOMDIGITIZER | 0x0993)
#define WACOM_HID_WD_BUTTONRIGHT        (WACOM_HID_UP_WACOMDIGITIZER | 0x0994)
#define WACOM_HID_WD_BUTTONCENTER       (WACOM_HID_UP_WACOMDIGITIZER | 0x0995)
#define WACOM_HID_WD_FINGERWHEEL        (WACOM_HID_UP_WACOMDIGITIZER | 0x0d03)
#define WACOM_HID_WD_OFFSETLEFT         (WACOM_HID_UP_WACOMDIGITIZER | 0x0d30)
#define WACOM_HID_WD_OFFSETTOP          (WACOM_HID_UP_WACOMDIGITIZER | 0x0d31)
#define WACOM_HID_WD_OFFSETRIGHT        (WACOM_HID_UP_WACOMDIGITIZER | 0x0d32)
#define WACOM_HID_WD_OFFSETBOTTOM       (WACOM_HID_UP_WACOMDIGITIZER | 0x0d33)
#define WACOM_HID_WD_DATAMODE           (WACOM_HID_UP_WACOMDIGITIZER | 0x1002)
#define WACOM_HID_WD_DIGITIZERINFO      (WACOM_HID_UP_WACOMDIGITIZER | 0x1013)
#define WACOM_HID_UP_G9                 0xff090000
#define WACOM_HID_G9_PEN                (WACOM_HID_UP_G9 | 0x02)
#define WACOM_HID_G9_TOUCHSCREEN        (WACOM_HID_UP_G9 | 0x11)
#define WACOM_HID_UP_G11                0xff110000
#define WACOM_HID_G11_PEN               (WACOM_HID_UP_G11 | 0x02)
#define WACOM_HID_G11_TOUCHSCREEN       (WACOM_HID_UP_G11 | 0x11)
#define WACOM_HID_UP_WACOMTOUCH         0xff000000
#define WACOM_HID_WT_TOUCHSCREEN        (WACOM_HID_UP_WACOMTOUCH | 0x04)
#define WACOM_HID_WT_TOUCHPAD           (WACOM_HID_UP_WACOMTOUCH | 0x05)
#define WACOM_HID_WT_CONTACTMAX         (WACOM_HID_UP_WACOMTOUCH | 0x55)
#define WACOM_HID_WT_SERIALNUMBER       (WACOM_HID_UP_WACOMTOUCH | 0x5b)
#define WACOM_HID_WT_X                  (WACOM_HID_UP_WACOMTOUCH | 0x130)
#define WACOM_HID_WT_Y                  (WACOM_HID_UP_WACOMTOUCH | 0x131)

From what I saw it should be the same for BT.

EDIT: Forgot. As for it claiming the mouse - that was what I found also. One of the topusage codes was 10002 but there was no data associated with that usage. All the data came through 0xFF0D. Just as you are seeing now. So instead of hacking up the mouse I just created the digitizer class - probably should have named it tablet :)
 
Last edited:
These are USB not Bt tablets? Seems an odd thing to run off a Teensy?
Why? I had it and should have acted no different than any other pointing device like a mouse. You also might using it in conjunction with the TFT to act as touch panel. Besides - it was collecting dust on my shelf and wanted to see if I could get it working on the Teensy :)

Looked at it awhile ago out of curiosity but put it aside - Bill's implementation looks interesting though.

… well no insult to a person was intended ... Tools indeed.
No comment.
 
Ok as a test I plug in one of my memory sticks:
Code:
sizeof Device = 36
sizeof Pipe = 96
sizeof Transfer = 64
power up USBHS PHY
 reset waited 5
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 1FFF6000
periodictable = 1FFF6000
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 00 00 00 40 81 07 71 55 26 01 01 02 03 01 
    VendorID = 0781, ProductID = 5571, Version = 0126
    Class/Subclass/Protocol = 0 / 0 / 0
    Number of Configurations = 1
enumeration:
[COLOR="#FF0000"]enumeration:
Manufacturer: SanDisk
enumeration:
Product: Cruzer Fit[/COLOR]
enumeration:
Serial Number: 4C532000061023112101
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
  09 02 20 00 01 01 00 80 64 
    NumInterfaces = 1
    ConfigurationValue = 1
  09 04 00 00 02 08 06 50 00 
    Interface = 0
    Number of endpoints = 2
[COLOR="#FF0000"]    Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)[/COLOR]
  07 05 81 02 00 02 00 
    Endpoint = 1 IN
    Type = Bulk
    Max Size = 512
    Polling Interval = 0
  07 05 02 02 00 02 01 
    Endpoint = 2 OUT
    Type = Bulk
    Max Size = 512
    Polling Interval = 1
enumeration:
USBHub memory usage = 960
USBHub claim_device this=1FFF3EC0
USBHub memory usage = 960
USBHub claim_device this=1FFF2560
KeyboardController claim this=1FFF2020
KeyboardController claim this=1FFF22C0
HIDParser claim this=1FFF2A40
HIDParser claim this=1FFF2F40
HIDParser claim this=1FFF3440
HIDParser claim this=1FFF4920
HIDParser claim this=1FFF39C0
JoystickController claim this=1FFF4F00
BluetoothController claim this=1FFF4280
Descriptor 4 = INTERFACE
KeyboardController claim this=1FFF2020
KeyboardController claim this=1FFF22C0
HIDParser claim this=1FFF2A40
HIDParser claim this=1FFF2F40
HIDParser claim this=1FFF3440
HIDParser claim this=1FFF4920
HIDParser claim this=1FFF39C0
JoystickController claim this=1FFF4F00
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 01 
Jtype=0
BluetoothController claim this=1FFF4280
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
It has no problems recognizing the device - so the problem is going to be how to combine what Bill did with USBFat and USBHost. Now a quick look through the code it looks like the primary driver are the massstorage.h and masstorage.cpp files ….
 
@KurtE - feel bad that you just got the wired version instead of the BT - can you still return it to amazon?
 
@mjs513 and @defragster - Good morning... (Tim was just pulling your leg ;) )

As for the Tablet and returning for BT - I will punt for now... Again not sure if in a few days if this will just be a dust collector or (Sharon or myself) might find it useful for maybe working with Photos or the like...

Mike, I have your code, integrated with mine and it is showing some stuff, although everything 0...
Code:
Mouse: buttons = 0,  mouseX = 0,  mouseY = 0,  wheel = 0,  wheelH = 0
 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0
Mouse: buttons = 0,  mouseX = 0,  mouseY = 0,  wheel = 0,  wheelH = 0
 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0
Mouse: buttons = 0,  mouseX = 0,  mouseY = 0,  wheel = 0,  wheelH = 0
 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0
Mouse: buttons = 0,  mouseX = 0,  mouseY = 0,  wheel = 0,  wheelH = 0
 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0 8:0 9:0
Although maybe I should check that I have your latest stuff?
Code:
void DigitizerController::hid_input_begin(uint32_t topusage, uint32_t type, int lgmin, int lgmax)
{
	// TODO: check if absolute coordinates
	hid_input_begin_ = true;
}

void DigitizerController::hid_input_data(uint32_t usage, int32_t value)
{
	USBHDBGSerial.printf("Digitizer: usage=%X, value=%d\n", usage, value);
	uint32_t usage_page = usage >> 16;
	usage &= 0xFFFF;
	USBHDBGSerial.printf("Digitizer: &usage=%X, usage_page=%x\n", usage, usage_page);
	
	if (usage_page == 0xff00 && usage >= 100 && usage <= 0x108) {
		switch (usage) {
		  case 0x102:
			mouseX = value;
			break;
		  case 0x103:
			mouseY = value;
			break;
		  case 0x32: // Apple uses this for horizontal scroll
			wheelH = value;
			break;
		  case 0x38:
			wheel = value;
			break;
		}
		digiAxes[usage & 0xf] = value;
	}
}

void DigitizerController::hid_input_end()
{
	if (hid_input_begin_) {
		digitizerEvent = true;
		hid_input_begin_ = false;
	}
}

void DigitizerController::digitizerDataClear() {
	digitizerEvent = false;
	buttons = 0;
	mouseX  = 0;
	mouseY  = 0;
	wheel   = 0;
	wheelH  = 0;
}
Again here is some of the feedback data for at least one message:
Code:
HID: 1 - 10 00 13 0F 00 A4 14 00 00 00 00 00 00 00 00 00 3F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=3
       usage count=3
Input, total bits=3
  usage = FF0D0042  data = 0
Digitizer: usage=FF0D0042, value=0
Digitizer: &usage=42, usage_page=ff0d
  usage = FF0D0044  data = 0
Digitizer: usage=FF0D0044, value=0
Digitizer: &usage=44, usage_page=ff0d
  usage = FF0D005A  data = 0
Digitizer: usage=FF0D005A, value=0
Digitizer: &usage=5A, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  1
       reportcount=2
       usage count=2
Input, total bits=2
  usage = FF0D0032  data = 0
Digitizer: usage=FF0D0032, value=0
Digitizer: &usage=32, usage_page=ff0d
  usage = FF0D0036  data = 0
Digitizer: usage=FF0D0036, value=0
Digitizer: &usage=36, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  15200
       reportcount=1
       usage count=1
Input, total bits=24
  usage = FF0D0130  data = 3859
Digitizer: usage=FF0D0130, value=3859
Digitizer: &usage=130, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  9500
       reportcount=1
       usage count=1
Input, total bits=24
  usage = FF0D0131  data = 5284
Digitizer: usage=FF0D0131, value=5284
Digitizer: &usage=131, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  4095
       reportcount=1
       usage count=1
Input, total bits=16
  usage = FF0D0030  data = 0
Digitizer: usage=FF0D0030, value=0
Digitizer: &usage=30, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  63
       reportcount=1
       usage count=1
Input, total bits=8
  usage = FF0D0132  data = 63
Digitizer: usage=FF0D0132, value=63
Digitizer: &usage=132, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  -2147483648
       max=  2147483647
       reportcount=2
       usage count=2
Input, total bits=64
  usage = FF0D005B  sdata = 0
Digitizer: usage=FF0D005B, value=0
Digitizer: &usage=5B, usage_page=ff0d
  usage = FF0D005C  sdata = 0
Digitizer: usage=FF0D005C, value=0
Digitizer: &usage=5C, usage_page=ff0d
begin, usage=FF0D0000
       type= 2
       min=  0
       max=  4095
       reportcount=1
       usage count=1
Input, total bits=16
  usage = FF0D0077  data = 0
Digitizer: usage=FF0D0077, value=0
Digitizer: &usage=77, usage_page=ff0d
As I See the usage page is 0xff0d instead of 0xff00 ... So looks like need to debug... As you mentioned in #522, can probably deduce a lot of this as it looks like it probably matches the linux driver...
 
@KurtE
Yep - mine is so old it doesn't follow the current conventions. Like you said the problem is in the usage page and the usage range:
Code:
	if (usage_page == 0xff00 && usage >= 100 && usage <= 0x108) {
		switch (usage) {
		  case 0x102:
			mouseX = value;
			break;
		  case 0x103:
			mouseY = value;
			break;
		  case 0x32: // Apple uses this for horizontal scroll
			wheelH = value;
			break;
		  case 0x38:
			wheel = value;
			break;
		}

Probably should be more like:
Code:
	if (usage_page == 0xff0D && usage >= 0 && usage <= 0x132) { //at least to start
		switch (usage) {
		  case 0x130:
			mouseX = value;
			break;
		  case 0x131:
			mouseY = value;
			break;
		  case 0x132: // Apple uses this for horizontal scroll
			wheelH = value;
			break;
		  case 0x138:
			wheel = value;
			break;
		}
Can't guarantee the values are in the right order - you have to play with that a little bit.
 
Back
Top