Hey!
I'm trying to wrap my head over Hid descriptor's in this particular case i have implemented Hid over Gatt profile which is correctly interpreted as "Input device" by my android devices so that part should be fine.
theres something i have pulled together from multiple sources and USB-HID documentation, sadly Android seems to read it completely differently than what i expect, most of the strokes i send will alter the volume of my devices.
i do send two byte reports ie. 0x02, 0x01 for Play/Pause, which works as expected, rest of the commands not so much as they might do what is expected or not, but at the same time alter the volume aswell.
0x05, 0x0C, // Usage Page (Consumer) 0x09, 0x01, // Usage (Consumer Control) 0xA1, 0x01, // Collection (Application) 0x85, 0x02, // Report ID (2) 0x15, 0x00, // Logical Minimum (0) 0x25, 0x01, // Logical Maximum (1) 0x75, 0x01, // Report Size (1) 0x95, 0x01, // Report Count (1) 0x09, 0xCD, // Usage (Play/Pause) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xE2, // Usage (Mute) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xB5, // Usage (Scan Next Track) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xB6, // Usage (Scan Previous Track) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xEA, // Usage (Volume Decrement) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xE9, // Usage (Volume Increment) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xB3, // Usage (Fast Forward) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0x09, 0xB4, // Usage (Rewind) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0xC0
Maybe someone here can tell what i'm doing wrong.
EDIT::
this map is working one, but missing rewind and fast forward which i need (shamelessly copied from silabs examples for my BLE112 module)
// CONSUMER PAGE /****/ 0x05, 0x0c, /* USAGE_PAGE (Consumer) */ /****/ 0x09, 0x01, /* USAGE (Consumer Control) */ /****/ 0xa1, 0x01, /* COLLECTION (Application) */ /******/ 0x85, 0x02, /* Report ID 2 */ /******/ 0x05, 0x0c, /* USAGE_PAGE (Consumer) */ /* 8 media player related keys */ /******/ 0x15, 0x00, /* Logical Min 0 */ /******/ 0x25, 0x01, /* Logical Max 1 */ /******/ 0x09, 0xe9, /* Usage (8-bit), Volume Increment */ /******/ 0x09, 0xea, /* Usage (8-bit), Volume Decrement */ /******/ 0x09, 0xe2, /* Usage (8-bit), Mute */ /******/ 0x09, 0xcd, /* Usage (8-bit), Play/Pause */ /******/ 0x19, 0xb5, /* Usage Min (Scan Next Track, Scan Previous Track, Stop, Eject) */ /******/ 0x29, 0xb8, /* Usage Max */ /******/ 0x75, 0x01, /* Report Size */ /******/ 0x95, 0x08, /* Report Count */ /******/ 0x81, 0x02, /* Input type 2 */ /******/ 0xc0, /* End Collection */