ble mesh: combine node and provisioner

luca.cbt
Posts: 2
Joined: Fri Jul 08, 2022 7:02 am

ble mesh: combine node and provisioner

Postby luca.cbt » Fri Jul 08, 2022 7:53 am

Hi everyone,

I would like to create a device on ESP32 that can dynamically switch between provisioner role and a simple to-be-provisioned node (depending on various external working conditions).

I tried combining the code from the sensor cli/srv example, activating both CONFIG_BLE_MESH_NODE and CONFIG_BLE_MESH_PROVISIONER flags (and also the other related flags), but, after flashing the device, the code panics and reboots continuously.

I also tried merging the fast provisioning example server and client. The merged application works as client, but not as provisioner (it can only provision the first client, then it stops working).

So, I'm wondering: is it possible to create an application that implements both node and provisioner roles?
And how?

Thanks,
Luca

jiabuda
Posts: 4
Joined: Mon Oct 17, 2022 5:46 am

Re: ble mesh: combine node and provisioner

Postby jiabuda » Mon Oct 17, 2022 5:58 am

hi,we are develop a project like you said, have you already solve the problem?

i try to enable provisioner and node in menuconfig, but encounter panic and the board restart.

gzk_will
Posts: 4
Joined: Tue Dec 26, 2023 3:21 am

Re: ble mesh: combine node and provisioner

Postby gzk_will » Tue Dec 26, 2023 3:56 am

the same problem.

busadhruv
Posts: 6
Joined: Tue Sep 05, 2023 11:50 am

Re: ble mesh: combine node and provisioner

Postby busadhruv » Wed Dec 27, 2023 12:05 pm

anyone having a solution then let me know

snutw_
Posts: 34
Joined: Wed Aug 21, 2024 1:48 pm

Re: ble mesh: combine node and provisioner

Postby snutw_ » Thu Oct 31, 2024 7:18 am

Ok I see many people needing a solution for this - and so do I join them...

Well, it impresses me that luca.cbt was able to provision one device with a merged code...
Interesting how did he managed to reach that? (even as it would still be not sufficient also for me)

And in any case (for the next people looking here for further help), I can hint at teh other thread started by him:
https://esp32.com/viewtopic.php?f=13&t= ... 44#p100344

Seems since so many people have trouble with this issue, then it could be really reasonable to include such example in the IDF.
It seems that even knowledgeable people like chegewara seem to have been still checking some of these features not a long time ago

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: ble mesh: combine node and provisioner

Postby chegewara » Tue Nov 05, 2024 8:00 am

snutw_ wrote: Ok I see many people needing a solution for this - and so do I join them...

Well, it impresses me that luca.cbt was able to provision one device with a merged code...
Interesting how did he managed to reach that? (even as it would still be not sufficient also for me)

And in any case (for the next people looking here for further help), I can hint at teh other thread started by him:
https://esp32.com/viewtopic.php?f=13&t= ... 44#p100344

Seems since so many people have trouble with this issue, then it could be really reasonable to include such example in the IDF.
It seems that even knowledgeable people like chegewara seem to have been still checking some of these features not a long time ago
Thank you for kind words, but i am not that "knowledgable" as you may think. I am just hard working with some topics, like ble, ble mesh or usb, and it takes me hundreds hours to learn stuff. Then, when i have some knowledge and i see other people struggling with problems like this, i am trying to see if its possible to make it works and this way i am learning new stuff. I am just thinking about this as an exercise.

As to some questions in this topic i can try answer, based on my limited knowledge:
- yes, it should be possible to switch between provisioner and node, as you can run both, provisioner and node, in the same time

Some time ago i started working on ble mesh library, which is currently on hold, but it should be fairly easy to test provisioner + node:
https://github.com/chegewara/esp32-ble- ... nouncement

Why i started to work on it?
- because i think that ble mesh is cool feature and it is worth to learn it and to have it in my portfolio
Why is it on hold?
- for few reasons; lack of time, i am focusing on other stuff like USB and esp32-p4, my brain is not in good shape lately and it takes me much more time to do some codding etc

snutw_
Posts: 34
Joined: Wed Aug 21, 2024 1:48 pm

Re: ble mesh: combine node and provisioner

Postby snutw_ » Tue Nov 05, 2024 1:47 pm

chegewara wrote:
Tue Nov 05, 2024 8:00 am
Thank you for kind words, but i am not that "knowledgable" as you may think. I am just hard working with some topics, like ble, ble mesh or usb, and it takes me hundreds hours to learn stuff. Then, when i have some knowledge and i see other people struggling with problems like this, i am trying to see if its possible to make it works and this way i am learning new stuff. I am just thinking about this as an exercise.
Well it is not entirely ESP's fault, because the Bluetooth SIG organization did in it's technology specification a division between clients and servers...
So well my not very patient boss wants me to go for Bluetooth without a mesh so we could sell the product sooner.. Even though I dunno if switching to regular BLE will indeed simplify this matter. Since I am not sure if there it is simpler, or it also has such a division designed to keep having to separate softwares.
Anyway nice to know you are also from Poland. :) Even though I've recently relocated south-east.

snutw_
Posts: 34
Joined: Wed Aug 21, 2024 1:48 pm

Re: ble mesh: combine node and provisioner

Postby snutw_ » Wed Nov 13, 2024 3:02 pm

Ok it is not that hard to combine a node and a provisioner in single software. I mean from the fast provisioning example you can take all the files and simply run one or the other role (server or client) depending on a condition that is deciding if this particular device now should be a provisioner or a provisioned node. Not an elegant solution, but it's and easy and fast starting point.
(and add the options of sdkconfig)

Who is online

Users browsing this forum: No registered users and 236 guests