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

Error 133 (0x85): GATT ERROR with custom service tutorial

Hello,

I am new to the Nordic Environment. I am following the excellent tutorial to create a custom service and characteristic.

Everything worked fine until Step 6(Handling the Write event from soft device). 

However, after working on Step 7 & 8(Propagating Custom Service Events to Application and Notifying the Custom Value Characteristic), I get Error 133: GATT ERROR on the nRF Connect app (on a One Plus 5) when I try to connect to the advertised label. 

I have read the other posts related to this issue but can't my sense of them with respect to my case.  What could be the reason for sudden occurrence of this error?

Please help.

Thanks

Parents
  • Well, if p_cus->evt_handler no longer points to on_cus_evt, then the ble_cus_t m_cus struct must be altered somewhere in the code. Does the BLE_CUS_DEF macro look like this

    #define BLE_CUS_DEF(_name)                                                                          \
    static ble_cus_t _name;                                                                             \
    NRF_SDH_BLE_OBSERVER(_name ## _obs,                                                                 \
                         BLE_HRS_BLE_OBSERVER_PRIO,                                                     \
                         ble_cus_on_ble_evt, &_name)
    

    Just want to check if the struct is decleared as static. 

    Also could you post a screenshot of the local variables when you break at  p_cus->evt_handler(p_cus, &evt); in on_connect(ble_cus_t * p_cus, ble_evt_t const * p_ble_evt) ? Like this 

    I would add p_cus to watch and then see if the evt_handler field changes after ble_cus_init()

  • This is the screenshot of the local variables when you break at  p_cus->evt_handler(p_cus, &evt); in on_connect(ble_cus_t * p_cus, ble_evt_t const * p_ble_evt)

Reply Children
No Data
Related