How can I display the Bluetooth HID Mouse Battery Level Status Icon next to device name in Mac OS Bluetooth Preferences list?

System Details:

  • Chip: nRF52840
  • nRF5 SDK: Version 16.0.0
  • mdk version: 8.46.0
  • nrfjprog version: 10.15.4 external
  • nrfutil version: 6.1.3
  • JLinkARM.dll version: 7.64d

Hello,

I have a working nRF52840 custom device that supports the HID Mouse service via BLE and it is working great so far. As part of the nRF HID implementation, our code also support BAS. I want to view my custom device's battery level in my Macbook Pro's Bluetooth Preferences Drop-Down Menu, which lists all my connected BLE devices. In this Drop-Down menu, I can not only see my devices, but I can conveniently view the battery level status icon next to the device name. This gives a quick, high-level battery status update to the user.

Part of me was hoping that setting up the BAS service would simply do the trick, but sadly that is not the case. I tried searching around online for this topic, but had a hard time finding anything specific. What else do I need to set up in my firmware to enable this battery level status icon to appear next to my device's name in my Bluetooth menu? Is this possible? I am happy to share any code if it helps

Thank you for your time & help,
Corten

  • Hello,

    I can't seem to get the battery level indicator either when I connect my Logitech mouse, but does show if I click on the Bluetooth icon in the menu bar:

    Do you see the same?

    Best regards,

    Vidar

    Edit: To clarify, macOS did not display the battery level for my logitech mouse in Bluetooth preferences either. It did however display it in the dropdown menu when I selected the bluetooth icon from the menubar. So I think this indicates that the battery level can't be displayed in Bluetooth preferences. Though I haven't found anything in the Apple documentation to confirm this.


  • In this photo that I am sharing, you can see my store-bought M720 Bluetooth Mouse and its battery level. The custom device I am working on is named "TL_Dev" and although we have an active and otherwise functional connection, it wont display the battery level.

  • It worked for me when I tried the original ble_app_hids_mouse example in SDK 16.0.0 which enables the Battery service by default.

    Could you try to connect to your device from the nRF connect app on Android or iOS, then subscribe to battery level notifications to verify that it works?

  • Hi Vidar,

    Sorry for the delayed response. I can connect to my device via the iOS nRF Connect app and I can successfully Subscribe to the Battery Level Notifications. While keeping an eye on this subscription, I verified that it does appear to be reporting the correct battery percentages. So from this standpoint, everything seems to be working as expected (minus the battery icon in the Bluetooth dropdown menu).

    As a next step, I will try and verify the original SDK example works on my end and with my DK. I can report back to you my findings, but am also curious if you have any other ideas I could try.

    Many thanks

    cor10

  • Hi,

    No worries. Unfortunately, there is not much else I can think of except for trying to compare differences between your implementation and the one in the SDK (assuming battery reporting works when you try our HID example).

Related