I am using PrototypingKit (CY8CPROTO-062-4343W) with ModusToolbox. Taking the "AnyCloud_OTA_Using_MQTT" example directly, I build the project. Then two questions come to my way, hope somebody could help to explain what happens here. Thanks very much.
In another way to ask:
/* MQTT topics */
const char * my_topics[ MQTT_TOPIC_FILTER_NUM ] =
"anycloud/test/ota/image", // original topic to upgrade fw of prototypingKit
"anycloud/test/ota/my_another_module" // another topic to upgrade fw of external module by OTA
How can distinguish topics based on cb_arg ?
|void ota_callback(cy_ota_cb_reason_t reason, uint32_t value, void *cb_arg )|
Can you elaborate more on your first query? Do you want to understand how the OTA image upgradation happens or the query is related to the MQTT topic which is used to upgrade the firmware of the prototyping kit?
thanks for your response.
Actually to make the question more simple:
I want to have two OTA targets on the prototypingKit. One is the image for prototypingKit itself. Another one is the image for another subsystem hooked on prototypingKit by UART. I want to have the possibility of upgrade both of them. But from the callback function, I can't tell which system the downloading image is going to upgrade.
Currently I am doing something not nice work-around. Is there any suggestions, or existed solution?