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
  • 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 Leo,

    Thank you. Can you share the exact way you build it (either with the command if you build from the command line, or a screenshot showing your build configuration if you build from VS Code)?

  • Hi Leo,

    I see. Have you done any other changes? When I build the 2.1.3 project it fails to build during linking where it cannot find mcuboot_status_change() This is while using your custom board in the project folder(called nrf52840dk_nrf52840):

    [201/211] Linking C executable zephyr/zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
    : && ccache /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc   zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/Users/eith/Downloads/peripheral_ancs_client_2_1_3/build/mcuboot/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/lib/posix/liblib__posix.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/thumb/v7e-m+fp/hard"  -L/Users/eith/Downloads/peripheral_ancs_client_2_1_3/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfpu=fpv4-sp-d16  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  /opt/nordic/ncs/v2.1.3/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.15.a  /opt/nordic/ncs/v2.1.3/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cd /Users/eith/Downloads/peripheral_ancs_client_2_1_3/build/mcuboot/zephyr && /opt/nordic/ncs/toolchains/v2.1.3/Cellar/cmake/3.20.5/bin/cmake -E echo
    /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: app/libapp.a(main.c.obj): in function `main':
    /opt/nordic/ncs/v2.1.3/bootloader/mcuboot/boot/zephyr/main.c:545: undefined reference to `mcuboot_status_change'
    /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /opt/nordic/ncs/v2.1.3/bootloader/mcuboot/boot/zephyr/main.c:622: undefined reference to `mcuboot_status_change'
    /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /opt/nordic/ncs/v2.1.3/bootloader/mcuboot/boot/zephyr/main.c:636: undefined reference to `mcuboot_status_change'
    /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /opt/nordic/ncs/v2.1.3/bootloader/mcuboot/boot/zephyr/main.c:667: undefined reference to `mcuboot_status_change'
    /opt/nordic/ncs/toolchains/v2.1.3/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: app/libapp.a(loader.c.obj): in function `context_boot_go':
    /opt/nordic/ncs/v2.1.3/bootloader/mcuboot/boot/bootutil/src/loader.c:2112: undefined reference to `mcuboot_status_change'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    [235/298] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 
    cd /Users/eith/Downloads/peripheral_ancs_client_2_1_3/build/mcuboot && /opt/nordic/ncs/toolchains/v2.1.3/Cellar/cmake/3.20.5/bin/cmake --build . --
    [251/298] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/opt/nordic/ncs/v2.1.3/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.1.3/bin/cmake --build /Users/eith/Downloads/peripheral_ancs_client_2_1_3/build

    Can you see if you have done any changes to the SDK? And perhaps download a fresh 2.1.3 and build with that? I would like to be able to build both your project without any changes so that I know I am testing the same as you.

  • 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).

Reply
  • 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).

Children
Related