get error message when running exsample project on nrf5340DK

Hi, 

Ubuntu 20.3

vscode + nrf connect extension

when i create new application from exsample project broadcast_audio_source for nrf5340, after build, and flash into the chip, i get following error message:

*** Booting Zephyr OS build v3.0.99-ncs1-2479-g78f2648f85e9 ***

[00:00:00.251,403] <dbg> bt_hci_core: bt_hci_driver_register: Registered RPMsg
[00:00:00.257,110] <dbg> bt_hci_core: hci_tx_thread: Started
--- 127 messages dropped ---
[00:00:00.283,599] <dbg> bt_hci_driver: Bluetooth initialized
Creating broadcast source
bt_rpmsUnable to create broadcast source: -5
g_send: Final HCI buffer:
01 1c 20 00 |.. .
--- 288 messages dropped ---
[00:00:00.296,783] <dbg> bt_audio_stream: bt_audio_stream_attach: conn (nil) stream 0x200015c4 ep 0x20001d1c codec 0x20000114
[00:00:00.296,783] <dbg> bt_hci_core: bt_hci_cmd_create: opcode 0x2036 param_len 25
[00:00:00.296,813] <dbg> bt_hci_core: bt_hci_cmd_create: buf 0x20006514
[00:00:00.298,278] <dbg> bt_id: bt_id_set_adv_random_addr: 13:96:F4:04:F2:43
[00:00:00.298,309] <dbg> bt_hci_core: bt_hci_cmd_send_sync: buf 0x20006514 opcode 0x2036 len 28
[00:00:00.298,339] <dbg> bt_hci_core: process_events: count 2
[00:00:00.298,339] <dbg> bt_hci_core: process_events: ev->state 4
[00:00:00.298,370] <dbg> bt_hci_core: send_cmd: calling net_buf_get
[00:00:00.298,370] <dbg> bt_hci_core: send_cmd: calling sem_take_wait
[00:00:00.298,400] <dbg> bt_hci_core: send_cmd: Sending command 0x2036 (buf 0x20006514) to driver
[00:00:00.298,400] <dbg> bt_hci_core: bt_send: buf 0x20006514 len 28 type 0
[00:00:00.298,431] <dbg> bt_hci_driver: bt_rpmsg_send: buf 0x20006514 type 0 len 28
[00:00:00.298,461] <dbg> bt_hci_driver: bt_rpmsg_send: Final HCI buffer:
01 36 20 19 00 00 00 a0 00 00 f0 00 00 07 01 00 |.6 ..... ........
00 00 00 00 00 00 00 7f 01 00 02 00 00 |........ .....
[00:00:00.298,492] <dbg> bt_hci_core: process_events: ev->state 0
[00:00:00.298,522] <dbg> bt_conn: bt_conn_prepare_events:
[00:00:00.298,522] <dbg> bt_hci_core: hci_tx_thread: Calling k_poll with 2 events
[00:00:00.299,224] <dbg> bt_hci_driver: bt_rpmsg_rx: RPMsg data:
04 0f 04 01 01 36 20 |.....6
[00:00:00.299,224] <dbg> bt_hci_driver: bt_rpmsg_evt_recv: len 4
[00:00:00.299,255] <dbg> bt_hci_driver: bt_rpmsg_rx: Calling bt_recv(0x20006514)
[00:00:00.299,255] <dbg> bt_hci_core: bt_recv: buf 0x20006514 len 6
[00:00:00.299,285] <dbg> bt_hci_core: hci_cmd_status: opcode 0x2036
[00:00:00.299,285] <dbg> bt_hci_core: hci_cmd_done: opcode 0x2036 status 0x01 buf 0x20006514
[00:00:00.299,346] <dbg> bt_hci_driver: bt_rpmsg_rx: RX buf payload:
[00:00:00.299,377] <wrn> bt_hci_core: opcode 0x2036 status 0x01
[00:00:00.299,407] <dbg> bt_audio_broadcast_source: bt_audio_broadcast_source_create: Failed to create advertising set (err -5)

after check the source code, i get this in error.h:

#define EIO 5           /**< I/O error */

why get this error?

thanks

  • I had the same issue myself just now (but for another sample application), for me what solved it was adding: 

    CONFIG_BT_EXT_ADV=y
    to:
    samples/bluetooth/hci_rpmsg/prj.conf
    Im not able to see from your log if it will solve it for you though. but you can give it a try.
  • Hi, Martin

    after adding 

    CONFIG_BT_EXT_ADV=y
    to:
    samples/bluetooth/hci_rpmsg/prj.conf
    i got following message:
    [21:42:01:031] *** Booting Zephyr OS build v3.0.99-ncs1-2479-g78f2648f85e9 ***␍␊
    [21:42:01:031] [00:00:00.455,810] <0x1b>[0m<dbg> bt_hci_core: bt_hci_driver_regist*** Booting Zephyr OS build v3.0.99-ncs1-2479-g78f2648f85e9 ***␍␊
    [21:42:19:866] [00:00:00.251,373] <0x1b>[0m<dbg> bt_hci_core: bt_hci_driver_register: Registered RPMsg<0x1b>[0m␍␊
    [21:42:19:883] <0x1b>[1;31m--- 240 messages dropped ---␍␊
    [21:42:19:889] <0x1b>[0mBluetooth initialized␍␊
    [21:42:22:419] Creating broadcast source␍␊
    [21:42:25:100] [00:00:13.808,Unable to create broadcast source: -134␍␊
    [21:42:25:109] 441] <0x1b>[0m<dbg> bt_conn: bt_conn_prepare_events: <0x1b>[0m␍␊
    [21:42:25:112] <0x1b>[1;31m--- 199 messages dropped ---␍␊
    [21:42:25:115] <0x1b>[0m[00:00:19.021,972] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_send_sync: rsp 0x20006514 opcode 0x2036 len 2<0x1b>[0m␍␊
    [21:42:25:125] [00:00:19.022,094] <0x1b>[0m<dbg> bt_id: bt_id_set_adv_random_addr: 21:27:DC:23:BC:D4<0x1b>[0m␍␊
    [21:42:25:131] [00:00:19.022,125] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_create: opcode 0x2035 param_len 7<0x1b>[0m␍␊
    [21:42:25:140] [00:00:19.022,155] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_create: buf 0x20006514<0x1b>[0m␍␊
    [21:42:25:147] [00:00:19.022,155] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_send_sync: buf 0x20006514 opcode 0x2035 len 10<0x1b>[0m␍␊
    [21:42:25:156] [00:00:19.022,186] <0x1b>[0m<dbg> bt_hci_core: process_events: count 2<0x1b>[0m␍␊
    [21:42:25:162] [00:00:19.022,216] <0x1b>[0m<dbg> bt_hci_core: process_events: ev->state 4<0x1b>[0m␍␊
    [21:42:25:168] [00:00:19.022,216] <0x1b>[0m<dbg> bt_hci_core: send_cmd: calling net_buf_get<0x1b>[0m␍␊
    [21:42:25:175] [00:00:19.022,216] <0x1b>[0m<dbg> bt_hci_core: send_cmd: calling sem_take_wait<0x1b>[0m␍␊
    [21:42:25:184] [00:00:19.022,247] <0x1b>[0m<dbg> bt_hci_core: send_cmd: Sending command 0x2035 (buf 0x20006514) to driver<0x1b>[0m␍␊
    [21:42:25:191] [00:00:19.022,247] <0x1b>[0m<dbg> bt_hci_core: bt_send: buf 0x20006514 len 10 type 0<0x1b>[0m␍␊
    [21:42:25:197] [00:00:19.022,277] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_send: buf 0x20006514 type 0 len 10<0x1b>[0m␍␊
    [21:42:25:205] [00:00:19.022,308] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_send: Final HCI buffer:␍␊
    [21:42:25:214] 01 35 20 07 00 d4 bc 23 dc 27 21 |.5 ....# .'! <0x1b>[0m␍␊
    [21:42:25:224] [00:00:19.022,338] <0x1b>[0m<dbg> bt_hci_core: process_events: ev->state 0<0x1b>[0m␍␊
    [21:42:25:230] [00:00:19.022,369] <0x1b>[0m<dbg> bt_conn: bt_conn_prepare_events: <0x1b>[0m␍␊
    [21:42:25:235] [00:00:19.022,369] <0x1b>[0m<dbg> bt_hci_core: hci_tx_thread: Calling k_poll with 2 events<0x1b>[0m␍␊
    [21:42:25:243] [00:00:19.022,949] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: RPMsg data:␍␊
    [21:42:25:249] 04 0e 04 01 35 20 00 |....5 . <0x1b>[0m␍␊
    [21:42:25:261] [00:00:19.022,949] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_evt_recv: len 4<0x1b>[0m␍␊
    [21:42:25:267] [00:00:19.022,979] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: Calling bt_recv(0x20006514)<0x1b>[0m␍␊
    [21:42:25:276] [00:00:19.022,979] <0x1b>[0m<dbg> bt_hci_core: bt_recv: buf 0x20006514 len 6<0x1b>[0m␍␊
    [21:42:25:280] [00:00:19.023,010] <0x1b>[0m<dbg> bt_hci_core: hci_cmd_complete: opcode 0x2035<0x1b>[0m␍␊
    [21:42:25:287] [00:00:19.023,010] <0x1b>[0m<dbg> bt_hci_core: hci_cmd_done: opcode 0x2035 status 0x00 buf 0x20006514<0x1b>[0m␍␊
    [21:42:25:295] [00:00:19.023,071] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: RX buf payload:␍␊
    [21:42:25:302] 00 |. <0x1b>[0m␍␊
    [21:42:25:313] [00:00:19.023,101] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_send_sync: rsp 0x20006514 opcode 0x2035 len 1<0x1b>[0m␍␊
    [21:42:25:322] [00:00:19.023,132] <0x1b>[0m<dbg> bt_audio_broadcast_source: bt_audio_broadcast_source_create: Failed to set periodic advertising parameters (err -134)<0x1b>[0m␍␊
    so, i think there is other issues
    thanks
  • and after adding:

    CONFIG_BT_EXT_ADV=y

    CONFIG_BT_PER_ADV=y

    to:

    samples/bluetooth/hci_rpmsg/prj.conf

    i got following message:

    [21:48:02:137] *** Booting Zephyr OS build v3.0.99-ncs1-2479-g78f2648f85e9 ***
    [21:48:02:158] [00:00:00.450,073] <0x1b>[0m<dbg> bt_hci_core: bt_hci_driver_register: Registered RPMsg<0x1b>[0m
    [21:48:02:158] [00:00:00.455,749] <0x1b>[0m<dbg> bt_hci_core: hci_tx_thread: Started<0x1b>[0m
    [21:48:02:159] <0x1b>[1;31m--- 106 messages dropped ---
    [21:48:02:164] <0x1b>[0m[00:00:00.478,942] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_send: buf 0xBluetooth initialized
    [21:48:02:183] Creating broadcast source
    [21:48:02:183] 20006514 type 0 len 3<0x1b>[0m
    [21:48:02:189] <0x1b>[1;31m--- 367 messages dropped ---
    [21:48:02:196] <0x1b>[Starting broadcast source
    [21:48:02:199] 0m[00:00Unable to start broadcast source: -5
    [21:48:02:441] :00.510,589] <0x1b>[0m<dbg> bt_conn: bt_conn_prepare_events: <0x1b>[0m
    [21:48:02:441] <0x1b>[1;31m--- 123 messages dropped ---
    [21:48:02:441] <0x1b>[0m[00:00:00.513,885] <0x1b>[0m<dbg> bt_iso: bt_iso_chan_add: iso 0x20001180 chan 0x20001dfc<0x1b>[0m
    [21:48:02:441] [00:00:00.513,885] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_create: opcode 0x2068 param_len 31<0x1b>[0m
    [21:48:02:441] [00:00:00.513,916] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_create: buf 0x20006514<0x1b>[0m
    [21:48:02:441] [00:00:00.513,946] <0x1b>[0m<dbg> bt_hci_core: bt_hci_cmd_send_sync: buf 0x20006514 opcode 0x2068 len 34<0x1b>[0m
    [21:48:02:441] [00:00:00.513,977] <0x1b>[0m<dbg> bt_hci_core: process_events: count 2<0x1b>[0m
    [21:48:02:441] [00:00:00.513,977] <0x1b>[0m<dbg> bt_hci_core: process_events: ev->state 4<0x1b>[0m
    [21:48:02:441] [00:00:00.514,007] <0x1b>[0m<dbg> bt_hci_core: send_cmd: calling net_buf_get<0x1b>[0m
    [21:48:02:441] [00:00:00.514,007] <0x1b>[0m<dbg> bt_hci_core: send_cmd: calling sem_take_wait<0x1b>[0m
    [21:48:02:441] [00:00:00.514,038] <0x1b>[0m<dbg> bt_hci_core: send_cmd: Sending command 0x2068 (buf 0x20006514) to driver<0x1b>[0m
    [21:48:02:441] [00:00:00.514,038] <0x1b>[0m<dbg> bt_hci_core: bt_send: buf 0x20006514 len 34 type 0<0x1b>[0m
    [21:48:02:441] [00:00:00.514,068] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_send: buf 0x20006514 type 0 len 34<0x1b>[0m
    [21:48:02:441] [00:00:00.514,068] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_send: Final HCI buffer:
    [21:48:02:441] 01 68 20 1f 00 00 01 10 27 00 28 00 0a 00 02 02 |.h ..... '.(.....
    [21:48:02:441] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........
    [21:48:02:441] 00 00 00 |... <0x1b>[0m
    [21:48:02:441] [00:00:00.514,129] <0x1b>[0m<dbg> bt_hci_core: process_events: ev->state 0<0x1b>[0m
    [21:48:02:441] [00:00:00.514,129] <0x1b>[0m<dbg> bt_conn: bt_conn_prepare_events: <0x1b>[0m
    [21:48:02:441] [00:00:00.514,160] <0x1b>[0m<dbg> bt_hci_core: hci_tx_thread: Calling k_poll with 2 events<0x1b>[0m
    [21:48:02:441] [00:00:00.514,953] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: RPMsg data:
    [21:48:02:441] 04 0f 04 01 01 68 20 |.....h <0x1b>[0m
    [21:48:02:441] [00:00:00.514,984] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_evt_recv: len 4<0x1b>[0m
    [21:48:02:441] [00:00:00.514,984] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: Calling bt_recv(0x20006514)<0x1b>[0m
    [21:48:02:441] [00:00:00.515,014] <0x1b>[0m<dbg> bt_hci_core: bt_recv: buf 0x20006514 len 6<0x1b>[0m
    [21:48:02:441] [00:00:00.515,014] <0x1b>[0m<dbg> bt_hci_core: hci_cmd_status: opcode 0x2068<0x1b>[0m
    [21:48:02:441] [00:00:00.515,045] <0x1b>[0m<dbg> bt_hci_core: hci_cmd_done: opcode 0x2068 status 0x01 buf 0x20006514<0x1b>[0m
    [21:48:02:441] [00:00:00.515,075] <0x1b>[0m<dbg> bt_hci_driver: bt_rpmsg_rx: RX buf payload:<0x1b>[0m
    [21:48:02:441] [00:00:00.515,106] <0x1b>[1;33m<wrn> bt_hci_core: opcode 0x2068 status 0x01<0x1b>[0m
    [21:48:02:441] [00:00:00.515,136] <0x1b>[0m<dbg> bt_iso: bt_iso_big_create: Could not create BIG -5<0x1b>[0m
    [21:48:02:441] [00:00:00.515,136] <0x1b>[0m<dbg> bt_conn: bt_conn_unref: handle 0 ref 1 -> 0<0x1b>[0m
    [21:48:02:441] [00:00:00.515,167] <0x1b>[0m<dbg> bt_audio_broadcast_source: bt_audio_broadcast_source_start: Failed to create BIG: -5<0x1b>[0m

    thanks

  • Hi,

    The example only work with the LE Audio Controller Subsystem for nRF53 (see nRF5340 Audio), so you need to do a few things. Firstly, add these two lines to prj.cof within broadcast_audio_source:

    CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n # Make sure NCS build system won't build network core for us
    CONFIG_BT_HCI_VS_EXT=n # Since we are not going to use Zephyr controller, so we have to disabled the VS command for Zephyr

    Then program the firmware hex found under nrf\applications\nrf5340_audio\bin\ on the network core.

    Lastly, program the application core firmware you just built.

    Then you should see a log output like this:

    *** Booting Zephyr OS build v3.0.99-ncs1  ***
    Bluetooth initialized
    Creating broadcast source
    Starting broadcast source
    Broadcast source started
    Waiting 30 seconds before stopped
    [00:00:00.452,087] <inf> bt_hci_core: Identity: F3:04:16:52:BB:ED (random)
    [00:00:00.452,148] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0cd7, manufacturer 0x07e8
    [00:00:00.452,148] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x0cd7
    Sent 1000 total ISO packets
    Sent 2000 total ISO packets
    Sent 3000 total ISO packets
    Stopping broadcast source
    Broadcast source stopped
    Deleting broadcast source
    Broadcast source deleted
    Creating broadcast source
    Starting broadcast source
    Broadcast source started
    Waiting 30 seconds before stopped
    Sent 4000 total ISO packets
    Sent 5000 total ISO packets
    Sent 6000 total ISO packets
    Stopping broadcast source
    Broadcast source stopped
    Deleting broadcast source
    Broadcast source deleted
    Creating broadcast source
    Starting broadcast source
    Broadcast source started
    Waiting 30 seconds before stopped
    ...

Related