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

Problems adding Bluetooth LE support to Azure IoT hub sample.

I'm using the Azure Iot hub example a base for a new project I'm working on.

I've copied the example into its own folder, and can run it and connect my Azure IoT hub.

So far so good.

Next I want to add bluetooth support to this project, so that I can send Bluetooth LE sensor data to the hub.

I've had a look into the LTE gateway example, and copied the CONFIG_BT stuff into my own prj.conf file.

Initially I had problems with the HCI driver, but that seems to be resolved.

When I run my program I get an error at runtime:

ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:307
k_sem_take failed with err -11
[00:00:12.785,217] [1;31m<err> os: r0/a1: 0x00000003 r1/a2: 0x00000000 r2/a3: 0x00000001[0m
[00:00:12.785,247] [1;31m<err> os: r3/a4: 0x00012e8d r12/ip: 0x00001000 r14/lr: 0x00015e7d[0m
[00:00:12.785,247] [1;31m<err> os: xpsr: 0x41000000[0m
[00:00:12.785,247] [1;31m<err> os: Faulting instruction address (r15/pc): 0x00015e88[0m
[00:00:12.785,247] [1;31m<err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0[0m
[00:00:12.785,247] [1;31m<err> os: Current thread: 0x20015600 (unknown)[0m

(This also happens if I comment out all the Azure / LTE init code from the example)

Here's the configuration I've added or modified

CONFIG_LOG_DEFAULT_LEVEL=4

CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_MAIN_STACK_SIZE=8192

CONFIG_BT=y
CONFIG_BT_HCI=y
CONFIG_BT_H4=y
CONFIG_BT_WAIT_NOP=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_DM=y
CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_FILTER_ENABLE=y
CONFIG_BT_SCAN_UUID_CNT=1

CONFIG_BT_DEBUG_HCI_CORE=y
CONFIG_BT_DEBUG_HCI_DRIVER=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_UART_INTERRUPT_DRIVEN=y

Parents Reply Children
  • Hi,

    HenningNT said:
    I re-installed the SDK / toolchain, and flashed the hci to nRF52840, and loaded the lte gateway example.

    Did you use an unmodified version of the LTE Gateway sample? Can you try to run nrfjprog --eraseall on both the nRF9160 SiP and the nRF52840 SoC before programming? 

    HenningNT said:
    Right now I can't even load the hci sample project in Segger...

     Are you still unable to load the sample in SES? Are you getting any log or errors in SES?

    Best regards,

    Marte

Related