Hello everybody,
I'm getting crazy, I'm trying to extend HID axis values from 0..255 to 0..1023 max using the descriptor found in the example ble_HID_keboard/hid_joystick.xml without success.
The following is the modified HID Descriptor
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x09, 0x04, // Usage (Joystick)
0xA1, 0x01, // Collection (Application)
0x85, 0x01, // Report ID (1)
0xA1, 0x02, // Collection (Logical)
0x09, 0x32, // Usage (Z)
0x09, 0x31, // Usage (Y)
0x09, 0x30, // Usage (X)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x03, // Logical Maximum (1023)
0x35, 0x00, // Physical Minimum (0)
0x46, 0xFF, 0x03, // Physical Maximum (1023)
0x75, 0x0A, // Report Size (10)
0x95, 0x03, // Report Count (3)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0, // End Collection
0x85, 0x02, // Report ID (2)
0xA1, 0x02, // Collection (Logical)
0x05, 0x09, // Usage Page (Button)
0x29, 0x02, // Usage Maximum (0x02)
0x19, 0x01, // Usage Minimum (0x01)
0x95, 0x02, // Report Count (2)
0x75, 0x01, // Report Size (1)
0x25, 0x01, // Logical Maximum (1)
0x15, 0x00, // Logical Minimum (0)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x95, 0x01, // Report Count (1)
0x75, 0x06, // Report Size (6)
0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)
0xC0, // End Collection
0xC0, // End Collection
// 61 bytes
That means each axis takes 10 bits for a total report size of 30bits (4bytes).
using nRFgo Studio I've edit and exported service.h header file to use in my arduino code. Since I want to send 30 bits I used the following code (i.e, the report byte representation):
uint8_t joy[4] = {0, 0, 0, 0};
lib_aci_send_data(PIPE_HID_SERVICE_HID_REPORT_ID1_TX, &joy[0], 4);
but when i tried to pair the nrf8001 with my Win8.1 laptop i got "Error Driver Occured" with the following message (Arduino Serial Monitor):
ACI Command F
Evt Cmd respone: Status 83
Any hints? I've lost all the day trying to find a solution but I cannot see the light.
Thanks in advance!