fixed uninitialized node addr that causes bug in upstream ota
This commit is contained in:
parent
a930f709ff
commit
8e614e76c7
|
@ -320,13 +320,15 @@ bool bMeshNetworkCheckMacEquality(const uint8_t* const cpcu8aMAC, const uint8_t*
|
||||||
bool bRet = true;
|
bool bRet = true;
|
||||||
uint8_t index = 0;
|
uint8_t index = 0;
|
||||||
|
|
||||||
while ((index < 10) && (bRet == true))
|
while ((index < 5) && (bRet == true))
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "MACequal: check %x and %x",cpcu8aMAC[index], cpcu8bMAC[index] );
|
||||||
if(cpcu8aMAC[index] != cpcu8bMAC[index])
|
if(cpcu8aMAC[index] != cpcu8bMAC[index])
|
||||||
{
|
{
|
||||||
bRet = false;
|
bRet = false;
|
||||||
|
ESP_LOGI(LOG_TAG, "MACequal: differ %x and %x",cpcu8aMAC[index], cpcu8bMAC[index] );
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if(index == 5)
|
if(index == 5)
|
||||||
{
|
{
|
||||||
//last byte of mac
|
//last byte of mac
|
||||||
|
@ -338,6 +340,17 @@ bool bMeshNetworkCheckMacEquality(const uint8_t* const cpcu8aMAC, const uint8_t*
|
||||||
*/
|
*/
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(bRet)
|
||||||
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "MAC same");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "MAC NOT same");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -393,6 +406,8 @@ esp_err_t errMeshNetworkGetChildren(mesh_addr_t* const cpChildren, uint16_t* con
|
||||||
mesh_addr_t route_table[CONFIG_MESH_ROUTE_TABLE_SIZE];
|
mesh_addr_t route_table[CONFIG_MESH_ROUTE_TABLE_SIZE];
|
||||||
ERROR_CHECK(esp_mesh_get_routing_table((mesh_addr_t *) &route_table, (CONFIG_MESH_ROUTE_TABLE_SIZE * 6), &route_table_size));
|
ERROR_CHECK(esp_mesh_get_routing_table((mesh_addr_t *) &route_table, (CONFIG_MESH_ROUTE_TABLE_SIZE * 6), &route_table_size));
|
||||||
|
|
||||||
|
ESP_LOGI(LOG_TAG, "child: own Node: \"0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\" ", u8ownMAC[0], u8ownMAC[1], u8ownMAC[2], u8ownMAC[3], u8ownMAC[4], u8ownMAC[5]);
|
||||||
|
|
||||||
if (err == ESP_OK)
|
if (err == ESP_OK)
|
||||||
{
|
{
|
||||||
for(uint16_t index = 0; index < esp_mesh_get_routing_table_size(); index++)
|
for(uint16_t index = 0; index < esp_mesh_get_routing_table_size(); index++)
|
||||||
|
@ -400,7 +415,7 @@ esp_err_t errMeshNetworkGetChildren(mesh_addr_t* const cpChildren, uint16_t* con
|
||||||
if(! (bMeshNetworkCheckMacEquality(u8ownMAC, route_table[index].addr)) )
|
if(! (bMeshNetworkCheckMacEquality(u8ownMAC, route_table[index].addr)) )
|
||||||
{
|
{
|
||||||
//child node
|
//child node
|
||||||
//ESP_LOGI(LOG_TAG, "adding Node: \"0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\" ", route_table[index].addr[0], route_table[index].addr[1], route_table[index].addr[2], route_table[index].addr[3], route_table[index].addr[4], route_table[index].addr[5]);
|
ESP_LOGI(LOG_TAG, "CHILDADD Node: \"0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x\" ", route_table[index].addr[0], route_table[index].addr[1], route_table[index].addr[2], route_table[index].addr[3], route_table[index].addr[4], route_table[index].addr[5]);
|
||||||
cpChildren[*cpu16ChildrenSize] = route_table[index];
|
cpChildren[*cpu16ChildrenSize] = route_table[index];
|
||||||
(*cpu16ChildrenSize) = (*cpu16ChildrenSize)+1;
|
(*cpu16ChildrenSize) = (*cpu16ChildrenSize)+1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ void vMeshOtaTaskOTAWorker(void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
xSemaphoreGive(bsOTAProcess); //free binary semaphore, this allows other tasks to start the OTA process
|
xSemaphoreGive(bsOTAProcess); //free binary semaphore, this allows other tasks to start the OTA process
|
||||||
ERROR_CHECK(errMeshOtaSlaveEndpoint(&bNewOTAImage));
|
ERROR_CHECK(errMeshOtaSlaveEndpoint(&bNewOTAImage, &meshNodeAddr));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -231,6 +231,9 @@ void vMeshOtaTaskOTAWorker(void *arg)
|
||||||
//set want reboot
|
//set want reboot
|
||||||
ESP_LOGI(LOG_TAG, "Updated successfully via Mesh, set pending reboot");
|
ESP_LOGI(LOG_TAG, "Updated successfully via Mesh, set pending reboot");
|
||||||
bWantReboot = true;
|
bWantReboot = true;
|
||||||
|
|
||||||
|
ESP_LOGI(LOG_TAG, "Succ updated from MAC: \"%x:%x:%x:%x:%x:%x\" ", meshNodeAddr.addr[0], meshNodeAddr.addr[1], meshNodeAddr.addr[2], meshNodeAddr.addr[3], meshNodeAddr.addr[4], meshNodeAddr.addr[5]);
|
||||||
|
|
||||||
vMeshOtaUtilAddAllNeighboursToQueue(&meshNodeAddr); //add all existing neighbours to queue
|
vMeshOtaUtilAddAllNeighboursToQueue(&meshNodeAddr); //add all existing neighbours to queue
|
||||||
}
|
}
|
||||||
vTaskDelay( (1000) / portTICK_PERIOD_MS);
|
vTaskDelay( (1000) / portTICK_PERIOD_MS);
|
||||||
|
@ -248,7 +251,7 @@ void vMeshOtaTaskOTAWorker(void *arg)
|
||||||
* Answers the OTA_Version_Request with OTA_Version_Response
|
* Answers the OTA_Version_Request with OTA_Version_Response
|
||||||
* calls errMeshOtaPartitionAccessMeshReceive OR errMeshOtaPartitionAccessMeshTransmit based on version number
|
* calls errMeshOtaPartitionAccessMeshReceive OR errMeshOtaPartitionAccessMeshTransmit based on version number
|
||||||
*/
|
*/
|
||||||
esp_err_t errMeshOtaSlaveEndpoint(bool* const cpbNewOTAImage)
|
esp_err_t errMeshOtaSlaveEndpoint(bool* const cpbNewOTAImage, mesh_addr_t* const cpcMeshNodeAddr)
|
||||||
{
|
{
|
||||||
esp_err_t err = ESP_OK;
|
esp_err_t err = ESP_OK;
|
||||||
MESH_PACKET_t sOTAMessage;
|
MESH_PACKET_t sOTAMessage;
|
||||||
|
@ -270,6 +273,8 @@ esp_err_t errMeshOtaSlaveEndpoint(bool* const cpbNewOTAImage)
|
||||||
{
|
{
|
||||||
xSemaphoreTake(bsOTAProcess, portMAX_DELAY); //wait for binary semaphore that allows to start the OTA process
|
xSemaphoreTake(bsOTAProcess, portMAX_DELAY); //wait for binary semaphore that allows to start the OTA process
|
||||||
|
|
||||||
|
memcpy(cpcMeshNodeAddr, &sOTAMessage.meshSenderAddr, sizeof(mesh_addr_t));
|
||||||
|
|
||||||
cpBootPartition = esp_ota_get_boot_partition(); //get boot partition (that will booted after reset), not the running partition
|
cpBootPartition = esp_ota_get_boot_partition(); //get boot partition (that will booted after reset), not the running partition
|
||||||
ERROR_CHECK(esp_ota_get_partition_description(cpBootPartition, &bootPartitionDesc)); //get metadata of partition
|
ERROR_CHECK(esp_ota_get_partition_description(cpBootPartition, &bootPartitionDesc)); //get metadata of partition
|
||||||
|
|
||||||
|
@ -317,6 +322,7 @@ esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t
|
||||||
esp_app_desc_t bootPartitionDesc; //Metadata from boot partition
|
esp_app_desc_t bootPartitionDesc; //Metadata from boot partition
|
||||||
bool bNodeIsConnected = false;
|
bool bNodeIsConnected = false;
|
||||||
bool bNodeIsResponding = false;
|
bool bNodeIsResponding = false;
|
||||||
|
bool bSameVersion = false;
|
||||||
|
|
||||||
*cpbNewOTAImage = false; //set default false
|
*cpbNewOTAImage = false; //set default false
|
||||||
|
|
||||||
|
@ -326,20 +332,26 @@ esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t
|
||||||
xSemaphoreTake(bsOTAProcess, portMAX_DELAY); //wait for binary semaphore that allows to start the OTA process
|
xSemaphoreTake(bsOTAProcess, portMAX_DELAY); //wait for binary semaphore that allows to start the OTA process
|
||||||
|
|
||||||
ERROR_CHECK(errMeshOtaUtilSendOtaVersionRequest(cpcMeshNodeAddr)); //send OTA_VERSION_REQUEST with local version in payload
|
ERROR_CHECK(errMeshOtaUtilSendOtaVersionRequest(cpcMeshNodeAddr)); //send OTA_VERSION_REQUEST with local version in payload
|
||||||
|
ESP_LOGI(LOG_TAG, "MASTER: sent Request to %x", cpcMeshNodeAddr->addr[5]);
|
||||||
|
|
||||||
for (uint32_t u32Index = 0; u32Index < QUEUE_MESSAGE_OTA_SIZE; u32Index++) //loop through all OTA messages
|
for (uint32_t u32Index = 0; ((u32Index < QUEUE_MESSAGE_OTA_SIZE) && (bSameVersion == false)); u32Index++) //loop through all OTA messages
|
||||||
{
|
|
||||||
if(uxQueueSpacesAvailable(queueMessageOTA) < QUEUE_MESSAGE_OTA_SIZE)
|
|
||||||
{
|
{
|
||||||
|
//if(uxQueueSpacesAvailable(queueMessageOTA) < QUEUE_MESSAGE_OTA_SIZE)
|
||||||
|
// {
|
||||||
//queue not empty
|
//queue not empty
|
||||||
if (xQueueReceive(queueMessageOTA, &sOTAMessage, ((3000) / portTICK_PERIOD_MS)) != pdTRUE)
|
if (xQueueReceive(queueMessageOTA, &sOTAMessage, ((3000) / portTICK_PERIOD_MS)) != pdTRUE)
|
||||||
{
|
{
|
||||||
ESP_LOGE(LOG_TAG, "MASTER: Unable to receive OTA Messages from queue");
|
ESP_LOGE(LOG_TAG, "MASTER: Unable to receive OTA Messages from queue");
|
||||||
err = ESP_FAIL;
|
err = ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "MASTER: rec message: %i", sOTAMessage.type);
|
||||||
|
}
|
||||||
|
|
||||||
if((err == ESP_OK) && (sOTAMessage.type == OTA_Version_Response) && (bMeshNetworkCheckMacEquality(sOTAMessage.meshSenderAddr.addr, cpcMeshNodeAddr->addr))) //if OTA_Version_Request
|
if((err == ESP_OK) && (sOTAMessage.type == OTA_Version_Response) && (bMeshNetworkCheckMacEquality(sOTAMessage.meshSenderAddr.addr, cpcMeshNodeAddr->addr))) //if OTA_Version_Request
|
||||||
{
|
{
|
||||||
|
bSameVersion = true;
|
||||||
bNodeIsResponding = true;
|
bNodeIsResponding = true;
|
||||||
cpBootPartition = esp_ota_get_boot_partition(); //get boot partition (that will booted after reset), not the running partition
|
cpBootPartition = esp_ota_get_boot_partition(); //get boot partition (that will booted after reset), not the running partition
|
||||||
ERROR_CHECK(esp_ota_get_partition_description(cpBootPartition, &bootPartitionDesc)); //get metadata of partition
|
ERROR_CHECK(esp_ota_get_partition_description(cpBootPartition, &bootPartitionDesc)); //get metadata of partition
|
||||||
|
@ -347,29 +359,42 @@ esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t
|
||||||
if((bMeshOtaUtilNewerVersion((bootPartitionDesc).version, (char*) sOTAMessage.au8Payload)) && (err == ESP_OK)) //compare local and remote version
|
if((bMeshOtaUtilNewerVersion((bootPartitionDesc).version, (char*) sOTAMessage.au8Payload)) && (err == ESP_OK)) //compare local and remote version
|
||||||
{
|
{
|
||||||
//remote newer as local
|
//remote newer as local
|
||||||
|
bSameVersion = false;
|
||||||
ESP_LOGI(LOG_TAG, "MASTER: remote image on node is newer --> OTA update required from node \"%x:%x:%x:%x:%x:%x\"", sOTAMessage.meshSenderAddr.addr[0], sOTAMessage.meshSenderAddr.addr[1], sOTAMessage.meshSenderAddr.addr[2], sOTAMessage.meshSenderAddr.addr[3], sOTAMessage.meshSenderAddr.addr[4], sOTAMessage.meshSenderAddr.addr[5]);
|
ESP_LOGI(LOG_TAG, "MASTER: remote image on node is newer --> OTA update required from node \"%x:%x:%x:%x:%x:%x\"", sOTAMessage.meshSenderAddr.addr[0], sOTAMessage.meshSenderAddr.addr[1], sOTAMessage.meshSenderAddr.addr[2], sOTAMessage.meshSenderAddr.addr[3], sOTAMessage.meshSenderAddr.addr[4], sOTAMessage.meshSenderAddr.addr[5]);
|
||||||
// --> this version older --> start OTA_Rx --> set cpbNewOTAImage true
|
// --> this version older --> start OTA_Rx --> set cpbNewOTAImage true
|
||||||
ERROR_CHECK(errMeshOtaPartitionAccessMeshReceive(cpbNewOTAImage, &sOTAMessage.meshSenderAddr));
|
ERROR_CHECK(errMeshOtaPartitionAccessMeshReceive(cpbNewOTAImage, &sOTAMessage.meshSenderAddr));
|
||||||
|
u32Index = QUEUE_MESSAGE_OTA_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((bMeshOtaUtilNewerVersion((char*) sOTAMessage.au8Payload, (bootPartitionDesc).version)) && (err == ESP_OK)) //compare remote and local version
|
if((bMeshOtaUtilNewerVersion((char*) sOTAMessage.au8Payload, (bootPartitionDesc).version)) && (err == ESP_OK)) //compare remote and local version
|
||||||
{
|
{
|
||||||
//local newer as remote
|
//local newer as remote
|
||||||
|
bSameVersion = false;
|
||||||
ESP_LOGI(LOG_TAG, "MASTER: remote image on node is older --> OTA send required to node \"%x:%x:%x:%x:%x:%x\"", sOTAMessage.meshSenderAddr.addr[0], sOTAMessage.meshSenderAddr.addr[1], sOTAMessage.meshSenderAddr.addr[2], sOTAMessage.meshSenderAddr.addr[3], sOTAMessage.meshSenderAddr.addr[4], sOTAMessage.meshSenderAddr.addr[5]);
|
ESP_LOGI(LOG_TAG, "MASTER: remote image on node is older --> OTA send required to node \"%x:%x:%x:%x:%x:%x\"", sOTAMessage.meshSenderAddr.addr[0], sOTAMessage.meshSenderAddr.addr[1], sOTAMessage.meshSenderAddr.addr[2], sOTAMessage.meshSenderAddr.addr[3], sOTAMessage.meshSenderAddr.addr[4], sOTAMessage.meshSenderAddr.addr[5]);
|
||||||
// --> this version newer --> start OTA_Tx
|
// --> this version newer --> start OTA_Tx
|
||||||
ERROR_CHECK(errMeshOtaPartitionAccessMeshTransmit(&sOTAMessage.meshSenderAddr));
|
ERROR_CHECK(errMeshOtaPartitionAccessMeshTransmit(&sOTAMessage.meshSenderAddr));
|
||||||
|
u32Index = QUEUE_MESSAGE_OTA_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(bSameVersion == true)
|
||||||
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "MASTER: same version --> NO OTA update");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* }
|
||||||
else if (err == ESP_OK)
|
else if (err == ESP_OK)
|
||||||
{
|
{
|
||||||
//received from wrong node or type --> back to queue
|
//received from wrong node or type --> back to queue
|
||||||
vMeshOtaUtilAddOtaMessageToQueue(&sOTAMessage);
|
vMeshOtaUtilAddOtaMessageToQueue(&sOTAMessage);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// OTA Message queue is empty --> wait some time
|
// OTA Message queue is empty --> wait some time
|
||||||
ESP_LOGD(LOG_TAG, "OTA-Master: OTA Message queue is empty --> wait some time");
|
ESP_LOGI(LOG_TAG, "OTA-Master: OTA Message queue is empty --> wait some time");
|
||||||
vTaskDelay( (1000/QUEUE_MESSAGE_OTA_SIZE) / portTICK_PERIOD_MS);
|
vTaskDelay( (1000/QUEUE_MESSAGE_OTA_SIZE) / portTICK_PERIOD_MS);
|
||||||
}
|
}
|
||||||
}//end loop
|
}//end loop
|
||||||
|
@ -382,5 +407,8 @@ esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t
|
||||||
ESP_LOGI(LOG_TAG, "OTA-Master: connected and NOT responding --> add node back to queue ");
|
ESP_LOGI(LOG_TAG, "OTA-Master: connected and NOT responding --> add node back to queue ");
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(cpcMeshNodeAddr->addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(cpcMeshNodeAddr->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ESP_LOGI(LOG_TAG, "OTA-Master: return with %i ", err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,11 +287,13 @@ void vMeshOtaUtilAddAllNeighboursToQueue(const mesh_addr_t* const cpcMeshNodeAdd
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "AddAllNodes: parent: %x - %x", addrParent.addr[5], cpcMeshNodeAddr->addr[5]);
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(addrParent.addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(addrParent.addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "AddAllNodes: NULL parent");
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(addrParent.addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(addrParent.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,11 +313,13 @@ void vMeshOtaUtilAddAllNeighboursToQueue(const mesh_addr_t* const cpcMeshNodeAdd
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "AddAllNodes: Child: %x", childrenAddr[u16Index].addr[5]);
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(childrenAddr[u16Index].addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(childrenAddr[u16Index].addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(LOG_TAG, "AddAllNodes: NULL Child: %x", childrenAddr[u16Index].addr[5]);
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(childrenAddr[u16Index].addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(childrenAddr[u16Index].addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,7 +370,7 @@ void vMeshOtaUtilClearNeighboursQueue(const mesh_addr_t* const cpcMeshNodeAddr)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ESP_LOGI(LOG_TAG, "//node is NOT cpcMeshNodeAddr: %i --> keep it in queue", sNode.addr[5]);
|
ESP_LOGI(LOG_TAG, "//node is NOT cpcMeshNodeAddr: %x --> keep it in queue", sNode.addr[5]);
|
||||||
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(sNode.addr);
|
vMeshOtaUtilAddNodeToPossibleUpdatableQueue(sNode.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -422,14 +426,14 @@ void vMeshOtaUtilAddOtaMessageToQueue(const MESH_PACKET_t* const cpcuMeshPacket)
|
||||||
switch (cpcuMeshPacket->type)
|
switch (cpcuMeshPacket->type)
|
||||||
{
|
{
|
||||||
case OTA_Abort:
|
case OTA_Abort:
|
||||||
ESP_LOGD(LOG_TAG, "added ota message to queue: OTA_Abort from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
ESP_LOGI(LOG_TAG, "added ota message to queue: OTA_Abort from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
||||||
break;
|
break;
|
||||||
case OTA_Version_Request:
|
case OTA_Version_Request:
|
||||||
ESP_LOGD(LOG_TAG, "added ota message to queue: OTA_Version_Request from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
ESP_LOGI(LOG_TAG, "added ota message to queue: OTA_Version_Request from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OTA_Version_Response:
|
case OTA_Version_Response:
|
||||||
ESP_LOGD(LOG_TAG, "added ota message to queue: OTA_Version Response from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
ESP_LOGI(LOG_TAG, "added ota message to queue: OTA_Version Response from 0x%x", cpcuMeshPacket->meshSenderAddr.addr[5]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -43,7 +43,7 @@ void vMeshOtaTaskServerWorker(void *arg);
|
||||||
void vMeshOtaTaskOTAWorker(void *arg);
|
void vMeshOtaTaskOTAWorker(void *arg);
|
||||||
|
|
||||||
//OTA process endpoints
|
//OTA process endpoints
|
||||||
esp_err_t errMeshOtaSlaveEndpoint(bool* const cpbNewOTAImage);
|
esp_err_t errMeshOtaSlaveEndpoint(bool* const cpbNewOTAImage, mesh_addr_t* const cpcMeshNodeAddr);
|
||||||
esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t* const cpcMeshNodeAddr);
|
esp_err_t errMeshOtaMasterEndpoint(bool* const cpbNewOTAImage, const mesh_addr_t* const cpcMeshNodeAddr);
|
||||||
|
|
||||||
#endif /* H_MESH_OTA */
|
#endif /* H_MESH_OTA */
|
||||||
|
|
|
@ -247,15 +247,6 @@ TEST_CASE("same MACs last B_byte+2", "[check MAC equality]")
|
||||||
TEST_ASSERT_TRUE( bMeshNetworkCheckMacEquality(cMAC_A,cMAC_B) );
|
TEST_ASSERT_TRUE( bMeshNetworkCheckMacEquality(cMAC_A,cMAC_B) );
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("different MACs last B_byte+2", "[check MAC equality]")
|
|
||||||
{
|
|
||||||
unsigned char cMAC_A[] = "012344678901";
|
|
||||||
unsigned char cMAC_B[] = "012345678903";
|
|
||||||
|
|
||||||
TEST_ASSERT_FALSE( bMeshNetworkCheckMacEquality(cMAC_A,cMAC_B) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("same Node0", "[check MAC equality]")
|
TEST_CASE("same Node0", "[check MAC equality]")
|
||||||
{
|
{
|
||||||
unsigned char cMAC_A[] = "ac67b27162b0";
|
unsigned char cMAC_A[] = "ac67b27162b0";
|
||||||
|
|
|
@ -32,7 +32,7 @@ CONFIG_APP_COMPILE_TIME_DATE=y
|
||||||
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
|
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
|
||||||
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
|
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
|
||||||
CONFIG_APP_PROJECT_VER_FROM_CONFIG=y
|
CONFIG_APP_PROJECT_VER_FROM_CONFIG=y
|
||||||
CONFIG_APP_PROJECT_VER="0.0.40"
|
CONFIG_APP_PROJECT_VER="0.0.46"
|
||||||
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
|
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
|
||||||
# end of Application manager
|
# end of Application manager
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue