Connect BLE HID mouse to mobile phone or tablet

Hi,

I've developed an application based on your BLE HID mouse sample. I commented out display and keyboard authentication callbacks so no passkey is showed nor confirmation is requested.

In a PC works OK, but with Android or IOS mobile phone or tablet, can't connect.

In Android it says "The device could not be paired because the access key or PIN is incorrect." and in IOS it says something like "It was not possible to connect, please ensure that the device is turned on and within range."

Is there any further step to connect to a mobile device? What am I doing wrong?

Thanks and kind regards,

Pedro.

Parents Reply Children
  • Ok thank you.

    Check out this guide from DevAcademy:

    https://academy.nordicsemi.com/topic/blefund-lesson-5-exercise-2/

    Looks like you can use bt_unpair().

    In this example it unpair all devices. 

    Is there any example where unpair only the oldest paired device? I'm not sure how to know the info about all devices stores, and the age of them.

    Thanks again! 

  • Hi Edvin,

    I found the solution. With Zephyr is much simpler. Just add 

    CONFIG_BT_KEYS_OVERWRITE_OLDEST=y

    in prj.conf.

    I normally find difficult to find answers with Zephyr to simple problems like this.

    What learning resources do you recommend for Nordic BLE from zero to expert, with Zephyr? Or to easy find answers?

    Your courses are very good stating point, but what after that?

    Thanks again!

  • Glad you found a config that is working!

    Pedro said:

    I normally find difficult to find answers with Zephyr to simple problems like this.

    What learning resources do you recommend for Nordic BLE from zero to expert, with Zephyr? Or to easy find answers?

    That is a good question. It is a bit difficult to navigate in the NCS, as it is very general, and not a BLE specific, or even Nordic specific SDK. 

    For BLE, I recommend the BLE course. The NCS Fundamentals course is also good for basic knowledge about NCS, and how Zephyr works. After that, I would say that the documentation would be the next place to look. A lot of stuff is very well described here. The difficult part is knowing exactly what to look for. 

    The KConfig Reference may also be a good starting point if you are looking for configs for a specific thing. You can start typing, and it will show you all results. If you are using VS Code, you can also start typing a config in prj.conf, and it will show a lot of suggestions. This one I find quite useful, and I use it a lot. As you can see, it is quite forgiving, showing the CONFIG_BT_KEYS_OVERWRITE_OLDEST, even though I started typing something and skipped the "KEYS", so as long as you have a few keywords, it is quite easy to see if there are any matching configs:

    Best regards,

    Edvin

  • Ok thank you for your tips Edvin!

    Best regards,

    Pedro.

Related