ESP BLE Mesh v0.6 Released, SIG Certified

Benbu2018
Posts: 5
Joined: Tue May 28, 2019 7:51 pm

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Benbu2018 » Mon Jun 17, 2019 5:45 am

Hi Espressif,
I'm trying to use the fast_prov_server and fast_prov_client example on my two esp32 chips.

After the server send fast_prov_status_send_comp_evt: opcode 0xc702e5 message

Code: Select all

I (66508) FAST_PROV_SERVER_DEMO: example_ble_mesh_custom_model_cb: Fast prov server receives msg, opcode 0xc602e5
I (66508) FAST_PROV_SERVER_DEMO: ESP_BLE_MESH_MODEL_SEND_COMP_EVT, err_code 0
I (66518) FAST_PROV_SERVER: example_handle_fast_prov_status_send_comp_evt: opcode 0xc702e5
The client side of another ESP32 shows an error:

Code: Select all

I (71843) FAST_PROV_CLIENT_DEMO: ESP_BLE_MESH_MODEL_SEND_COMP_EVT, err_code 0
E (71893) BLE_MESH: bt_mesh_model_recv, Too short message for OpCode 0x00c702e5
From the client-side, I checked the buf->len. It was initially 3 bytes. After extract the opcode, it becomes 0 bytes. And it is smaller than the op->min_len:2 bytes.

How can I fix this error? Thank you!

Wangcheng
Posts: 73
Joined: Wed Mar 06, 2019 3:26 am

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Wangcheng » Mon Jun 17, 2019 6:04 am

Benbu2018 wrote:
Mon Jun 17, 2019 5:45 am
Hi Espressif,
I'm trying to use the fast_prov_server and fast_prov_client example on my two esp32 chips.

After the server send fast_prov_status_send_comp_evt: opcode 0xc702e5 message

Code: Select all

I (66508) FAST_PROV_SERVER_DEMO: example_ble_mesh_custom_model_cb: Fast prov server receives msg, opcode 0xc602e5
I (66508) FAST_PROV_SERVER_DEMO: ESP_BLE_MESH_MODEL_SEND_COMP_EVT, err_code 0
I (66518) FAST_PROV_SERVER: example_handle_fast_prov_status_send_comp_evt: opcode 0xc702e5
The client side of another ESP32 shows an error:

Code: Select all

I (71843) FAST_PROV_CLIENT_DEMO: ESP_BLE_MESH_MODEL_SEND_COMP_EVT, err_code 0
E (71893) BLE_MESH: bt_mesh_model_recv, Too short message for OpCode 0x00c702e5
From the client-side, I checked the buf->len. It was initially 3 bytes. After extract the opcode, it becomes 0 bytes. And it is smaller than the op->min_len:2 bytes.

How can I fix this error? Thank you!
Hi Benbu2018,
1. You can print the data of the sender and receiver using the macro `ESP_LOG_BUFFER_HEX("data", buf->data, buf->len)`.

2. You can refer to the relevant documentation to help you understand the demo.

3. You also check the selection Component config--"Bluetooth --" BLuetooth controller--"Scan Duplicate Type (Scan Duplicate By Device Address And Advertising Date)

Benbu2018
Posts: 5
Joined: Tue May 28, 2019 7:51 pm

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Benbu2018 » Mon Jun 17, 2019 9:29 am

Thank you for the extra information!
The message sent by the fast provision server chip is for ESP_BLE_MESH_VND_MODEL_OP_FAST_PROV_NODE_ADDR_STATUS. If I only use two ESP32, the buf will only contain the opcode. and the client side will show an error. I have to use 3 ESP32. Two for fast provision server, one for fast provision client. And the third chip must be provisioned by the second fast provision client before provisioned by the primary provisioner.
Is there a way to reduce the op->min_len for this message to zero?
Is there a way to control which provisioner to accept the device?

Benbu2018
Posts: 5
Joined: Tue May 28, 2019 7:51 pm

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Benbu2018 » Thu Jun 20, 2019 8:41 am

Hi Espressif,

For the provisioner, is there a function call to get the unicast address of itself and other nodes. I'm trying to extract node info by calling example_get_node_info().

Is there a way to hard-code the unicast address of all the nodes?

Thank you!

vels3113
Posts: 1
Joined: Fri Jun 28, 2019 2:43 pm

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby vels3113 » Fri Jun 28, 2019 3:53 pm

Dear all,

I try to provision nodes from ble_mesh_node example via meshctl. Meshctl uses bluez v5.50 on Ubuntu 18.04. Meshctl can detect esp device (esp32 devkitc) but can't connect to it printing the following:

Code: Select all

[meshctl]# provision dddd30aea4f487da0000000000000000
Trying to connect Device 30:AE:A4:F4:87:DA ESP-BLE-MESH
Adapter property changed 
[CHG] Controller 6C:71:D9:4F:72:62 Discovering: no
Failed to connect: org.bluez.Error.Failed
I haven't been able to figure out what is the issue so i'll be thankful for any help.

Regards,
Valery

Danialgreen
Posts: 5
Joined: Wed Jul 03, 2019 2:04 am

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Danialgreen » Wed Jul 03, 2019 2:24 am

Hi espressif,

I tried the ESP32 fast provisioner client and server example, I have two questions for modifying the code to meet my system requirements.

1. How can I send customized data from client to server and server to client? Is there a model for this application?

2. After the provision is done and all the present ESP32 becomes nodes of the network, I tried to turn more ESP32 server on to join the mesh network, however, the provisioner seems do not have any responded. Does the provisioner turn the ADV scan off after a certain state?

Please let me know if there's any hint to help me solve my problem. Thank you.

Best regards
Danial

Wangcheng
Posts: 73
Joined: Wed Mar 06, 2019 3:26 am

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Wangcheng » Wed Jul 03, 2019 11:09 am

Danialgreen wrote:
Wed Jul 03, 2019 2:24 am
Hi espressif,

I tried the ESP32 fast provisioner client and server example, I have two questions for modifying the code to meet my system requirements.

1. How can I send customized data from client to server and server to client? Is there a model for this application?

2. After the provision is done and all the present ESP32 becomes nodes of the network, I tried to turn more ESP32 server on to join the mesh network, however, the provisioner seems do not have any responded. Does the provisioner turn the ADV scan off after a certain state?

Please let me know if there's any hint to help me solve my problem. Thank you.

Best regards
Danial
Hi Danial,
1. You can refer to the related documentation in the `ble_mesh_fast_provision` demo. The above two questions are detailed in the documentation that we provide.
2. In this demo, messages are synchronized between nodes and nodes via the vender model, using custom messages.
3. After all devices are connected to the network, the `onoff control message` is sent, and the network does not have the ability to configure the device to access the network.If you do not send the `onoff control message`, the network still has the ability to configure the device to access the network.

Danialgreen
Posts: 5
Joined: Wed Jul 03, 2019 2:04 am

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Danialgreen » Wed Jul 10, 2019 5:54 am

Wangcheng wrote:
Wed Jul 03, 2019 11:09 am
Danialgreen wrote:
Wed Jul 03, 2019 2:24 am
Hi espressif,

I tried the ESP32 fast provisioner client and server example, I have two questions for modifying the code to meet my system requirements.

1. How can I send customized data from client to server and server to client? Is there a model for this application?

2. After the provision is done and all the present ESP32 becomes nodes of the network, I tried to turn more ESP32 server on to join the mesh network, however, the provisioner seems do not have any responded. Does the provisioner turn the ADV scan off after a certain state?

Please let me know if there's any hint to help me solve my problem. Thank you.

Best regards
Danial
Hi Danial,
1. You can refer to the related documentation in the `ble_mesh_fast_provision` demo. The above two questions are detailed in the documentation that we provide.
2. In this demo, messages are synchronized between nodes and nodes via the vender model, using custom messages.
3. After all devices are connected to the network, the `onoff control message` is sent, and the network does not have the ability to configure the device to access the network.If you do not send the `onoff control message`, the network still has the ability to configure the device to access the network.
Hi Cheng,

Thank you for helping me!

If I do not disable the fast provisioning functionality, will Keep receiving the onoff message and listening for new devices at the same time cause any problems?

For sending the custom message, can I use the existing fast provisioning vendor model with a new opcode to send and receive the message(keeps the provisioning function on) or I need to implement another vendor model to do the work?

Danial

Wangcheng
Posts: 73
Joined: Wed Mar 06, 2019 3:26 am

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby Wangcheng » Wed Jul 10, 2019 7:21 am

Danialgreen wrote:
Wed Jul 10, 2019 5:54 am
Wangcheng wrote:
Wed Jul 03, 2019 11:09 am
Danialgreen wrote:
Wed Jul 03, 2019 2:24 am
Hi espressif,

I tried the ESP32 fast provisioner client and server example, I have two questions for modifying the code to meet my system requirements.

1. How can I send customized data from client to server and server to client? Is there a model for this application?

2. After the provision is done and all the present ESP32 becomes nodes of the network, I tried to turn more ESP32 server on to join the mesh network, however, the provisioner seems do not have any responded. Does the provisioner turn the ADV scan off after a certain state?

Please let me know if there's any hint to help me solve my problem. Thank you.

Best regards
Danial
Hi Danial,
1. You can refer to the related documentation in the `ble_mesh_fast_provision` demo. The above two questions are detailed in the documentation that we provide.
2. In this demo, messages are synchronized between nodes and nodes via the vender model, using custom messages.
3. After all devices are connected to the network, the `onoff control message` is sent, and the network does not have the ability to configure the device to access the network.If you do not send the `onoff control message`, the network still has the ability to configure the device to access the network.
Hi Cheng,

Thank you for helping me!

If I do not disable the fast provisioning functionality, will Keep receiving the onoff message and listening for new devices at the same time cause any problems?

For sending the custom message, can I use the existing fast provisioning vendor model with a new opcode to send and receive the message(keeps the provisioning function on) or I need to implement another vendor model to do the work?

Danial
1. For sending the custom message, Both methods are feasible, and the way to add opcode is the easiest to implement.
2. Will not cause any problems. You can make the following changes:
(1)You can modify the code in the event that node receives the onoff message.
(2)Comment out the relevant code. ( disable the fast provisioning functionality)

nitesh2508
Posts: 13
Joined: Wed Jul 17, 2019 8:55 pm

Re: ESP BLE Mesh v0.6 Released, SIG Certified

Postby nitesh2508 » Thu Jul 25, 2019 8:00 pm

Benbu2018 wrote:
Tue May 28, 2019 8:26 pm
Hi Espressif,
I am trying to build a simple mesh network with 2 ESP32 chips periodictly blinking the leds. One ESP32 is provisioner the other one is node, I use the code ble_mesh_provisioner and ble_mesh_node examples.
For the provisioner, I tried to create a new task in app_main() after the ble_mesh_init(). In the task function, it periodiclty calls two functions to send client onoff set message to the node:
esp_ble_mesh_set_msg_common(&common, node, onoff_client.model, ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET);
err = esp_ble_mesh_generic_client_set_state(&common, &set_state);
I tried to configure the parameters inside &common, &set_state. THe remote address is alwasy 0x0005 for the node, so I just fixed it. I also tried get the node information by calling the esp_ble_mesh_get_node_info(addr); However it always end up in kernel panics.
I want to check if there's something wrong with my code? Is there an API to initial these parameters?
Will be appreciated if anyone can give me some help!
Ben
Did you fix this issue i am still going through same problem can u share a snippet of your code?

Who is online

Users browsing this forum: atx823, brushlow18, Google [Bot] and 219 guests