iOS BLE cannot correctly read the model number.

After updating from SDK V2.1.3 OTA to SDK V2.9.0, iOS cannot correctly read data such as the model number, but Android can read it normally.

Turn off Bluetooth in the system, turn it back on, and it can be read normally after connecting.

Parents Reply
  • Hi Leo,

    It seems like adding CONFIG_BT_GATT_ENFORCE_CHANGE_UNAWARE=y resolves the issue. Note that you also need to add the prototype for sc_restore_rsp() in gatt.c like this:

    diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c
    index 70d6b289f41..02b5059bd08 100644
    --- a/subsys/bluetooth/host/gatt.c
    +++ b/subsys/bluetooth/host/gatt.c
    @@ -264,6 +264,9 @@ BT_GATT_SERVICE_DEFINE(_2_gap_svc,
    #endif
    );
     
    +static void sc_restore_rsp(struct bt_conn *conn,
    +                          struct bt_gatt_indicate_params *params, uint8_t err);
    + 

    We need to look a bit more into this, but the idea here is to prevent any notifications/indications from being sent before the service changed indication.

Children
No Data
Related