ESP32 Ble Mesh internet gateway
ESP32 Ble Mesh internet gateway
Hi Folks, did anyone have worked on ble mesh gateway? that can connect with aws iot core and publish data to cloud if anynode turns on or turns off. I also want to control ble mesh remotely. if anyone have done this task before then please help me out. I am able to create mesh and also able to send data from one node to aws iot core but problem is comming that I want to send data of all node from the node I have connected with aws iot core. I am only able to send and receive data on one node only which is connnected to internet.
thanks in advance.
https://github.com/espressif/esp-idf/tr ... off_server
I have used above link code for ble mesh to control devices.
thanks in advance.
https://github.com/espressif/esp-idf/tr ... off_server
I have used above link code for ble mesh to control devices.
Re: ESP32 Ble Mesh internet gateway
Hi,
first off all thank you for this post. After reading it i decided to play with ble mesh again and i am making C++ library for bluedroid. I have good results for now, including generic onf/off and generic level models.
I found some video from nordic where guy is saying that making a gateway is not easy, but i believe here is good starting point (at least to send commands from web to nodes):
https://github.com/espressif/esp-idf/bl ... _cmd.c#L32
Of cource gateway has to be provisioned in the same ble mesh.
Good luck
first off all thank you for this post. After reading it i decided to play with ble mesh again and i am making C++ library for bluedroid. I have good results for now, including generic onf/off and generic level models.
I found some video from nordic where guy is saying that making a gateway is not easy, but i believe here is good starting point (at least to send commands from web to nodes):
https://github.com/espressif/esp-idf/bl ... _cmd.c#L32
Of cource gateway has to be provisioned in the same ble mesh.
Good luck
Re: ESP32 Ble Mesh internet gateway
Im not saying i am doing it properly, but i can say i have one way ble mesh gateway.
It means i can pass messages from internet to ble mesh and control devices.
I dont know if its possible (probably it is) and how to make it works both ways, yet.
Another question is if its possible with espressif ble mesh stack.
If you want to try to make one way gateway yourself here is the hint:
- grab any client example from esp-idf (on-off client, level client etc)
- add wifi connection and mqtt (easy to start with)
- pass data from mqtt to this structs https://github.com/espressif/esp-idf/bl ... #L178-L191
It means i can pass messages from internet to ble mesh and control devices.
I dont know if its possible (probably it is) and how to make it works both ways, yet.
Another question is if its possible with espressif ble mesh stack.
If you want to try to make one way gateway yourself here is the hint:
- grab any client example from esp-idf (on-off client, level client etc)
- add wifi connection and mqtt (easy to start with)
- pass data from mqtt to this structs https://github.com/espressif/esp-idf/bl ... #L178-L191
Re: ESP32 Ble Mesh internet gateway
Hi @chegewara, Thanks for replying. I will try the way you suggested, hopefully it should work. I need bi-directional communication, like if any node in mesh sets (on or off mode) then it should be able to update on cloud through mqtt. is this possible to get all node status data to a node and that node can send data to cloud through mqtt?
-
- Posts: 1
- Joined: Thu Feb 29, 2024 12:39 pm
Re: ESP32 Ble Mesh internet gateway
https://github.com/espressif/esp-idf/tr ... off_server
This link code you shared really helped me a lot. Thank you for your active assistance
This link code you shared really helped me a lot. Thank you for your active assistance
Last edited by polinkuer12 on Tue Mar 05, 2024 1:42 pm, edited 1 time in total.
Re: ESP32 Ble Mesh internet gateway
Hi,
it was few very intense days playing with ble mesh (16+ hours a day) and i just scratched tip of it, but i can say it is possible to make two ways ble mesh gateway.
Its not easy, because it requires very good understanding of ble mesh, espressif stack and design. I had to do a very small change in espressif mesh stack to achieve it.
it was few very intense days playing with ble mesh (16+ hours a day) and i just scratched tip of it, but i can say it is possible to make two ways ble mesh gateway.
Its not easy, because it requires very good understanding of ble mesh, espressif stack and design. I had to do a very small change in espressif mesh stack to achieve it.
Re: ESP32 Ble Mesh internet gateway
Its not advertising, i just want to show there is plenty cheap gateways on the market.
Here is multi protocol gateway, with zegbee, ble mesh, wifi tuya etc
https://blow.pl/produkty/inteligentna-b ... 0--d-3636/
In my case, aside of writing app that can route data between mqtt and ble mesh provisioner, this is the only part of espressif code i had to change:
https://github.com/espressif/esp-idf/bl ... ess.c#L705
Here i have to "intercept" data and pass to my app.
There maybe is better way to do it, but for now i find it useful and efficient.
Here is multi protocol gateway, with zegbee, ble mesh, wifi tuya etc
https://blow.pl/produkty/inteligentna-b ... 0--d-3636/
In my case, aside of writing app that can route data between mqtt and ble mesh provisioner, this is the only part of espressif code i had to change:
https://github.com/espressif/esp-idf/bl ... ess.c#L705
Here i have to "intercept" data and pass to my app.
There maybe is better way to do it, but for now i find it useful and efficient.
Re: ESP32 Ble Mesh internet gateway
Thanks Chegewara, did you ever tested this gateway that you have shared? it working properly or not?chegewara wrote: ↑Sun Mar 03, 2024 4:34 amIts not advertising, i just want to show there is plenty cheap gateways on the market.
Here is multi protocol gateway, with zegbee, ble mesh, wifi tuya etc
https://blow.pl/produkty/inteligentna-b ... 0--d-3636/
In my case, aside of writing app that can route data between mqtt and ble mesh provisioner, this is the only part of espressif code i had to change:
https://github.com/espressif/esp-idf/bl ... ess.c#L705
Here i have to "intercept" data and pass to my app.
There maybe is better way to do it, but for now i find it useful and efficient.
I think this is the better way if it works and become successful to pass data to the app.
Re: ESP32 Ble Mesh internet gateway
Its hard to say i tested it.
I am trying to make C++ ble mesh library, which allows to quick and easy build any device solution. In meantime i am also trying to make ble mesh gateway, which may be useful as a product for my company.
Its just beginning of the project, but I already have working (sort of) provisioner, which allows me to find unprovisioned devices, then display them on web UI. From web UI i can start provisioning procedure. Then i can read composition data, assign app keys and bind app keys.
My PoC project can communicate over mqtt or ws so far. As i am building it alone and trying to make web UI interface and whole esp32 library, it takes time, but i can say it possible to do it.
I am trying to make C++ ble mesh library, which allows to quick and easy build any device solution. In meantime i am also trying to make ble mesh gateway, which may be useful as a product for my company.
Its just beginning of the project, but I already have working (sort of) provisioner, which allows me to find unprovisioned devices, then display them on web UI. From web UI i can start provisioning procedure. Then i can read composition data, assign app keys and bind app keys.
My PoC project can communicate over mqtt or ws so far. As i am building it alone and trying to make web UI interface and whole esp32 library, it takes time, but i can say it possible to do it.
Re: ESP32 Ble Mesh internet gateway
Great work chegewara. is the provisoner able to read state of nodes? if it is able to read then its fine. it can be used as gateway.chegewara wrote: ↑Mon Mar 04, 2024 11:43 amIts hard to say i tested it.
I am trying to make C++ ble mesh library, which allows to quick and easy build any device solution. In meantime i am also trying to make ble mesh gateway, which may be useful as a product for my company.
Its just beginning of the project, but I already have working (sort of) provisioner, which allows me to find unprovisioned devices, then display them on web UI. From web UI i can start provisioning procedure. Then i can read composition data, assign app keys and bind app keys.
My PoC project can communicate over mqtt or ws so far. As i am building it alone and trying to make web UI interface and whole esp32 library, it takes time, but i can say it possible to do it.
Who is online
Users browsing this forum: Majestic-12 [Bot] and 80 guests