This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Custom BLE packets on mesh network

Hello

I have a mesh node that needs to broadcast a custom BLE packet

To start advertising I call bt_le_adv_start and it works as expected.

I'm curious about the error that I see in the RTT log

00> [00:08:41.658,050] <dbg> bt_mesh_net: bt_mesh_net_relay: Relaying packet. TTL is now 9
00> [00:08:41.658,172] <err> bt_mesh_adv_legacy: Advertising failed: err -120

My understanding is that his is because my app started advertising and the mesh network cannot relay the packet

I tried to call 

bt_mesh_relay_set(BT_MESH_FEATURE_DISABLED,BT_MESH_TRANSMIT(0,1));
before calling bt_le_adv_start  but I get same error -120.
What's the proper way to disable mesh relay?
Is there a way for custom advertising and mesh relay to coexist in a provisioned mesh node?
Thank you
Parents
  • Hi,

    Could you provide me with what SDK version you are using?

    The error is probably due to you running BLE and Mesh at the same time.

    custom BLE packet

    Can you elaborate what you mean by custom?

    We do have an example in the nRF Connect SDK that shows how you can run BLE and Mesh concurrently. I suggest you have a look at this example and use that as a reference.

  • custom = packet type is BT_DATA_MANUFACTURER_DATA (0xFF)

    SDK is 1.9.1

    I'll take a look at the sample - looks like it does what I need

    Thank you

  • I use  Zephyr SDK 1.9.1

    Could not find this sample in the SDK or the full zephyr repo which I cloned

    Could you please point me to the location of this sample? 

    Thanks

  • Just enabling  CONFIG_BT_EXT_ADV causes the program to crash

    Any suggestions?

    Thanks

    00> [00:00:00.286,407] <err> os: ***** BUS FAULT *****
    00> [00:00:00.286,407] <err> os: Precise data bus error
    00> [00:00:00.286,437] <err> os: BFAR Address: 0xbb672b5[0m
    00> [00:00:00.286,437] <err> os: r0/a1: 0x00000020 r1/a2: 0x0bb672b5 r2/a3: 0x0bb672b5
    00> [00:00:00.286,468] <err> os: r3/a4: 0x00000020 r12/ip: 0x00000007 r14/lr: 0x00057609
    00> [00:00:00.286,468] <err> os: xpsr: 0x81000200
    00> [00:00:00.286,499] <err> os: Faulting instruction address (r15/pc): 0x00057562
    00> [00:00:00.286,529] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0

  • Hi,

    The sample can be found in nrf/samples/bluetooth/mesh/ble_peripheral_lbs_coex in the nRF Connect SDK folder structure.

  • From what I can tell the sample  enables extended advertising and configures 2 advertising sets

    But I don't see it doing anything else different from normal mesh initialization or ble advertising initialization 

    I enabled extended advertising i.e 

    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
    On a provisioned device I now I get this
    [00:05:06.649,291] <wrn> bt_hci_core: opcode 0x2036 status 0x01
    00> [00:05:06.649,322] <err> bt_mesh_adv_legacy: Advertising failed: err -5
    At this point I have not called ble_adv_start to start advertising my custom packet - this is mesh only
    Any ideas?
    Thanks
Reply Children
No Data
Related