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

5340 sample peripheral_lbs can't advertising. log show "No ID address. App must call settings_load()"

print log as follow:

23 NRF_DPPIC Non-Secure OK
24 NRF_REGULATORS Non-Secure OK
25 NRF_DCNF Secure SKIP
26 NRF_CTRLAP Secure SKIP
27 NRF_SPIM4 Non-Secure OK
28 NRF_WDT0 Non-Secure OK
29 NRF_WDT1 Non-Secure OK
30 NRF_COMP Non-Secure OK
31 NRF_LPCOMP Non-Secure OK
32 NRF_PDM0 Non-Secure OK
33 NRF_I2S0 Non-Secure OK
34 NRF_QSPI Non-Secure OK
35 NRF_NFCT Non-Secure OK
36 NRF_MUTEX Non-Secure OK
37 NRF_QDEC0 Non-Secure OK
38 NRF_QDEC1 Non-Secure OK
39 NRF_USBD Non-Secure OK
40 NRF_USBREGULATOR Non-Secure OK
41 NRF_P1 Non-Secure OK
42 NRF_OSCILLATORS Non-Secure OK
43 NRF_RESET Non-Secure OK
44 NRF_GPIOTE1 Non-Secure OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x2000c2a0
SPM: NS reset vector at 0x13de1
SPM: prepare to jump to Non-Secure image.
*** Booting Zephyr OS build v2.6.0-rc1-ncs1 ***
Starting Bluetooth Peripheral LBS example
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd8
I: data wra: 0, 1c
W: ECC HCI commands not available
I: No ID address. App must call settings_load()
Bluetooth initialized
Advertising successfully started

when I use nrf connent in mobile, I can't scan the device "Nordic_LBS"

  • Hi,

    From the log output it looks like everything is alright and the bluetooth device is initialized and advertising, so I don't think the flashing of the sample is the problem here.

    Bluetooth initialized
    Advertising successfully started

    Are you running this sample in the nRF5340 DK or using a custom board?

    What phone are you using for scanning and what version of the nRF Connect app are you using?

    Best regards,

    Marjeris

  • Hi,

    Yes.  I am trying to run this sample in the nRF5340 DK. The phone I am using is iPhone8 and the version of the nRF Connect app is 2.4.12.

    Before this trying, I have used nRF Connect Programmer to program the HEX files of the the Heart Rate Monitor (HRM) demo application from nRF5340 DK Downloads and running sucessfully while use the nRF Toolbox 5.0.2 on iPhone8.

    Then I want to build and program an application from the source code.

    First I build the Peripheral_lbs sample in SES Nordic edition v5.50c by using the Toolchain Manger in nRF connect 3.7.0 on desktop. The used nRF Connect Programmer to program the hex in folder nrf\samples\bluetooth\peripheral_lbs\build_nrf5340dk_nrf5340_cpuappns\hci_rpmsg\zephyr\merged_CPUNET.hex in to Netcore. Then download application directly in in SES Nordic edition v5.50c.

    Lastly, reset the nRF5340 DK. using my iPhone app I can't scan the device "Nordic_LBS".

    I have no idea what 's the problem?

    And what is the log "No ID address. App must call settings_load()" meaning?

    the source code in main is follow :

    void main(void)
    {
    	int blink_status = 0;
    	int err;
    
    	printk("Starting Bluetooth Peripheral LBS example\n");
    
    	err = dk_leds_init();
    	if (err) {
    		printk("LEDs init failed (err %d)\n", err);
    		return;
    	}
    
    	err = init_button();
    	if (err) {
    		printk("Button init failed (err %d)\n", err);
    		return;
    	}
    
    	bt_conn_cb_register(&conn_callbacks);
    	if (IS_ENABLED(CONFIG_BT_LBS_SECURITY_ENABLED)) {
    		bt_conn_auth_cb_register(&conn_auth_callbacks);
    	}
    
    	err = bt_enable(NULL);
    	if (err) {
    		printk("Bluetooth init failed (err %d)\n", err);
    		return;
    	}
    
    	printk("Bluetooth initialized\n");
    
    	if (IS_ENABLED(CONFIG_SETTINGS)) {
    		settings_load();
    	}
    
    	err = bt_lbs_init(&lbs_callbacs);
    	if (err) {
    		printk("Failed to init LBS (err:%d)\n", err);
    		return;
    	}
    
    	err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad),
    			      sd, ARRAY_SIZE(sd));
    	if (err) {
    		printk("Advertising failed to start (err %d)\n", err);
    		return;
    	}
    
    	printk("Advertising successfully started\n");
    
    	for (;;) {
    		dk_set_led(RUN_STATUS_LED, (++blink_status) % 2);
    		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
    	}
    }
    

    I also try the sample Peripheral_uart but met the same problem. 

    So do you have any idea?

  • Sorry for the late reply. Marjeris went on summer vacation so I will take a look at this issue.

    The problem here seems simple configuration issue, but ofcourse it does not look simple unless we narrow it down.

    If this is an unedited example, then it should have worked out of the box, can you please check if you have CONFIG_SETTINGS enabled in your project? Most likely it is enabled. If you have not edited any settings, then i should give it a try to test this sample on my desk.

  • I just used the bluetooth sample "peripheral_uart" in ncs v1.6.0(v1.6.0\nrf\samples\bluetooth\peripheral_uart) and didn't change any default settings and code. I find "CONFIG_SETTINGS=y" in proj.conf. So I think that I have  enabled CONFIG_SETTINGS. I just wonder what should I do to run a bluetooth sample from source code on 5340 DK.

  • I got some hardfault trying to run this, It should not have happened. This seems like a bug to me and I am trying  to confirm this with my colleagues. Will be back to you with any fixes if there are any known already.

Related