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.
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.
Hi Leo
Thank you for your patience here. We don't have a specific theory of what is happening here I'm afraid. With the nRF Sniffer for BLE (https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-6-bluetooth-le-sniffer/topic/nrf-sniffer-for-bluetooth-le/) for example, you can select sniffing the address and operations of a specific device, so it should be possible to capture the communication of one specific device even in a busy environment. I think that would help us a lot.
For the information you shared, I haven't found anything obviously wrong with it yet, but I'm not done reviewing it. I will get back to you later this week with more information.
Best regards,
Simon
Hi Simonr,
I used this method to capture packets, but it's still difficult to capture all of them.
ancs_client_sdk_v2.1.3_to_v2.9.0.pcapng
Best regards,
Leo Mo
Hi Einar,
Can you see this file?
boards\arm\nrf52840dk_nrf52840\mcuboot_hook.c
Make sure you used custom nrf52840dk_nrf52840 board.

Hi,
I am able to test and I reproduce the issue. I have not been able to find the root cause or resolve it, but will look into this again after the holidays. I apologize for the delay.
PS: That "custom" radio button only affect the list in nRF Connect for VS Code, the build command refers to the board by name. So using the same name for two boards can cause problems. I did remove the dk files from the SDK but still had build problems, so that is why I wonder if there are other changes. I did make the 2.1.3 project build by setting CONFIG_MCUBOOT_ACTION_HOOKS=n, as it is anyway an empty implementation. As I reproduce the issue now I will ignore i, but as a side noe, I strongly recommend naming your custom board differently as having multiple boards with the same name is not supported (if you migrate to SDK 3.0 or higher later you will need to migrate to hardware model 2, where you anyway need to rename the board).
Hi Einar,
I'm glad to hear this news.
This 'CONFIG_MCUBOOT_ACTION_HOOKS' can indeed be set to 'n'.
As for the board names, I just used NRF52840DK here; the others are the actual names of our boards.
BR,
Leo Mo
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.
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.