This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HID Joystick profile odd behavior in nrf52832

Hello Nordic Team,

 Currently I'm working in a BLE HID Project (joystick with 16 buttons and 2 axis (x and y)) usign a NfR52832 and modifying the hid mouse example from SDK 16, but some things doesn’t work properly. Specifically my computer, Smartphone and Tablet can connect to my board and recognize it as joystick, however i can't navigate or control my Tablet or Smartphone with the buttons of the nRf52832 (nothing happen when i press a button)…

Previously i was working with BLE functionality of ESP32 and the report descriptor was working fine. With the ESP32 i was able to control the device to which I am connected. Besides, through this page (Gamepad Tester) i can see the actions from the user (buttons pressed, etc) only using the ESP32… the nrf52832 are not recognize for this page. Because of that, im not sure if my my report descriptor, hid_init or / and send data function is correct or i’m misunderstanding somethings. This are my hid_init and send data function.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define INPUT_REPORT_COUNT 1 /**< Number of input reports in this application. */
#define INPUT_REP_LEN 4 /**< Length of Joystick Input Report containing button (byte 2 and 3) and axis data (byte 0 and 1)*/
#define INPUT_REP_INDEX 0 / **< Index of Joystick Input Report containing buttons and axis data. */
#define INPUT_REP_REF_ID 1 /**< Id of reference to Joystick Input Report containing data. */
static void hids_init(void)
{
ret_code_t err_code;
ble_hids_init_t hids_init_obj;
ble_hids_inp_rep_init_t * p_input_report;
uint8_t hid_info_flags;
static ble_hids_inp_rep_init_t inp_rep_array[INPUT_REPORT_COUNT];
static uint8_t rep_map_data[] =
{
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x04, /* USAGE (Joystick) */
0xa1, 0x01, /* COLLECTION (Application) */
0xa1, 0x03, /* COLLECTION (Report) */
0x85, 0x01, /* REPORT_ID (1) */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Any idea what's going on here?, your help will be greatly appreciable.

Thanks in advance for your support.

Bests,
JuanCV.

Parents
  • Hello Kenneth,

    Using the nRF sniffer i realized  the board wasn't sending any package... after that, a deeper review  result in a problem  with my bsp_event_handler which i fix.... My nRF52 DK works as a joystick :). thanks for your advice.

Reply
  • Hello Kenneth,

    Using the nRF sniffer i realized  the board wasn't sending any package... after that, a deeper review  result in a problem  with my bsp_event_handler which i fix.... My nRF52 DK works as a joystick :). thanks for your advice.

Children
No Data