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

About ble_app_hids_mouse consumer function

Based on nRF51822\Board\nrf6310\ble\ble_app_hids_mouse example, Used hid consumer page function, like play/pause or volume+ or volume- ...etc function,

In nRF51822 device with PC (windows 8 OS) connected, Before this media function it working, After power off nRF51822 device and repower on device, hid media function it has gone ! I need remove from PC device list and connect again, media function just can working. how can i fixd it ?

  • Hi Marschen,

    Is it only the consumer page HID reports that cannot be sent, or does this apply to all data? If it applies to everything: have you tried connection the ble_app_hids_mouse example to the Master Emulator? Unless you have a Bluetooth sniffer at hand, that is the easiest way to see if the data is actually being sent from the nRF51822 to the Central side.

    A number of things can cause this situation, determining if the data is actually sent will help narrow down the possibilities. For example, if the bonding keys or system attributes aren't properly stored to flash (see ble_bondmngr SDK component) they will be lost when nRF51822 is powered down. If they are lost, Win8 will connect, but the link cannot be encrypted and data is not sent.

  • Yes it is only the consumer page HID reports that cannot be sent, I tried other HID report it is can be sent, Example HID mouse cursor (x, y) or z wheel or tilt wheel or button... etc.

    In nRF51822 device with PC (windows 8 OS) connected, Before all HID function is working, After power off nRF51822 device and wait few second repower on device, On the PC all HID function is useful, except media function !

    Nodic_Mouse_Media.txt

  • Sorry for the late answer.

    Do you have a BLE sniffer, or a Master Emulator you can try connecting to? That would allow you to see if the consumer page HID reports are actually being sent or if the Host is ignoring them.

    Assuming that the reports are not being sent: The Host will enable notifications, in this case the Input/Output reports, once during the initial pairing connection. If the system state isn't saved by the nRF51 application before shutdown, when reconnecting the system state will be lost and the nRF51 won't send any data to the Host. In the SDK examples the bondmanager component handles storing the system state (sys_attr). Try increasing the BLE_BONDMNGR_CCCD_COUNT define in ble_bondmngr_cfg.h, just in case the bond manager thinks the system state is smaller than it actually is.

Related