Page 1 of 1

一组esp32 ble mesh设备能否实现上电自动配网?

Posted: Tue Jul 14, 2020 1:02 am
by jayant97
我的需求是:一组esp32,烧录完全相同的代码,在上电时自动组成ble mesh网络,目前有两个想法:

1. 能否直接把NetKey和AppKey写到代码中,从而跳过provisioning过程,上电便自动组网?

2. 能否通过修改fast provision例程,去掉手机配置的环节,直接上电就自动配置周围的设备,从而形成一个网络?

Re: 一组esp32 ble mesh设备能否实现上电自动配网?

Posted: Thu Jul 30, 2020 9:30 am
by esp_liu
jayant97 wrote:
Tue Jul 14, 2020 1:02 am
我的需求是:一组esp32,烧录完全相同的代码,在上电时自动组成ble mesh网络,目前有两个想法:

1. 能否直接把NetKey和AppKey写到代码中,从而跳过provisioning过程,上电便自动组网?

2. 能否通过修改fast provision例程,去掉手机配置的环节,直接上电就自动配置周围的设备,从而形成一个网络?
Hi jayant97,

ESP BLE Mesh provides some functions for test, and one of them is to bypass the provisioning procedure.

The function is "bt_mesh_device_auto_enter_network" which is in components/bt/esp_ble_mesh/mesh_core/test.c

In the application layer, users can use this function to enable entering mesh network automatically for the unprovisioned devices.

But this function is only used for test, as for a production, the provisioning procedure is mandatory.

Thanks.