Hi all,
I'm currently working with the nRF5340 PDK trying to get the UART central sample working with a paired nRF52 PCA10040 DK running the UART peripheral program.
The nRF5340 is programmed with the HCI RPMsg sample on the network core, as per https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#ug-nrf5340
"This sample must be programmed to the network core to run standard Bluetooth Low Energy samples on nRF5340."
On the application core, I have the Central UART sample from the nRF Connect SDK programmed in the cpuapp domain.
On the nRF52 I have the peripheral UART sample also from the nRF Connect SDK programmed.
The issue is, the boards seem to connect to each other, but I don't get the Nordic UART service.
On the nRF52, here is the output:
*** Booting Zephyr OS build v2.1.99-ncs1-8-g367eec2dd60d *** Starting Nordic UART service example I: 6 Sectors of 4096 bytes I: alloc wra: 0, fc0 I: data wra: 0, 88 I: No ID address. App must call settings_load() Bluetooth initialized Connected c6:2a:64:ca:2e:fc (random) Security failed: c6:2a:64:ca:2e:fc (random) level 1 err 4 Pairing failed conn: c6:2a:64:ca:2e:fc (random), reason 4
First, I'm not so sure about the "must call settings_load()" line, because my application code directly calls it in the initialization, but I don't think that's the problem.
The bluetooth is initialized and it definitely is connecting to the nRF53 running the central sample, since on the nRF53 side, as they are connecting, this is output:
*** Booting Zephyr OS build v2.1.99-ncs1-8-g367eec2dd60d *** Printing from network CPU - hci_rpmsg [00:00:00.005,859] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.005,920] <inf> hci_rpmsg: Received message of 4 bytes. --- 14 messages dropped --- [00:00:00.017,578] <inf> hci_rpmsg: Got callback of id 0 --- 28 messages dropped --- [00:00:00.027,221] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.027,282] <inf> hci_rpmsg: Received message of 4 bytes. [00:00:00.035,034] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.035,125] <inf> hci_rpmsg: Received message of 4 bytes. [00:00:00.035,552] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.035,644] <inf> hci_rpmsg: Received message of 4 bytes. [00:00:00.036,102] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.036,193] <inf> hci_rpmsg: Received message of 10 bytes. [00:00:00.046,661] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.046,722] <inf> hci_rpmsg: Received message of 10 bytes. [00:00:00.047,180] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.047,271] <inf> hci_rpmsg: Received message of 11 bytes. [00:00:00.047,637] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.047,729] <inf> hci_rpmsg: Received message of 6 bytes. [00:00:00.079,437] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.079,528] <inf> hci_rpmsg: Received message of 6 bytes. [00:00:00.080,078] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.080,139] <inf> hci_rpmsg: Received message of 10 bytes. [00:00:00.080,596] <inf> hci_rpmsg: Got callback of id 0 [00:00:00.080,688] <inf> hci_rpmsg: Received message of 29 bytes. [00:00:00.287,292] <inf> bt_ctlr_hci: handle: 0x0000, rssi: -45 dB.
So I am fairly certain that they are at least connecting to each other.
Following the security failed message printed from the nRF52, I traced reason 4 to the bt_security_err enum in conn.h which "BT_SECURITY_ERR_AUTH_REQUIREMENT" is 4 in the enumeration, so it leads me to believe there is some problem with authorization.
Another thing I will mention is that on the nRF53 side, none of the central UART sample seems to be printing to the console, the only output seems to be from the HCI RPMsg sample running on the network core, even though I would expect the central UART to be outputting as well.
Any guidance would be appreciated.