Search found 47 matches

by ZacDaMan
Sun Dec 11, 2022 11:45 pm
Forum: ESP-IDF
Topic: BLE-MESH - esp_ble_mesh_server_model_send_msg() returns ESP_OK when not part of mesh
Replies: 0
Views: 819

BLE-MESH - esp_ble_mesh_server_model_send_msg() returns ESP_OK when not part of mesh

Not sure if this is a bug or not; I have a node that I want to boot up, send a message to the central provisioner, deep sleep for 10s and repeat. I want the cycle to stop and the node to just remain on, if the provisioner is not present. However, if I turn the provisioner off, meaning the node is th...
by ZacDaMan
Tue Dec 06, 2022 9:09 pm
Forum: ESP-IDF
Topic: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner
Replies: 4
Views: 2754

Re: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner

It didn't feel like I was getting anywhere, so I switched to using the vendor_client and vendor_server examples, as I was able to send a string using that example - still only in response to a message from the provisioner though. I tried pulling out the code from the callback that responds, but it s...
by ZacDaMan
Mon Dec 05, 2022 11:49 pm
Forum: ESP-IDF
Topic: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner
Replies: 4
Views: 2754

Re: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner

OK I modified the code so after provisioning, the provisioner sends a normal request, and the provisioned node saves the model and ctx from that request. test_model = param->model; test_ctx = param->ctx; I then use those to send a message to the provisioner when a button is pressed: void button2_msg...
by ZacDaMan
Mon Dec 05, 2022 3:56 am
Forum: ESP-IDF
Topic: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner
Replies: 4
Views: 2754

Re: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner

Tried a couple of things so far, no luck. Tried adding

Code: Select all

esp_ble_mesh_msg_ctx_t test_ctx
and filling it in with the address of the provisioner but it didn't get through.
by ZacDaMan
Tue Nov 29, 2022 3:45 am
Forum: ESP-IDF
Topic: BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner
Replies: 4
Views: 2754

BLE-MESH - Spontaneously send a message from a provisioned node to the provisioner

I'm setting up a BLE mesh with just two devices, a provisioner and a node, using the sensor_server and sensor_client examples as starting points, with the sensor_client being the provisioner. I want the node, the sensor_server, to send a message to the provisioner every 10 seconds or so, without fir...
by ZacDaMan
Thu Nov 24, 2022 3:12 am
Forum: ESP-IDF
Topic: BLE Mesh Friendship gets terminated when node sleeps/reboots
Replies: 5
Views: 2760

Re: BLE Mesh Friendship gets terminated when node sleeps/reboots

On further inspection, calling esp_ble_mesh_lpn_poll() returns ESP_OK both before and after the friendship is terminated, and again when the friendship is re-established, leaving me unsure what the purpose of this function is.
by ZacDaMan
Mon Nov 21, 2022 11:15 pm
Forum: ESP-IDF
Topic: BLE Mesh Friendship gets terminated when node sleeps/reboots
Replies: 5
Views: 2760

Re: BLE Mesh Friendship gets terminated when node sleeps/reboots

This is still puzzling me; I added a call to esp_ble_mesh_lpn_poll() on startup, which returns ESP_OK first try, meaning the friendship is present and remembered when the device starts, but a few seconds later it will still be terminated by the Friend node. Can I adjust the PollTimeout? Or do I need...
by ZacDaMan
Sun Nov 20, 2022 8:03 pm
Forum: ESP-IDF
Topic: BLE Mesh Friendship gets terminated when node sleeps/reboots
Replies: 5
Views: 2760

Re: BLE Mesh Friendship gets terminated when node sleeps/reboots

bungdz99 wrote:
Thu Nov 17, 2022 5:46 am
Can you give me the code of this project. I have an assignment for this part, but I don't know how to implement.
It's just the onoff_client and onoff_server examples, but with friend and low power enabled in menuconfig, respectively
by ZacDaMan
Wed Nov 16, 2022 2:55 am
Forum: ESP-IDF
Topic: BLE Mesh Friendship gets terminated when node sleeps/reboots
Replies: 5
Views: 2760

Re: BLE Mesh Friendship gets terminated when node sleeps

Potentially related - every now and then (not consistently), when the LPN wakes up it will come up with W (16372) BLE_MESH: Retrying the first Friend Poll, 1 attempts W (16802) BLE_MESH: Retrying the first Friend Poll, 2 attempts W (17222) BLE_MESH: Retrying the first Friend Poll, 3 attempts W (1765...
by ZacDaMan
Wed Nov 16, 2022 2:50 am
Forum: ESP-IDF
Topic: BLE Mesh Friendship gets terminated when node sleeps/reboots
Replies: 5
Views: 2760

BLE Mesh Friendship gets terminated when node sleeps/reboots

I'm trying to get two nodes working in a Friend/LPN configuration, but when I restart or deep-sleep the LPN (which has the BLE settings set to persist, ie the node automatically rejoins the mesh and remembers the friendship), I see the Friend node terminate the friendship, sometimes even after the L...