Hi all,
I am working on the sensor client/server example and have successfully setup the project for 1 client and 1 server. I want to add another server node (1 client, 2 servers), and it looks like the second server node is provisioned correctly, but when I try to request data, one of the nodes responds with W (64289) BLE_MESH: No matching TX context for ack. I added a second set of ESP_BLE_MESH_MODEL_PUB_DEFINE() for sensor setup and sensor server and also added another model for the second node, but it still looks like I can't receive data from both of them. Here is the setup code for my application:
ESP_BLE_MESH_MODEL_PUB_DEFINE(sensor_pub, 20, ROLE_NODE);
static esp_ble_mesh_sensor_srv_t sensor_server = {
.rsp_ctrl.get_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.rsp_ctrl.set_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.state_count = ARRAY_SIZE(sensor_states),
.states = sensor_states,
};
ESP_BLE_MESH_MODEL_PUB_DEFINE(sensor_setup_pub, 20, ROLE_NODE);
static esp_ble_mesh_sensor_setup_srv_t sensor_setup_server = {
.rsp_ctrl.get_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.rsp_ctrl.set_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.state_count = ARRAY_SIZE(sensor_states),
.states = sensor_states,
};
//sensor node 2
ESP_BLE_MESH_MODEL_PUB_DEFINE(sensor_pub2, 20, ROLE_NODE);
static esp_ble_mesh_sensor_srv_t sensor_server2 = {
.rsp_ctrl.get_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.rsp_ctrl.set_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.state_count = ARRAY_SIZE(sensor_states),
.states = sensor_states,
};
ESP_BLE_MESH_MODEL_PUB_DEFINE(sensor_setup_pub2, 20, ROLE_NODE);
static esp_ble_mesh_sensor_setup_srv_t sensor_setup_server2 = {
.rsp_ctrl.get_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.rsp_ctrl.set_auto_rsp = ESP_BLE_MESH_SERVER_RSP_BY_APP,
.state_count = ARRAY_SIZE(sensor_states),
.states = sensor_states,
};
static esp_ble_mesh_model_t root_models[] = {
ESP_BLE_MESH_MODEL_CFG_SRV(&config_server),
ESP_BLE_MESH_MODEL_SENSOR_SRV(&sensor_pub, &sensor_server),
ESP_BLE_MESH_MODEL_SENSOR_SETUP_SRV(&sensor_setup_pub, &sensor_setup_server),
};
static esp_ble_mesh_model_t extend_models[] = {
ESP_BLE_MESH_MODEL_SENSOR_SRV(&sensor_pub2, &sensor_server2),
ESP_BLE_MESH_MODEL_SENSOR_SETUP_SRV(&sensor_setup_pub2, &sensor_setup_server2),
};
static esp_ble_mesh_elem_t elements[] = {
ESP_BLE_MESH_ELEMENT(0, root_models, ESP_BLE_MESH_MODEL_NONE),
ESP_BLE_MESH_ELEMENT(0, extend_models, ESP_BLE_MESH_MODEL_NONE),
};
static esp_ble_mesh_comp_t composition = {
.cid = CID_ESP,
.elements = elements,
.element_count = ARRAY_SIZE(elements),
};
static esp_ble_mesh_prov_t provision = {
.uuid = dev_uuid,
};
Looking at the logs, I can see unique addresses and id's for each sensor node, but i'm not sure the best way to use the main client node to request data from both of them. Currently the example says to click the boot button, which works for 1 node device, but doesn't work for 2+ node devices. What is the best plan of attack for this? I am trying to follow the ble_mesh_node example as well. Thanks for any assistance.
-Kyle Garland
Add more devices to sensor server example
-
kg_lunar789
- Posts: 4
- Joined: Tue Nov 09, 2021 4:12 am
Return to “General Discussion”
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- ESP32-S31
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- ESP32-S31 中文讨论版
- 喵伴 中文讨论版
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: Amazon [Bot], PerplexityBot and 1 guest
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.
Information
Espressif ESP32 ... Available now!