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

Bluetooth split stack issues with nRF91 and nRF52 in NCS

Hi,

I am trying to build a simple example that will run nRF91 as BLE host and nRF52 as BLE controller in the latest stable NCS 1.4 and nRF9160DK 0.8.2. However, I have encountered two issues.

My sample for nRF91 won't communicate with HCI UART driver flashed to nRF52840 on nRF9160DK.

This is what I get from the log.

00> *** Booting Zephyr OS build v2.4.0-ncs1-5-g1664f186a309  ***
00> 
00> [00:00:00.000,274] <inf> main: Bluetooth trying to init
00> [00:00:00.002,868] <inf> fs_nvs: 2 Sectors of 4096 bytes
00> [00:00:00.003,143] <inf> fs_nvs: alloc wra: 0, ff0
00> [00:00:00.003,387] <inf> fs_nvs: data wra: 0, 0
00> [00:00:00.610,656] <wrn> bt_hci_core: OpCode 0x0000 completed instead of expected 0x0c03
00> [00:00:00.611,053] <wrn> bt_hci_core: opcode 0x0c03 status 0xc0
00> [00:00:00.611,358] <err> main: Bluetooth init failed (err -5)

Steps to reproduce:

  1. Build HCI UART from ncs/zephyr/samples/bluetooth/hci_uart and flash it to nRF52840 on nRF9160DK
  2. Build my sample code from https://github.com/lukasbrchl/nrf91_bluetooth_host and flash it to nRF9160 on nRF9160DK
  3. Restart DK and observe the error

The weird thing is that when I use the prebuilt hci_uart.hex file from this thread. Then it works without any problem. Even when I try to build and flash the LTE BLE Gateway sample, then it also initializes Bluetooth without problems.

Bluetooth MAC address is not kept static after reset in the split stack

Steps to reproduce:

  1. Flash the prebuilt hci_uart.hex file from this thread to nRF52840 on nRF9160DK
  2. Build my sample code from https://github.com/lukasbrchl/nrf91_bluetooth_host and flash it to nRF9160 on nRF9160DK
  3. Observe in nRF Connect on a mobile phone that MAC address changes on each restart.

It was already discussed in this thread. Since I cannot get working the hci_uart sample (first issue) I cannot experiment in adding additional settings/configs. 

Please let me know your thoughts.

Parents Reply
  • Hello Simon,

    BT_LE_ADV_OPT_USE_IDENTITY does nothing. You can try it yourself by replacing line 77 by

    struct bt_le_adv_param *adv_param =	BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_USE_IDENTITY,
    			BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL);
    
    err = bt_le_adv_start(adv_param, ad, ARRAY_SIZE(ad), NULL, 0);

    As I said in the beginning, I don't understand the stack. However, I think it's "too late" to set something in the advertisement options. From my point of view, there must be something messed up in the stack when settngs_load() is called. Could someone from your team inspect it, please?

Children
Related