Hi,
I am using NCS v1.3.0 for nRF9160. How to enable both scanner and advertiser roles simultaneously?
Currently even I enable both, HCI LE set random address failing with command disallowed error.
Hi,
I am using NCS v1.3.0 for nRF9160. How to enable both scanner and advertiser roles simultaneously?
Currently even I enable both, HCI LE set random address failing with command disallowed error.
Hi,
Please take a look at the sample ncs\zephyr\samples\bluetooth\scan_adv and use that as reference.
I have loaded hci_uart into nrf9160dk_nrf52840.
I have added below in ncs\zephyr\samples\bluetooth\scan_adv
1. child_secure_partition_manager.conf
CONFIG_SPM_NRF_UARTE2_NS=y
2. nrf9160dk_nrf9160ns.overlay
/ { chosen { zephyr,bt-uart=&uart2; }; }; &uart2 { compatible = "nordic,nrf-uarte"; current-speed = <1000000>; status = "okay"; tx-pin = <18>; rx-pin = <17>; rts-pin = <21>; cts-pin = <19>; };
I have modified prj.conf as
CONFIG_BT=y CONFIG_BT_BROADCASTER=y CONFIG_BT_OBSERVER=y CONFIG_BT_DEBUG_LOG=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=2 CONFIG_UART_2_NRF_FLOW_CONTROL=y CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_BT_SMP=y # Enable the BLE modules from NCS CONFIG_BT_GATT_NUS_C=y CONFIG_BT_MAX_CONN=10 CONFIG_BT_MAX_PAIRED=2 CONFIG_BT_ID_MAX=2 CONFIG_BT_PERIPHERAL=y
In main.c I replaced BT_LE_ADV_NCONN with BT_LE_ADV_CONN and I observed following prints in LTE link monitor
Advertising failed to start (err -5)
bt_hci_core: opcode 0x0000 pool id 6 pool 0x200205ec != &hci_cmd_pool 0x200205c4
bt_hci_core: ECC HCI commands not available
bt_hci_core: Identity: d8:56:51:0d:97:1b (random)
bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1
bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff
bt_hci_core: opcode 0x2005 status 0x0c
Please tell me what I am doing wrong.
Hi,
You can make the "peripheral_uart" work on the nRF9160DK (nrf9160dk_nrf9160ns) and the "hci_uart" on the nrf52840 (nrf9160dk_nrf52840) in NCS v1.3.0:
You change the following in ncs/v1.3.0/nrf/samples/bluetooth/peripheral_uart:
CONFIG_BT_H4=y CONFIG_BT_WAIT_NOP=y CONFIG_MAIN_STACK_SIZE=8192
set(spm_CONF_FILE
prj.conf
${CMAKE_CURRENT_LIST_DIR}/child_secure_partition_manager.conf
)
From lte_ble_gateway
note that hci_uart should just be programmed to the nrf9160_nrf52840 as is. (no modification needed)
Ok. Is it satisfy both scan and connectable advertising at a time?
Yes, it should.