BLE mesh: Send message to group address
Posted: Thu Aug 08, 2019 2:11 pm
I achieved to implement a provisioner which is able to:
- provision a node
- add and bind an application keys to both local client models as the server models in the node
I think that I was also able to add a subscription to a group address (100) to the model in the node. When I try to do so I get following logs:
So, I think I'm doing things right uptill here.
Though, if I now try to send a message to the OnOff client using the group address (100) with the generic OnOff api, I get folowing error:
This makes sense as the api seems to check for the destination address in the list of provisioned devices mesh_nodes based upon its unicast address. The group address is of course not present in this list.
Could someone help me out how I can get my OnOff set message to my OnOff Client using the group address?
- provision a node
- add and bind an application keys to both local client models as the server models in the node
I think that I was also able to add a subscription to a group address (100) to the model in the node. When I try to do so I get following logs:
Code: Select all
I (846956) BLUETOOTH: esp_ble_mesh_config_client_cb, error_code = 0x00, event = 0x01, addr: 0x0005, opcode: 0x801b
I (846956) BLUETOOTH: ESP_BLE_MESH_MODEL_OP_MODEL_SUB_ADD
add_group_address:status=1,sub_addr=100,element_addr=5,model_id=4096
Though, if I now try to send a message to the OnOff client using the group address (100) with the generic OnOff api, I get folowing error:
Code: Select all
E (872896) BLE_MESH: model_send, Failed to check DST
E (872896) BLE_MESH: gen_set_state, Failed to send Generic Set message (err -22)
I (872916) BLUETOOTH: esp_ble_mesh_generic_client_cb, error_code = 0xffffffea, event = 0x01, addr: 0x0064, opcode: 0x8203
E (872926) BLUETOOTH: Send generic client message failed, opcode 0x8203
Could someone help me out how I can get my OnOff set message to my OnOff Client using the group address?