Hello Nordicsemi Dev community,
I have previously utilized the `zephyr/samples/bluetooth/peripheral_hr` example and flashed both app and net core with the respective (peripheral_hr) build image and (hci_rpmsg) subimage.
I was able to connect via linux machine bluetoothctl/blueZ cli and list the available characteristics and services. The console from the bluetooth firmware would output `<inf> connected` when the blueZ/bluetoothctl cli would establish a connection with the bluetooth module.
[00:40:10.397,277] <inf> vv_ble_peripheral: mtu is: 0x17 [00:40:13.041,961] <inf> vv_ble_peripheral: Disconnected (reason 0x13) [00:40:37.080,505] <inf> vv_ble_peripheral: Connected [00:40:37.080,505] <inf> vv_ble_peripheral: mtu is: 0x17 [00:40:37.708,343] <inf> vv_ble_peripheral: vv.notifications enabled
Now after building and flashing the peripheral_hr example, the bluetooth module outputs no `<inf> connected` event when the cli tries to connect. It almost seems the bluetooth stack is blocked. I have tried erasing the whole board and utilizing nrfjprog --recover and reflashing. This had the same results of no connected events.
The board has not been physically changed and two boards were tested on, both of which the peripheral_hr example worked before. Both boards had the same results.
The build and flash output of peripheral_hr example is below:
r0s3@a1y:~/Dev.local/nrf53_fwdev
$ ./remote_build.test.sh
local_dir_path: test
remote_container_name: molecule--vv-role-nrf-zephyr-dev
remote_project_path: /tmp/my_zephyr_app
lxc file push ${local_dir_path} molecule--vv-role-nrf-zephyr-dev/tmp/my_zephyr_app --recursive
Cloning into '/opt/nrf/bootloader/mcuboot'...
warning: redirecting to https://gitlab.com/vvsw/vv-zephyr-mcuboot.git/
remote: Enumerating objects: 754, done.
remote: Counting objects: 100% (754/754), done.
remote: Compressing objects: 100% (493/493), done.
remote: Total 754 (delta 225), reused 717 (delta 199), pack-reused 0
Receiving objects: 100% (754/754), 1.61 MiB | 8.78 MiB/s, done.
Resolving deltas: 100% (225/225), done.
Generating public/private rsa key pair.
Your identification has been saved in /opt/nrf/bootloader/mcuboot/vv.image.signing.key.
Your public key has been saved in /opt/nrf/bootloader/mcuboot/vv.image.signing.key.pub.
The key fingerprint is:
SHA256:GIUfn3T/rkX9Up/p1tB8pYEpID/wy4ndMP3caXxlzys root@molecule--vv-role-nrf-zephyr-dev
The key's randomart image is:
+---[RSA 2048]----+
| .. |
| +.o . . |
| .* * o + |
| oB = o o =|
| .+SB + o XB|
| . = . o Bo&|
| ..*B|
| E.=o|
| +o |
+----[SHA256]-----+
-- west build: generating a build system
Including boilerplate (Zephyr base): /opt/nrf/zephyr/cmake/app/boilerplate.cmake
-- Application: /tmp/my_zephyr_app
-- Zephyr version: 2.4.99 (/opt/nrf/zephyr)
-- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.9") found components: Interpreter
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf5340pdk_nrf5340_cpuapp
-- Cache files will be written to: /root/.cache/zephyr
CMake Warning at /opt/nrf/zephyr/cmake/host-tools.cmake:31 (message):
Could NOT find dtc: Found unsuitable version "1.4.5", but required is at
least "1.4.6" (found /usr/bin/dtc). Optional devicetree error checking
with dtc will not be performed.
Call Stack (most recent call first):
/opt/nrf/zephyr/cmake/app/boilerplate.cmake:487 (include)
/opt/nrf/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/opt/nrf/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:5 (find_package)
-- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /opt/nrf/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /tmp/my_zephyr_app/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /tmp/my_zephyr_app/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /opt/nrf/zephyr/Kconfig
Loaded configuration '/opt/nrf/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340pdk_nrf5340_cpuapp_defconfig'
Merged configuration '/tmp/my_zephyr_app/prj.conf'
Configuration saved to '/tmp/my_zephyr_app/build/zephyr/.config'
Kconfig header saved to '/tmp/my_zephyr_app/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
Adding 'hci_rpmsg' sample as child image since CONFIG_BT_RPMSG_NRF53 is set to 'y'
=== child image hci_rpmsg - CPUNET begin ===
Including boilerplate (Zephyr base): /opt/nrf/zephyr/cmake/app/boilerplate.cmake
-- Application: /opt/nrf/zephyr/samples/bluetooth/hci_rpmsg
-- Zephyr version: 2.4.99 (/opt/nrf/zephyr)
-- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.9") found components: Interpreter
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf5340pdk_nrf5340_cpunet
-- Cache files will be written to: /root/.cache/zephyr
CMake Warning at /opt/nrf/zephyr/cmake/host-tools.cmake:31 (message):
Could NOT find dtc: Found unsuitable version "1.4.5", but required is at
least "1.4.6" (found /usr/bin/dtc). Optional devicetree error checking
with dtc will not be performed.
Call Stack (most recent call first):
/opt/nrf/zephyr/cmake/app/boilerplate.cmake:487 (include)
/opt/nrf/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/opt/nrf/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:5 (find_package)
-- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /opt/nrf/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340pdk_nrf5340_cpunet.dts
-- Generated zephyr.dts: /tmp/my_zephyr_app/build/hci_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /tmp/my_zephyr_app/build/hci_rpmsg/zephyr/include/generated/devicetree_unfixed.h
Parsing /opt/nrf/zephyr/Kconfig
Loaded configuration '/opt/nrf/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340pdk_nrf5340_cpunet_defconfig'
Merged configuration '/opt/nrf/zephyr/samples/bluetooth/hci_rpmsg/prj.conf'
Configuration saved to '/tmp/my_zephyr_app/build/hci_rpmsg/zephyr/.config'
Kconfig header saved to '/tmp/my_zephyr_app/build/hci_rpmsg/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
-- Build type:
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
CMake Warning at ../../../CMakeLists.txt:1354 (message):
WARNING: The board 'nrf5340pdk_nrf5340_cpunet' is deprecated and will be
removed in version v2.6.0
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/my_zephyr_app/build/hci_rpmsg
=== child image hci_rpmsg - CPUNET end ===
-- Build type:
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- Looking for include file stdatomic.h
-- Looking for include file stdatomic.h - found
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- C_FLAGS : -Wall -Wextra
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
CMake Warning at /opt/nrf/zephyr/CMakeLists.txt:1354 (message):
WARNING: The board 'nrf5340pdk_nrf5340_cpuapp' is deprecated and will be
removed in version v2.6.0
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/my_zephyr_app/build
-- west build: building application
[1/223] Preparing syscall dependency handling
[7/223] Performing build step for 'hci_rpmsg_subimage'
[1/206] Preparing syscall dependency handling
[199/206] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region Used Size Region Size %age Used
FLASH: 163648 B 256 KB 62.43%
SRAM: 43020 B 64 KB 65.64%
IDT_LIST: 168 B 2 KB 8.20%
[206/206] Generating zephyr/merged_CPUNET.hex
[213/223] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region Used Size Region Size %age Used
FLASH: 88412 B 1 MB 8.43%
SRAM: 23748 B 448 KB 5.18%
IDT_LIST: 88 B 2 KB 4.30%
[223/223] Generating zephyr/merged_domains.hex
-- west flash: rebuilding
[0/4] Performing build step for 'hci_rpmsg_subimage'
ninja: no work to do.
[1/2] cd /tmp/my_zephyr_app/build/zephyr/cmake/flash && /usr/local/bin/cmake -E echo
-- west flash: using runner nrfjprog
Using board 960184437
-- runners.nrfjprog: Flashing file: /tmp/my_zephyr_app/build/zephyr/merged_domains.hex
-- runners.nrfjprog: Generating CP_NETWORK hex file /tmp/my_zephyr_app/build/zephyr/GENERATED_CP_NETWORK_merged_domains.hex
-- runners.nrfjprog: Generating CP_APPLICATION hex file /tmp/my_zephyr_app/build/zephyr/GENERATED_CP_APPLICATION_merged_domains.hex
Parsing hex file.
Erasing page at address 0x1000000.
Erasing page at address 0x1000800.
Erasing page at address 0x1001000.
Erasing page at address 0x1001800.
Erasing page at address 0x1002000.
Erasing page at address 0x1002800.
Erasing page at address 0x1003000.
Erasing page at address 0x1003800.
Erasing page at address 0x1004000.
Erasing page at address 0x1004800.
Erasing page at address 0x1005000.
Erasing page at address 0x1005800.
Erasing page at address 0x1006000.
Erasing page at address 0x1006800.
Erasing page at address 0x1007000.
Erasing page at address 0x1007800.
Erasing page at address 0x1008000.
Erasing page at address 0x1008800.
Erasing page at address 0x1009000.
Erasing page at address 0x1009800.
Erasing page at address 0x100A000.
Erasing page at address 0x100A800.
Erasing page at address 0x100B000.
Erasing page at address 0x100B800.
Erasing page at address 0x100C000.
Erasing page at address 0x100C800.
Erasing page at address 0x100D000.
Erasing page at address 0x100D800.
Erasing page at address 0x100E000.
Erasing page at address 0x100E800.
Erasing page at address 0x100F000.
Erasing page at address 0x100F800.
Erasing page at address 0x1010000.
Erasing page at address 0x1010800.
Erasing page at address 0x1011000.
Erasing page at address 0x1011800.
Erasing page at address 0x1012000.
Erasing page at address 0x1012800.
Erasing page at address 0x1013000.
Erasing page at address 0x1013800.
Erasing page at address 0x1014000.
Erasing page at address 0x1014800.
Erasing page at address 0x1015000.
Erasing page at address 0x1015800.
Erasing page at address 0x1016000.
Erasing page at address 0x1016800.
Erasing page at address 0x1017000.
Erasing page at address 0x1017800.
Erasing page at address 0x1018000.
Erasing page at address 0x1018800.
Erasing page at address 0x1019000.
Erasing page at address 0x1019800.
Erasing page at address 0x101A000.
Erasing page at address 0x101A800.
Erasing page at address 0x101B000.
Erasing page at address 0x101B800.
Erasing page at address 0x101C000.
Erasing page at address 0x101C800.
Erasing page at address 0x101D000.
Erasing page at address 0x101D800.
Erasing page at address 0x101E000.
Erasing page at address 0x101E800.
Erasing page at address 0x101F000.
Erasing page at address 0x101F800.
Erasing page at address 0x1020000.
Erasing page at address 0x1020800.
Erasing page at address 0x1021000.
Erasing page at address 0x1021800.
Erasing page at address 0x1022000.
Erasing page at address 0x1022800.
Erasing page at address 0x1023000.
Erasing page at address 0x1023800.
Erasing page at address 0x1024000.
Erasing page at address 0x1024800.
Erasing page at address 0x1025000.
Erasing page at address 0x1025800.
Erasing page at address 0x1026000.
Erasing page at address 0x1026800.
Erasing page at address 0x1027000.
Erasing page at address 0x1027800.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Parsing hex file.
Erasing page at address 0x0.
Erasing page at address 0x1000.
Erasing page at address 0x2000.
Erasing page at address 0x3000.
Erasing page at address 0x4000.
Erasing page at address 0x5000.
Erasing page at address 0x6000.
Erasing page at address 0x7000.
Erasing page at address 0x8000.
Erasing page at address 0x9000.
Erasing page at address 0xA000.
Erasing page at address 0xB000.
Erasing page at address 0xC000.
Erasing page at address 0xD000.
Erasing page at address 0xE000.
Erasing page at address 0xF000.
Erasing page at address 0x10000.
Erasing page at address 0x11000.
Erasing page at address 0x12000.
Erasing page at address 0x13000.
Erasing page at address 0x14000.
Erasing page at address 0x15000.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
Applying pin reset.
-- runners.nrfjprog: Board with serial number 960184437 flashed successfully.
The console output of appcore of peripheral_hr example: (There is no connected events when I try to connect via blueZ like previously)
*** Booting Zephyr OS build v2.4.0-ncs1-2616-g3420cde0e37b *** Bluetooth initialized Advertising successfully started [00:00:00.398,620] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) [00:00:00.398,651] <inf> bt_hci_core: HW Variant: nRF53x (0x0003) [00:00:00.398,651] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 122.465 [00:00:00.401,672] <wrn> bt_hci_core: ECC HCI commands not available [00:00:00.401,794] <inf> bt_hci_core: Identity: F6:80:24:F1:50:D0 (random) [00:00:00.401,794] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x2154, manufacturer 0x0059 [00:00:00.401,794] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x2154 *** Booting Zephyr OS build v2.4.0-ncs1-2616-g3420cde0e37b *** Bluetooth initialized Advertising successfully started [00:00:00.414,550] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002) [00:00:00.414,581] <inf> bt_hci_core: HW Variant: nRF53x (0x0003) [00:00:00.414,581] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 122.465 [00:00:00.417,602] <wrn> bt_hci_core: ECC HCI commands not available [00:00:00.417,724] <inf> bt_hci_core: Identity: F6:80:24:F1:50:D0 (random) [00:00:00.417,755] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x2154, manufacturer 0x0059 [00:00:00.417,755] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x2154
The console output of netcore of peripheral_hr subimage hci_rpmsg example:
*** Booting Zephyr OS build v2.4.0-ncs1-2616-g3420cde0e37b ***
[00:00:00.005,981] <inf> sdc_hci_driver: SoftDevice Controller build revision:
7a 01 b4 17 68 14 99 b6 6a d1 f2 fd fe 59 63 e3 |z...h....
43 ca fb 5c |C..\
--- 27 messages dropped ---
[00:00:00.020,507] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.020,568] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.021,179] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.021,240] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.021,972] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.022,003] <inf> hci_rpmsg: Received message of 8 bytes.
[00:00:00.022,644] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.022,705] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.023,437] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.023,498] <inf> hci_rpmsg: Received message of 12 bytes.
[00:00:00.024,139] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.024,200] <inf> hci_rpmsg: Received message of 12 bytes.
[00:00:00.024,932] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.024,963] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.025,634] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.025,695] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.026,428] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.026,489] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.027,130] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.027,191] <inf> hci_rpmsg: Received message of 4 bytes.
[00:00:00.027,954] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.027,984] <inf> hci_rpmsg: Received message of 10 bytes.
[00:00:00.030,731] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.030,792] <inf> hci_rpmsg: Received message of 19 bytes.
[00:00:00.031,555] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.031,616] <inf> hci_rpmsg: Received message of 36 bytes.
[00:00:00.032,257] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.032,287] <inf> hci_rpmsg: Received message of 36 bytes.
[00:00:00.033,020] <inf> hci_rpmsg: Got callback of id 0
[00:00:00.033,050] <inf> hci_rpmsg: Received message of 5 bytes.
Output of bluetoothctl: ( states that it connected successfully, but after a moment it says not connected with authentication cancellation. the strange part is that there is no output or any event info on the nrf bluetooth side)
[bluetooth]# scan on Discovery started [NEW] Device F6:80:24:F1:50:D0 Zephyr Heartrate Sensor [CHG] Device 68:64:4B:39:70:E6 RSSI: -85 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [NEW] Device 40:AC:45:1E:56:14 40-AC-45-1E-56-14 [CHG] Device F6:80:24:F1:50:D0 RSSI: -49 [CHG] Device 68:64:4B:39:70:E6 RSSI: -85 [CHG] Device 40:AC:45:1E:56:14 RSSI: -74 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [CHG] Device 40:AC:45:1E:56:14 RSSI: -73 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [CHG] Device 68:64:4B:39:70:E6 RSSI: -88 [CHG] Device 40:AC:45:1E:56:14 RSSI: -74 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [CHG] Device 40:AC:45:1E:56:14 RSSI: -75 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [CHG] Device 68:64:4B:39:70:E6 RSSI: -85 [CHG] Device 40:AC:45:1E:56:14 RSSI: -76 [CHG] Device F6:80:24:F1:50:D0 RSSI: -48 [bluetooth]# scan off Discovery stopped [bluetooth]# pair F6:80:24:F1:50:D0 Attempting to pair with F6:80:24:F1:50:D0 [CHG] Device F6:80:24:F1:50:D0 Connected: yes [CHG] Device F6:80:24:F1:50:D0 Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled [bluetooth]# pair F6:80:24:F1:50:D0 Attempting to pair with F6:80:24:F1:50:D0 [CHG] Device F6:80:24:F1:50:D0 Connected: yes [CHG] Device F6:80:24:F1:50:D0 Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled
I have attached the source and build directory for the peripheral_hr example being utilized.
8203.peripheral_hr_built.tar.gz
Thank you for your support,
Hogyun


