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

about service change can't receive BLE_GATTS_EVT_WRITE

nrf52832     SDK14.2       s132_nrf52_5.0.0_softdevice     PCA10040       ble_app_hids_keyboard  

I modify the project : 

two  service :  one  is   hid   another  is  different  hid_1 

press button 2  init  hid

presss button 3  init  hid_1

connect  the  android  phone , press button2   reset ,and ,init  hid;  press button3   reset  ,and, init  hid_1, reconnect  the phone,

turn  off and on the bluetooth(android  phone),but I can‘t receive   BLE_GATTS_EVT_WRITE(gcm_ble_evt_handler),  I  enable  the  NRF_SDH_BLE_SERVICE_CHANGED

I  can’t  know the reason,  but  SDK15.2   it  succeed,  why?   How  can  i do?

Parents
  • Hi

    I was able to build your project, and have tested it on a few phones now. An iPhone6. an old MotorOla running Android 7, and a Xiaomi mi6 running Android 9. I was not able to reproduce the error you're describing though. I connected to it, switched from FI to DI mode and DI to FI mode using buttons 2 and 3 without any issues. Are there any instructions as to how I can reproduce this error reliably?

    And again, the fact that you have made changes to the files within the SDK might be the reason that it won't work in SDK 14.2 for you. You could try downloading a "fresh" SDK14.2 and build your project there to see if that solves your issue.

    Best regards,

    Simon

  •  The operation is as follows:

    1  Firstly,   Fi  mode  that   the hid descriptors just has keyboard connect to the  android phone. It  can typewrite ‘’hello‘’ through  button 1.

    2  Then directly  press button 2 ,the mode  change into Di mode that the hid descriptors has keyboard and mouse. The android phone will reconnect to the PCA10040 automatically. It can typewrite  ‘’capson‘’through  button 1.

    3 Importantly,  Then  turn off  and  on  the android phone's bluetooth. The android phone will also  reconnect to the PCA10040 automatically,but at this  time  it can't  typewrite.

    Additionally,

    Although I make changes  within  the SDK library/component files, it donsn't  matter and  has nothing to do with  the question.

    Thank you!  I expect your reply!

Reply
  •  The operation is as follows:

    1  Firstly,   Fi  mode  that   the hid descriptors just has keyboard connect to the  android phone. It  can typewrite ‘’hello‘’ through  button 1.

    2  Then directly  press button 2 ,the mode  change into Di mode that the hid descriptors has keyboard and mouse. The android phone will reconnect to the PCA10040 automatically. It can typewrite  ‘’capson‘’through  button 1.

    3 Importantly,  Then  turn off  and  on  the android phone's bluetooth. The android phone will also  reconnect to the PCA10040 automatically,but at this  time  it can't  typewrite.

    Additionally,

    Although I make changes  within  the SDK library/component files, it donsn't  matter and  has nothing to do with  the question.

    Thank you!  I expect your reply!

Children
No Data
Related