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

HID Ble Keyboard + LBS(button service) question

Hi All,

I'm new in developing BLE 4.0 device, now have a project is adding LBS(led button service) to a standard ble HID keyboard application in SDK 9.0, the reason why I need HID service is this is only way that the iOS can discover my BLE device in [setting] -> [Bluetooth], otherwise, a BLE device can only be dsicovered by the APP which works with it.

Now the problem is, I can connect my device in iOS [setting] -> [Bluetooth] and when press the button, the lbs function works(I send a button characteristic of read value of 1 when pressed and send 0 when button is released), so that the App on the iPhone side work as expected. But if I turn off the Bluetooth in iPhone and turn on again, it re-connects the device automatically, this looks good, but at the moment, the lbs service no longer works, App on the iPhone stops reacting when the button is pressed.

I'm sure the button is working because the LED toggled the status when button is pressed, just the function "ble_lbs_on_button_change" seems not working anymore. The only way to let it work again is in iPhone's Bluetooth setting, "forget" my device and connect again then everything backs to normal.

Can anyone tell me how to fix this? Anything I did wrong in my code? Any help will be appreciated.

Thanks,

Parents Reply Children
No Data
Related