I'm testing cypress mesh solution the below environment.
-. KIT : CYBT-213043-MESH
-. IDE : ModusToolbox 1.1
-. BT SDK 1.4
-. Code Example : Download BT SDK 1.4 example from GIT
-. Test : mesh location client / server among snip folder in code example.
The mesh code examples provided by cypress are example codes based on the HCI control command.
But, I need stand-alone example code for my mesh application.
Question 1 : Could you provide me with an example for a stand-alone type mesh application that I mean?
(Additional, I need an example code to receive a provisioning from remote (ex, client control android app))
I'm trying to replace the HCI control-based example code provided by Cypress with the stand-alone example I'm talking about.i
In this process, I have the following questions.
From the mesh_location_client.c file of the mesh location code example, I can see "mesh_app_proc_rx_cmd" function.
In this function, I can see "wiced_bt_mesh_create_event_from_wiced_hci" function.
But,The "wiced_bt_mesh_create_event_from_wiced_hci" fucntion be calloed with HCI controlled command.
Because I have to make the stand-alone mesh application, I can call "wiced_bt_mesh_create_event" function instead of "wiced_bt_mesh_create_event_from_wiced_hci" function
Question 2 : For stand-alone project, If I need to call "wiced_bt_mesh_create_event" function directly, how can I put app_key_idx among the function argument?
(For reference, in the case of the HIC controll method, the value of the command packet is parsed and inserted)
Question 3: In case of "wiced_bt_mesh_create_event" function, I can the description below.
But, I can not understand fully about the function call.
Please explain in detail so that I can understand???
* \brief Create mesh event for an unsolicited message.
* \details In case dst is 0 the function takes all information from the model's publication or fails if publication is not configured for the specified model.
* In case non-0 dst the function uses specified dst and app_key_idx and fills all other fields with default values.
* In special case with company_id equals to 0xffff the function creates a message event with default ttl.
* @param element_index Element index.
* @param company_id Company ID.
* @param model_id Model ID.
* @param dst Destination address. If parameter is 0, the function finds publication and take uses its fields for the mesh event.
* @param app_key_idx Global app key index. The parameter is ignored if dst is equal to 0. The 0xffff means device key.
* @return p_event Pointer to a newly allocated mesh event.
wiced_bt_mesh_event_t *wiced_bt_mesh_create_event(uint8_t element_index, uint16_t company_id, uint16_t model_id, uint16_t dst, uint16_t app_key_idx);
Question 4: In order to make my desired stand alone mesh application, after provisioning the device, the device should store the provisioning information in internal flash memory. Is it right?
How can I get provisioning information if needed?
If I call the "wiced_bt_mesh_create_event" function, I need the app_key_idx value after provisioning.