From e5812923ee1ae1298cb9ebf8a095cc62367a399c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Nov 2011 10:14:35 +0100 Subject: Add LCD/LCM compatibility check LCD/LCM compatibility check added to determine whether PC-LCM is compatible with the LCD. Error handling in LCM is added. Depends-On: I6ad7dc8807cb8c407379fe448f06816904253520 ST-Ericsson ID: 362575 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: If5b3c993739f93276e2a76b012a1852d687ad746 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36378 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Vlatko PISTOLOV Tested-by: Vlatko PISTOLOV --- Android.mk | 2 + Makefile | 1 + lcmodule/Makefile | 2 + lcmodule/source/LCM.rc | 4 +- lcmodule/source/LCM.vcproj | 4 + .../include/r_bulk_protocol.h | 3 + .../include/t_bulk_protocol.h | 19 +- .../include/t_r15_transport_layer.h | 1 + .../source/bulk_protocol.c | 121 +- .../include/t_r15_network_layer.h | 2 +- .../source/r15_network_layer.c | 4 +- .../config/error_codes.xml | 1505 ++++++++++---------- .../include/r_communication_service.h | 11 + .../source/communication_service.c | 16 + .../source/lcm_version.c | 16 + source/LCDriver.rc | 4 +- source/LCDriver.vcproj | 4 + source/LCDriverMethods.cpp | 75 +- source/LCDriverMethods.h | 3 + source/LCM/include/t_bulk_protocol.h | 19 +- source/LcdVersion.cpp | 21 + source/LcmInterface.cpp | 46 +- source/LcmInterface.h | 13 + source/config/lcdriver_error_codes.xml | 2 + source/utilities/BulkHandler.cpp | 6 +- source/utilities/BulkHandler.h | 2 +- 26 files changed, 1103 insertions(+), 803 deletions(-) mode change 100755 => 100644 lcmodule/source/LCM.rc create mode 100644 lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c mode change 100755 => 100644 source/LCDriver.rc create mode 100644 source/LcdVersion.cpp diff --git a/Android.mk b/Android.mk index a7dd294..f2dc750 100644 --- a/Android.mk +++ b/Android.mk @@ -162,6 +162,7 @@ LOCAL_SRC_FILES := \ source/LcmInterface.cpp\ source/LCDriverThread.cpp\ source/LCDriverMethods.cpp\ + source/LcdVersion.cpp\ source/LCDriverEntry.cpp\ source/LCDriver.cpp\ source/LCM/Hash.cpp\ @@ -254,6 +255,7 @@ LOCAL_SRC_FILES := \ lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c\ lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c\ lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c\ + lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c\ lcmodule/source/cnh1606344_ldr_communication_module/source/protrom_family.c\ lcmodule/source/cnh1606344_ldr_communication_module/source/z_family.c\ lcmodule/source/cnh1606344_ldr_communication_module/source/r15_family.c\ diff --git a/Makefile b/Makefile index 7438a0a..534681f 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,7 @@ LIBSRC := \ source/LcmInterface.cpp\ source/LCDriverThread.cpp\ source/LCDriverMethods.cpp\ + source/LcdVersion.cpp\ source/LCDriverEntry.cpp\ source/LCDriver.cpp\ source/LCM/Hash.cpp\ diff --git a/lcmodule/Makefile b/lcmodule/Makefile index 0255c8b..a664c0e 100644 --- a/lcmodule/Makefile +++ b/lcmodule/Makefile @@ -55,6 +55,7 @@ LIBSRC :=${TRANSPORT_PATH}/source/bulk_protocol.c\ ${NETWORK_PATH}/source/protrom_header.c\ ${NETWORK_PATH}/source/protrom_network.c\ ${LCM_CNH_PATH}/source/communication_service.c\ + ${LCM_CNH_PATH}/source/lcm_version.c\ ${LCM_CNH_PATH}/source/protrom_family.c\ ${LCM_CNH_PATH}/source/z_family.c\ ${LCM_CNH_PATH}/source/r15_family.c\ @@ -390,6 +391,7 @@ distclean: clean @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_protocol.h \ @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_network.h \ @rm -f ${LCMLDR_INSTALLDIR}/communication_service.c \ + @rm -f ${LCMLDR_INSTALLDIR}/lcm_version.c \ @rm -f ${LCMLDR_INSTALLDIR}/r_protrom_transport.h \ @rm -f ${LCMLDR_INSTALLDIR}/t_protrom_protocol.h \ @rm -f ${LCMLDR_INSTALLDIR}/custom_command_ids.h \ diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc old mode 100755 new mode 100644 index 9edc027..c967e4c --- a/lcmodule/source/LCM.rc +++ b/lcmodule/source/LCM.rc @@ -75,9 +75,9 @@ BEGIN VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "Loader Communication Driver" VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011" - VALUE "PrivateBuild", "Change-Id: I0498cbaecea78651418d11ea2643fcafa3ac4880" + VALUE "PrivateBuild", "Change-Id:If5b3c993739f93276e2a76b012a1852d687ad746" VALUE "ProductName", "CXA1104507 Loader Communication Module" - VALUE "ProductVersion", "PV8" + VALUE "ProductVersion", "R1V" END END BLOCK "VarFileInfo" diff --git a/lcmodule/source/LCM.vcproj b/lcmodule/source/LCM.vcproj index 0b9462e..67fb14a 100644 --- a/lcmodule/source/LCM.vcproj +++ b/lcmodule/source/LCM.vcproj @@ -385,6 +385,10 @@ RelativePath=".\cnh1606344_ldr_communication_module\source\z_family.c" > + + BulkDataCallback_p = BulkDataCallback_p; R15_TRANSPORT(Communication_p)->EndOfDump_p = EndOfDump_p; } + +void Do_R15_Bulk_SetBuffersRelease(Communication_t *Communication_p, void *BulkBufferRelease_p) +{ + R15_TRANSPORT(Communication_p)->BulkBufferRelease_p = BulkBufferRelease_p; +} #endif /* @@ -265,6 +270,7 @@ uint32 Do_R15_Bulk_DestroyVector(const Communication_t *const Communication_p, T uint32 ReturnValue = E_SUCCESS; uint32 Counter; int BuffersNr = 0; + R15_Outbound_t *Out_p = &(R15_NETWORK(Communication_p)->Outbound); if (NULL == Communication_p) { return BULK_ERROR; @@ -312,6 +318,8 @@ uint32 Do_R15_Bulk_DestroyVector(const Communication_t *const Communication_p, T BulkVector_p->Buffers = 0; BulkVector_p->ChunkSize = 0; BulkVector_p->Offset = 0; + BulkVector_p->State = BULK_IDLE_STATE; + Out_p->State = SEND_IDLE; return ReturnValue; } @@ -559,13 +567,13 @@ uint16 Do_R15_Bulk_GenerateBulkSessionID(Communication_t *Communication_p) * @retval ChunkID Chunk ID for the next ready for transmitting packet. * If none chunk is ready return last Chunk ID + 1. */ -static uint32 R15_Bulk_GetChunkForSending(const TL_BulkVectorList_t *BulkVector_p) +__inline static uint32 R15_Bulk_GetChunkForSending(const TL_BulkVectorList_t *BulkVector_p) { uint32 ChunkId = 0; for (ChunkId = 0; ChunkId < BulkVector_p->Buffers; ChunkId++) { if (CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_TX_READY) && - CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_PAYLOAD_CRC_CALCULATED)) { + CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_PAYLOAD_CRC_CALCULATED)) { break; } } @@ -584,14 +592,14 @@ static uint32 R15_Bulk_GetChunkForSending(const TL_BulkVectorList_t *BulkVector_ * @retval ChunkID Chunk ID for the next ready for transmitting packet. * If none chunk is ready return last Chunk ID + 1. */ -static uint32 R15_Bulk_GetChunkForSeriazliation(const TL_BulkVectorList_t *BulkVector_p) +__inline static uint32 R15_Bulk_GetChunkForSeriazliation(const TL_BulkVectorList_t *BulkVector_p) { uint32 ChunkId = 0; for (ChunkId = 0; ChunkId < BulkVector_p->Buffers; ChunkId++) { - if ( (CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, (BUF_ALLOCATED | BUF_TX_READY))) && - !(CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_CRC_CALCULATING)) && - !(CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_PAYLOAD_CRC_CALCULATED)) ) { + if ((CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, (BUF_ALLOCATED | BUF_TX_READY))) && + !(CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_CRC_CALCULATING)) && + !(CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_PAYLOAD_CRC_CALCULATED))) { break; } } @@ -608,13 +616,13 @@ static uint32 R15_Bulk_GetChunkForSeriazliation(const TL_BulkVectorList_t *BulkV * @retval TRUE If all created chunks are transmitted. * @retval FALSE If all created chunks are not transmitted. */ -static boolean R15_Bulk_CheckTransmitedChunks(const TL_BulkVectorList_t *BulkVector_p) +__inline static boolean R15_Bulk_CheckTransmitedChunks(const TL_BulkVectorList_t *BulkVector_p) { uint32 ChunkId; for (ChunkId = 0; ChunkId < BulkVector_p->Buffers; ChunkId++) { if (!CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_TX_SENT) && - !CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_TX_DONE)) { + !CHECK_PACKET_FLAGS(BulkVector_p->Entries[ChunkId].Buffer_p, BUF_TX_DONE)) { return FALSE; } } @@ -682,7 +690,7 @@ static void R15_Bulk_MarkNotAckAllChunks(TL_BulkVectorList_t *BulkVector_p) } } -static boolean R15_Bulk_CheckIdInList(const TL_BulkVectorList_t *BulkVector_p, const uint32 ChunkId, const uint8 *const Data_p, const uint32 Length) +__inline static boolean R15_Bulk_CheckIdInList(const TL_BulkVectorList_t *BulkVector_p, const uint32 ChunkId, const uint8 *const Data_p, const uint32 Length) { uint32 i; @@ -789,6 +797,7 @@ static ErrorCode_e R15_Bulk_Process_Read(Communication_t *Communication_p, TL_Bu } else if (VECTOR_MISSING_CHUNK == ChunkReceivedStatus) { uint32 CurrentChunkId = R15_Bulk_GetChunkId(Packet_p); boolean RetransmissionNeeded = R15_Bulk_VectorNeedsRetransmission(BulkVector_p, CurrentChunkId); + if (RetransmissionNeeded) { A_(printf("bulk_protocol.c(%d) RetransmissionNeeded\n", __LINE__);) // Send ReadRequest for the missing chunk(s). @@ -823,6 +832,9 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect { ErrorCode_e ReturnValue = E_SUCCESS; uint32 ProcessingChunkId; +#ifndef CFG_ENABLE_LOADER_TYPE + BulkBuffersRelease_t pcbf; +#endif if (!Do_CriticalSection_Enter(R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS)) { return ReturnValue; @@ -860,12 +872,14 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect case PROCESSING_CHUNKS: /* Find ChunkId for a package that needs processing. */ ProcessingChunkId = R15_Bulk_GetChunkForSeriazliation(BulkVector_p); + if (ProcessingChunkId <= BulkVector_p->Buffers - 1) { R15_Bulk_SerializeChunk(Communication_p, BulkVector_p->Entries[ProcessingChunkId].Buffer_p, ProcessingChunkId); } /* Find ChunkId for a package that is processed and ready for sending. */ BulkVector_p->SendingChunkId = R15_Bulk_GetChunkForSending(BulkVector_p); + if (BulkVector_p->SendingChunkId <= BulkVector_p->Buffers - 1) { /* Move to state to process remaining chunks while waiting for the current chunk to be sent */ @@ -873,11 +887,13 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect /* Send packet with chunk ID */ R15_Bulk_SendData(Communication_p, BulkVector_p->Entries[BulkVector_p->SendingChunkId].Buffer_p); #ifndef CFG_ENABLE_LOADER_TYPE + if (NULL != R15_TRANSPORT(Communication_p)->BulkDataCallback_p) { BulkDataReqCallback_t pcbf = (BulkDataReqCallback_t)R15_TRANSPORT(Communication_p)->BulkDataCallback_p; BulkVector_p->TransferedLength += BulkVector_p->ChunkSize; pcbf(Communication_p->Object_p, BulkVector_p->SessionId, BulkVector_p->ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, BulkVector_p->TotalLength, BulkVector_p->TransferedLength); } + #endif C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, ChunkId, BulkVector_p->SessionId);) } @@ -885,12 +901,14 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect break; case WAIT_CHUNK_SENT: + /* Wait for the chunk to be sent in order to continue sending next chunks */ if (CHECK_PACKET_FLAGS(BulkVector_p->Entries[BulkVector_p->SendingChunkId].Buffer_p, BUF_TX_SENT)) { BulkVector_p->State = PROCESSING_CHUNKS; } else { /* While sending the chunk prepare other chunks for sending. */ ProcessingChunkId = R15_Bulk_GetChunkForSeriazliation(BulkVector_p); + if (ProcessingChunkId <= BulkVector_p->Buffers - 1) { R15_Bulk_SerializeChunk(Communication_p, BulkVector_p->Entries[ProcessingChunkId].Buffer_p, ProcessingChunkId); } else if (R15_Bulk_AllChunksProcessed(BulkVector_p)) { @@ -901,6 +919,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect break; case SENDING_CHUNKS: + if (R15_Bulk_CheckTransmitedChunks(BulkVector_p)) { /* save the current bulk vector before bulk session is closed */ memcpy(&(R15_TRANSPORT(Communication_p))->PreviousBulkVector, BulkVector_p, sizeof(TL_BulkVectorList_t)); @@ -910,15 +929,18 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } else if (CHECK_PACKET_FLAGS(BulkVector_p->Entries[BulkVector_p->SendingChunkId].Buffer_p, BUF_TX_SENT)) { /* Get Chunk ID of next packet! */ BulkVector_p->SendingChunkId = R15_Bulk_GetChunkForSending(BulkVector_p); + if (BulkVector_p->SendingChunkId <= BulkVector_p->Buffers - 1) { /* Send packet with chunk ID */ R15_Bulk_SendData(Communication_p, BulkVector_p->Entries[BulkVector_p->SendingChunkId].Buffer_p); #ifndef CFG_ENABLE_LOADER_TYPE + if (NULL != R15_TRANSPORT(Communication_p)->BulkDataCallback_p) { BulkDataReqCallback_t pcbf = (BulkDataReqCallback_t)R15_TRANSPORT(Communication_p)->BulkDataCallback_p; BulkVector_p->TransferedLength += BulkVector_p->ChunkSize; pcbf(Communication_p->Object_p, BulkVector_p->SessionId, BulkVector_p->ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, BulkVector_p->TotalLength, BulkVector_p->TransferedLength); } + #endif C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, ChunkId, BulkVector_p->SessionId);) } @@ -931,6 +953,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect #ifndef CFG_ENABLE_LOADER_TYPE case WAIT_TX_DONE: + /* Wait for all chunks in the current session to be send before closing the current session and notifying start of the new session */ if (R15_Bulk_SessionTxDone(BulkVector_p)) { @@ -942,12 +965,14 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: da se hendla return vrednosta! BulkExtendedHeader_t *PendingHeader_p = R15_TRANSPORT(Communication_p)->BulkHandle.PendingBulkHeader_p; + if (NULL != PendingHeader_p) { // set bulk parameters for new bulk session if request for starting new session was received pcbf(Communication_p->Object_p, PendingHeader_p->Session, PendingHeader_p->ChunkSize, PendingHeader_p->Offset, PendingHeader_p->Length, FALSE); BUFFER_FREE(R15_TRANSPORT(Communication_p)->BulkHandle.PendingBulkHeader_p); } } + break; #endif @@ -956,13 +981,35 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect BulkVector_p->Status = BULK_SESSION_FINISHED; C_(printf("bulk_protocol.c(%d) Write bulk process finished! \n", __LINE__);) break; +#ifndef CFG_ENABLE_LOADER_TYPE + case CANCEL_BULK: { + uint32 Counter; + for (Counter = 0 ; (Counter < BulkVector_p->Buffers); Counter++) { + if (CHECK_PACKET_FLAGS(BulkVector_p->Entries[Counter].Buffer_p, BUF_CRC_CALCULATING)) { + goto ErrExit; + } + + if (CHECK_PACKET_FLAGS(BulkVector_p->Entries[Counter].Buffer_p, BUF_TX_SENDING)) { + goto ErrExit; + } + } + + (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); + (void)Do_R15_Bulk_DestroyVector(Communication_p, BulkVector_p, FALSE); + BulkVector_p->State = BULK_IDLE_STATE; + pcbf = (BulkBuffersRelease_t)R15_TRANSPORT(Communication_p)->BulkBufferRelease_p; + pcbf(Communication_p->Object_p, BulkVector_p); + } + break; +#endif default: BulkVector_p->State = BULK_IDLE_STATE; break; } } +ErrExit: Do_CriticalSection_Leave(R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS); return ReturnValue; @@ -1171,7 +1218,7 @@ static void R15_Bulk_GetListOfReceivedChunks(const TL_BulkVectorList_t *const Bu } } -static boolean R15_Bulk_AllChunksProcessed(const TL_BulkVectorList_t *const BulkVector_p) +__inline static boolean R15_Bulk_AllChunksProcessed(const TL_BulkVectorList_t *const BulkVector_p) { boolean Status = TRUE; uint32 ChunkId; @@ -1211,7 +1258,7 @@ static boolean R15_Bulk_SessionTxDone(const TL_BulkVectorList_t *const BulkVecto return Status; } -static boolean IsChunkReceived(Communication_t *Communication_p, uint32 ChunkId) +__inline static boolean IsChunkReceived(Communication_t *Communication_p, uint32 ChunkId) { PacketMeta_t *Packet_p = R15_TRANSPORT(Communication_p)->BulkHandle.BulkVector_p->Entries[ChunkId].Buffer_p; @@ -1243,7 +1290,7 @@ static TL_BulkVectorStatus_t R15_Bulk_GetVectorStatus(TL_BulkVectorList_t *BulkV Packet_p = BulkVector_p->Entries[ChunkCounter].Buffer_p; if (Packet_p == NULL || - !(CHECK_PACKET_FLAGS(Packet_p, BUF_ACK_READY) || CHECK_PACKET_FLAGS(Packet_p, BUF_ACKNOWLEDGED))) { + !(CHECK_PACKET_FLAGS(Packet_p, BUF_ACK_READY) || CHECK_PACKET_FLAGS(Packet_p, BUF_ACKNOWLEDGED))) { Status = VECTOR_NOT_COMPLETE; } else { if (Status == VECTOR_NOT_COMPLETE) { @@ -1269,12 +1316,12 @@ static boolean R15_Bulk_VectorNeedsRetransmission(TL_BulkVectorList_t *BulkVecto uint32 ChunkId; for (ChunkId = 0; ChunkId <= CurrentChunkId; ChunkId++) { - if (NULL == BulkVector_p->Entries[ChunkId].Buffer_p) { - if (FALSE == BulkVector_p->Entries[ChunkId].RetransmissionRequested) { - BulkVector_p->Entries[ChunkId].RetransmissionRequested = TRUE; - Status = TRUE; - } - } + if (NULL == BulkVector_p->Entries[ChunkId].Buffer_p) { + if (FALSE == BulkVector_p->Entries[ChunkId].RetransmissionRequested) { + BulkVector_p->Entries[ChunkId].RetransmissionRequested = TRUE; + Status = TRUE; + } + } } return Status; @@ -1284,7 +1331,7 @@ static boolean R15_Bulk_VectorNeedsRetransmission(TL_BulkVectorList_t *BulkVecto * Clear RetransmissionRequested flag for all chunks in the given bulk vector. * */ -static void R15_Bulk_VectorClearRetransmissionRequested(TL_BulkVectorList_t *BulkVector_p) +__inline static void R15_Bulk_VectorClearRetransmissionRequested(TL_BulkVectorList_t *BulkVector_p) { uint32 ChunkId; @@ -1344,7 +1391,7 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, } } else { if ((BulkVector_p->State == PROCESSING_CHUNKS) || (BulkVector_p->State == SENDING_CHUNKS) || - (BulkVector_p->State == WAIT_CHUNK_SENT) || (BulkVector_p->State == WAIT_BULK_ACK)) { + (BulkVector_p->State == WAIT_CHUNK_SENT) || (BulkVector_p->State == WAIT_BULK_ACK)) { /* mark all chunks for retransmission */ R15_Bulk_MarkNotAckAllChunks(BulkVector_p); } else { @@ -1414,18 +1461,18 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, Buffers = ((ExtendedHeader.Length + ExtendedHeader.ChunkSize - 1) / ExtendedHeader.ChunkSize); if ((0 == ExtendedHeader.AcksChunk) && - (Do_R15_Bulk_GetStatusSession(R15_TRANSPORT(Communication_p)->BulkHandle.BulkVector_p) == BULK_SESSION_IDLE)) { - C_(printf("bulk_protocol.c(%d) Request for new bulk session(%d)!\n", __LINE__, ExtendedHeader.Session);) + (Do_R15_Bulk_GetStatusSession(R15_TRANSPORT(Communication_p)->BulkHandle.BulkVector_p) == BULK_SESSION_IDLE)) { + C_(printf("bulk_protocol.c(%d) Request for new bulk session(%d)!\n", __LINE__, ExtendedHeader.Session);) - /* Try to release the timer for the bulk session acknowledge */ - if (R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey > 0) { - (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM MB bug fix: Timer should be released on request for retransmission - R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey = 0; - } + /* Try to release the timer for the bulk session acknowledge */ + if (R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey > 0) { + (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM MB bug fix: Timer should be released on request for retransmission + R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey = 0; + } - ACK_Read = FALSE; - pcbf = (BulkCommandReqCallback_t)R15_TRANSPORT(Communication_p)->BulkCommandCallback_p; - pcbf(Communication_p->Object_p, ExtendedHeader.Session, ExtendedHeader.ChunkSize, ExtendedHeader.Offset, ExtendedHeader.Length, ACK_Read); + ACK_Read = FALSE; + pcbf = (BulkCommandReqCallback_t)R15_TRANSPORT(Communication_p)->BulkCommandCallback_p; + pcbf(Communication_p->Object_p, ExtendedHeader.Session, ExtendedHeader.ChunkSize, ExtendedHeader.Offset, ExtendedHeader.Length, ACK_Read); } else if (Buffers == ExtendedHeader.AcksChunk) { C_(printf("bulk_protocol.c(%d) ACK for bulk session(%d)!\n", __LINE__, ExtendedHeader.Session);) (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h index a66bf6f..efd9270 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h @@ -145,7 +145,7 @@ TYPEDEF_ENUM { (packet)->Flags |= (mask & flags); \ } while (0) -#define CHECK_PACKET_FLAGS(packet, flags) (((flags) == ((packet)->Flags & (flags))) ? TRUE : FALSE) +#define CHECK_PACKET_FLAGS(packet, flags) ((0 != ((packet)->Flags & (flags))) ? TRUE : FALSE) /** Defined state of the receiver */ typedef enum { diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c index 6268dc1..c56586c 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c @@ -330,7 +330,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) /* check retransmission count before send */ Out_p->Packet_p = (PacketMeta_t *)QUEUE(Communication_p, FifoDequeue_Fn)(OBJECT_QUEUE(Communication_p), Communication_p->Outbound_p); - if ((NULL == Out_p->Packet_p) || (CHECK_PACKET_FLAGS(Out_p->Packet_p, BUF_TX_DONE))) { + if ((NULL == Out_p->Packet_p) || (CHECK_PACKET_FLAGS(Out_p->Packet_p, BUF_FREE)) || (CHECK_PACKET_FLAGS(Out_p->Packet_p, BUF_TX_DONE))) { break; } else if (Out_p->Packet_p->Resend < MAX_RESENDS) { Out_p->Packet_p->Resend++; @@ -437,6 +437,7 @@ ErrorCode_e R15_Network_CancelRetransmission(const Communication_t *const Commun (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_NETWORK(Communication_p)->RetransmissionList[Index]->TimerKey); free(R15_NETWORK(Communication_p)->RetransmissionList[Index]->Packet_p->Timer_p); + R15_NETWORK(Communication_p)->RetransmissionList[Index]->Packet_p->Timer_p = NULL; ReturnValue = R15_Network_PacketRelease(Communication_p, R15_NETWORK(Communication_p)->RetransmissionList[Index]->Packet_p); if (E_SUCCESS != ReturnValue) { @@ -588,6 +589,7 @@ ErrorCode_e R15_Network_PacketRelease(const Communication_t *const Communication #endif memset(Meta_p, 0, sizeof(PacketMeta_t)); + Meta_p = NULL; break; } diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml index 9fd0269..1c2bb7e 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml @@ -9,895 +9,950 @@ * General Fatal 0-50 * General non-fatal 51-99 --> - Operation finished successfully. - Unknown error. - Try to reset the loader and if problem still exist, report it. + Operation finished successfully. + Unknown error. + Try to reset the loader and if problem still exist, report it. - Check the input parameters in the command that you try to execute. Repeat operation. Report if problem is not solved. - Try to reset the loader and if problem still exist, report this error. - Try to reset the loader and if still exist the problem, report this error. + Check the input parameters in the command that you try to execute. Repeat operation. Report if problem is not solved. + Try to reset the loader and if problem still exist, report this error. + Try to reset the loader and if still exist the problem, report this error. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. - Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. + Internal malicious state detected in IO layer. Report this problem. - Check the communication cable and restart the loader. - Try to reset the loader and if still exist the problem, report this error. - Try to reset the loader and if still exist the problem, report this error. - Try to reset the loader and if still exist the problem, report this error. - Try to reset the loader and if still exist the problem, report this error. Possible hardware problem. - Communication device do not respond and try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Reset the loader. Report if problem still exist. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Current transfer is not finished. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. - Try to reset the loader. If the problem still exist, report this error. + Check the communication cable and restart the loader. + Try to reset the loader and if still exist the problem, report this error. + Try to reset the loader and if still exist the problem, report this error. + Try to reset the loader and if still exist the problem, report this error. + Try to reset the loader and if still exist the problem, report this error. Possible hardware problem. + Communication device do not respond and try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Reset the loader. Report if problem still exist. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Current transfer is not finished. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + Try to reset the loader. If the problem still exist, report this error. + USB bulk transfer in DMA mode 1 is only supported. - Check the input value of the command that you try to execute. + Check the input value of the command that you try to execute. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. + Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour. - Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. - Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. - Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. + Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. + Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. + Possible error in zip format.Verify that the zip is not corrupted,otherwise report the problem. - Internal error.Reset loader.Report if problem still exist. - Verify that archive is successfuly flashed.Reset loader. Report if problem still exist. - Check the authentication type. The loader supports authentication with CA certificate and control keyes.Repeat authentiacton. Report if problem still exist. - Default system time is used.Set the Time properly. Report if problem still exist. - Report this problem + Internal error.Reset loader.Report if problem still exist. + Verify that archive is successfuly flashed.Reset loader. Report if problem still exist. + Check the authentication type. The loader supports authentication with CA certificate and control keyes.Repeat authentiacton. Report if problem still exist. + Default system time is used.Set the Time properly. Report if problem still exist. + Report this problem - You must erase the flash before flashing archive with different flashlayout. - Check files in flash archive. Empty files not allowed. - Try to restart the loader and if still exist the problem, report this error. - Try to erase flash and restart the loader and if problem still exist, report it. - Try to erase flash and restart the loader and if problem still exist, report it. - During previous flashing some fail condition occurs. Reflash same archieve again before try a new one. - Try to use loaders with support for memory device attached to DBB. If loaders does not exist, fire CR in FIDO to get loaders that support that memory. - Check MEMCONF settings in flash archive. - Check MEMCONF settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity - Check CABS settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity - Entry stated in manifest file is not found in flashlayout file. All entries in manifest must be defined in flashlayout file. - Entry start address in manifest and flashlayout are not equal. - SUBTOC parameters are not valid. - Reading SUBTOC from flash failed. - Overlapping partitions found in the archive. - Partition not found in TOC. - Flashlayout data equals NULL. - Loader internal error. Report this issue to loaders team. - Input buffer in create TOC list functionality is filled from empty location. - Report this issue to loaders team. - Erase flash and try all procedure once again. If problem still exist report it to loaders team. - Flash archive first before using some TOC operations. - There is no boot area on flash, nor in the archive you are trying to flash. - Entry start address or flash device in manifest are not equal to TOC. - The file is too large to fit in the partition. Increase the partition size and try to flash the file again. If problem still exist, report it - The file is too large to fit in the boot area. - The requested dump size is outside of the flash range, available flash range is dumped. - Archive contains image marked for enhanced area, but enhanced area is not set on eMMC - Image marked for enhanced area has start and/or end address out of enhanced area - eMMC driver returned error while setting enhanced area + You must erase the flash before flashing archive with different flashlayout. + Check files in flash archive. Empty files not allowed. + Try to restart the loader and if still exist the problem, report this error. + Try to erase flash and restart the loader and if problem still exist, report it. + Try to erase flash and restart the loader and if problem still exist, report it. + During previous flashing some fail condition occurs. Reflash same archieve again before try a new one. + Try to use loaders with support for memory device attached to DBB. If loaders does not exist, fire CR in FIDO to get loaders that support that memory. + Check MEMCONF settings in flash archive. + Check MEMCONF settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity + Check CABS settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity + Entry stated in manifest file is not found in flashlayout file. All entries in manifest must be defined in flashlayout file. + Entry start address in manifest and flashlayout are not equal. + SUBTOC parameters are not valid. + Reading SUBTOC from flash failed. + Overlapping partitions found in the archive. + Partition not found in TOC. + Flashlayout data equals NULL. + Loader internal error. Report this issue to loaders team. + Input buffer in create TOC list functionality is filled from empty location. + Report this issue to loaders team. + Erase flash and try all procedure once again. If problem still exist report it to loaders team. + Flash archive first before using some TOC operations. + There is no boot area on flash, nor in the archive you are trying to flash. + Entry start address or flash device in manifest are not equal to TOC. + The file is too large to be placed in the partition. Increase the partition size and try to flash the file again. If problem still exist, report it + The file is too large to be placed in the boot area. + The requested dump size is outside of the flash range, available flash range is dumped. + Please use physical erase configuration for this command. For more details please consult the user manual. + Archive contains image marked for enhanced area, but enhanced area is not set on eMMC + Image marked for enhanced area has start and/or end address out of enhanced area + eMMC driver returned error while setting enhanced area - Verify that supplied path is valid. Repeat operation. Report if problem still exist. - Repeat operation. If still doesn't work reset loader. If that does not resolve problem report it. - Use Volume Properties command to check if enough memory space exists. Report problem in case of information mismatch. - Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. - Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. - Use Volume Properties command to check if enough memory space exists. Repeat operation or reset loader. If problem still exist possible file system corruption. Report the problem. - Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. - Use Volume Properties command to check if enough memory space exists. Report problem in case of information mismatch. - Repeat operation or reset loader. Report if problem still exist. - Internal error. Possible file system corruption. Repeat operation or reset loader. Report if problem still exist. - Internal error. Repeat operation or reset loader. Report if problem still exist. - Check the access of the file and check input parameters. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. - Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Internal error. Repeat operation or reset loader. Report if problem still exist. - Internal error. Repeat operation or reset loader. Report if problem still exist. - In order to perform operation first change file access permissions and than repeat operation. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Check input parameters. Use Volume Properties command to check if enough memory space exists. Repeat operation or reset loader. Report if problem still exist. - Operation is not allowed. - Internal error. Reset loader. Report if problem still exist. - Repeat operation with correct input parameters. Report if problem still exist. - Internal error. Repeat operation or reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - Requested volume not exist. Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Internal error. Repeat operation or reset loader. Report if problem still exist. - Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Change the access and repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. - Check input parameters. Repeat operation or reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Correct the file name. Repeat operation or reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - First check the defined number of volumes in the flasharchive. If it is lower than maximum allowed volumes repeat the operation or reset loader. Report if problem still exist - This message can be issued in case when is detected that loader is trying to unmount zero mounted devices. + Verify that supplied path is valid. Repeat operation. Report if problem still exist. + Repeat operation. If still doesn't work reset loader. If that does not resolve problem report it. + Use Volume Properties command to check if enough memory space exists. Report problem in case of information mismatch. + Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. + Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. + Use Volume Properties command to check if enough memory space exists. Repeat operation or reset loader. If problem still exist possible file system corruption. Report the problem. + Check the access of the file. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. + Use Volume Properties command to check if enough memory space exists. Report problem in case of information mismatch. + Repeat operation or reset loader. Report if problem still exist. + Internal error. Possible file system corruption. Repeat operation or reset loader. Report if problem still exist. + Internal error. Repeat operation or reset loader. Report if problem still exist. + Check the access of the file and check input parameters. Repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. + Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Internal error. Repeat operation or reset loader. Report if problem still exist. + Internal error. Repeat operation or reset loader. Report if problem still exist. + In order to perform operation first change file access permissions and than repeat operation. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Check input parameters. Use Volume Properties command to check if enough memory space exists. Repeat operation or reset loader. Report if problem still exist. + Operation is not allowed. + Internal error. Reset loader. Report if problem still exist. + Repeat operation with correct input parameters. Report if problem still exist. + Internal error. Repeat operation or reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + Requested volume not exist. Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Internal error. Repeat operation or reset loader. Report if problem still exist. + Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Internal error. Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Change the access and repeat operation. If problem still exist possible file system corruption and you need to reset the loader. Report if problem is not solved. + Check input parameters. Repeat operation or reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Correct the file name. Repeat operation or reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + First check the defined number of volumes in the flasharchive. If it is lower than maximum allowed volumes repeat the operation or reset loader. Report if problem still exist + This message can be issued in case when is detected that loader is trying to unmount zero mounted devices. - Internal limitation. Wait some time and then try again. - Reset loader. If problem still exist report it. - Check your authentication level. Some command need authentication. Verify that you are sending correct command. - Check your authentication level. Verify that you are sending command from existing group. - Check the command payload. If payload is fine, report this problem - It is not allowed more than 5 commands to be registered. - It is not allowed the command to be registerd more than once in execution queue - You should be authenticate with appropriate permission level in order to execute this command. + Internal limitation. Wait some time and then try again. + Reset loader. If problem still exist report it. + Check your authentication level. Some command need authentication. Verify that you are sending correct command. + Check your authentication level. Verify that you are sending command from existing group. + Check the command payload. If payload is fine, report this problem + It is not allowed more than 5 commands to be registered. + It is not allowed the command to be registerd more than once in execution queue + You should be authenticate with appropriate permission level in order to execute this command. - Internal error.Report this problem - Internal error. Report this problem - Internal error. Report this problem - short="Timer interrupt configure failed.">Internal error. Report this problem + Internal error.Report this problem + Internal error. Report this problem + Internal error. Report this problem + short="Timer interrupt configure failed.">Internal error. Report this problem - Check input parameters. Repeat command. - Internal error. Check input parameters. Repeat command. - Try to reset the loader and repeat operation. If problem still exist, report it. - Try to reset the loader and repeat operation. If problem still exist, report it. - Possible error in flash driver configuration. Try to reset the loader and if problem still exist, report it. - Possible wrong configuration or memory corruption. Try to reset the loader and if problem still exist, report it. - Internal error or memory corruption. Try to reset the loader and if problem still exist, report it. - Internal error. Try to reset the loader and if problem still exist, report it. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Check input parameters. Repeat command. - Check input parameters. Restart loader and if problem doesn't solved, report it. - Reset loader. Report if problem doesn't solved. - Check input parameters. Reset loader and if problem doesn't solved reset loader. - There's no more space available. Check input parameters and try to repeat same operation. Report if problem does't solved. - Internal error. Try to repeat command. Report if problem still exist. - Internal error. Try to repeat command. Report if problem still exist. - Internal error. Try to repeat command and reset loader. Report if problem still exist. - Internal error. Try to repeat command and reset loader. Report if problem still exist. - Internal error. Try to repeat command and reset loader. Report if problem still exist. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Check input parameters. Retry command. If problem doesn't solved reset loader. Report this problem if this not help. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - Reset loader. If problem doesn't solved report it. - - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Loader internal problem. Report this issue. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - - Write something to GD before attempting to read from it. Report this problem if you are shore that GD is not empty. + Check input parameters. Repeat command. + Internal error. Check input parameters. Repeat command. + Try to reset the loader and repeat operation. If problem still exist, report it. + Try to reset the loader and repeat operation. If problem still exist, report it. + Possible error in flash driver configuration. Try to reset the loader and if problem still exist, report it. + Possible wrong configuration or memory corruption. Try to reset the loader and if problem still exist, report it. + Internal error or memory corruption. Try to reset the loader and if problem still exist, report it. + Internal error. Try to reset the loader and if problem still exist, report it. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Check input parameters. Repeat command. + Check input parameters. Restart loader and if problem doesn't solved, report it. + Reset loader. Report if problem doesn't solved. + Check input parameters. Reset loader and if problem doesn't solved reset loader. + There's no more space available. Check input parameters and try to repeat same operation. Report if problem does't solved. + Internal error. Try to repeat command. Report if problem still exist. + Internal error. Try to repeat command. Report if problem still exist. + Internal error. Try to repeat command and reset loader. Report if problem still exist. + Internal error. Try to repeat command and reset loader. Report if problem still exist. + Internal error. Try to repeat command and reset loader. Report if problem still exist. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Check input parameters. Retry command. If problem doesn't solved reset loader. Report this problem if this not help. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + Reset loader. If problem doesn't solved report it. + + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Loader internal problem. Report this issue. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + + Write something to GD before attempting to read from it. Report this problem if you are shore that GD is not empty. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Internal error. Reset loader. Report if problem still exist. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Writing was attempted when compiled as read-only. - Junking was attempted when compiled as read-only. - Garbage collection was attempted when compiled as read-only. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Error returned when using os-free code when calling any other method then resume or shutdown when BDM is in the paused state. - Returned when calling resume when BDM is not in the paused state (In the os-free case). - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Possible error in flash archive. Check the archive. Flash the correct archive. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Internal error. Reset loader. Report if problem still exist. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Writing was attempted when compiled as read-only. + Junking was attempted when compiled as read-only. + Garbage collection was attempted when compiled as read-only. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Error returned when using os-free code when calling any other method then resume or shutdown when BDM is in the paused state. + Returned when calling resume when BDM is not in the paused state (In the os-free case). + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Possible error in flash archive. Check the archive. Flash the correct archive. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Internal error. Reset loader. Report if problem still exist. - Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Possible error in flash driver. Try to reset the loader and if problem still exist, report it. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Internal error. Reset loader. Report if problem still exist. - Repeat operation. If problem still exist reset the loader. Report if the problem is not solved. - Internal error. Reset loader. Report if problem still exist. - - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Internal error. Reset loader. Report if problem still exist. - Possible missing configuration for BDM. Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Report the problem. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Possible missing configuration for BDM. Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. - Repeat operation. If problem still exist reset the loader. Report if the problem is not solved. - - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + --> + Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Internal error. Reset loader. Report if problem still exist. + Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Possible error in flash driver. Try to reset the loader and if problem still exist, report it. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Internal error. Reset loader. Report if problem still exist. + Repeat operation. If problem still exist reset the loader. Report if the problem is not solved. + Internal error. Reset loader. Report if problem still exist. + + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Internal error. Reset loader. Report if problem still exist. + Possible missing configuration for BDM. Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Report the problem. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Possible missing configuration for BDM. Check is archive was flashed. If not, flash archive. If problem still exist reset loader and report the problem. + Repeat operation. If problem still exist reset the loader. Report if the problem is not solved. + + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Internal error. Reset loader. Report if problem still exist. - Check the file that you want to bind. Repeat operation. Report if problem still exist. - IMEI in the OTP differs from the IMEI in the COPS data. - It is not allowed to write in already locked OTP area - Restart loader. Report if problem still exist. - Be sure that authentication is performed with valid data.(Correct Certificate, Domain, Control Keys) - Execute Bind Properties command first and than repeat operation. Report if problem still exist. - Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed. - lock is disabled or already locked. - Check the validation of the certificate or control keys. - Control keys that you try to authenticate and control keys from Default Data missmach. - Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist. - Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist. - Check the control keys. Repeat operation with valid control keys. Report if problem still exist. - For the appropiate LockType timer is already running. - Check that the SIM is active. If the SIM is active be sure that you are entering correct SIM Pin. Report if problem still exist - Be sure that the SIM data conatains valid data for IMSI, GID1 and GID2 - IMEI in the OTP differs from the IMEI in the COPS data. - IMSI on interface doesn't match SIM IMSI - Check the input parameters. Repeat operation. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check the input parameters. Repeat operation. Report if problem still exist. - Check the input parameters. Repeat operation. Report if problem still exist. - Verify the input parameters. Repeat operation. Report if problem still exist. - Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. + --> + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check input arguments. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Perform Authenticate before executing current operation. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + This could either be because the challenge was signed with the wrong certificate, or the presented control keys were incorrect. + Repeat the operation. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check the key. Repeat operation. Report if problem still exist. + Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + + Internal error. Reset loader. Report if problem still exist. + Check the file that you want to bind. Repeat operation. Report if problem still exist. + IMEI in the OTP differs from the IMEI in the COPS data. + It is not allowed to write in already locked OTP area + Restart loader. Report if problem still exist. + Be sure that authentication is performed with valid data.(Correct Certificate, Domain, Control Keys) + Execute Bind Properties command first and than repeat operation. Report if problem still exist. + Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed. + lock is disabled or already locked. + Check the validation of the certificate or control keys. + Control keys that you try to authenticate and control keys from Default Data missmach. + Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist. + Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist. + Check the control keys. Repeat operation with valid control keys. Report if problem still exist. + For the appropiate LockType timer is already running. + Check that the SIM is active. If the SIM is active be sure that you are entering correct SIM Pin. Report if problem still exist + Be sure that the SIM data conatains valid data for IMSI, GID1 and GID2 + IMEI in the OTP differs from the IMEI in the COPS data. + IMSI on interface doesn't match SIM IMSI + Check the input parameters. Repeat operation. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Check the input parameters. Repeat operation. Report if problem still exist. + Check the input parameters. Repeat operation. Report if problem still exist. + Verify the input parameters. Repeat operation. Report if problem still exist. + Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. - Repeat operation. Report if problem still exist. - Repeat operation. Report if problem still exist. - Repeat operation. Report if problem still exist. - Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - If T_PD_NAND_CONFIG_FLAG_BLOCKING_MUTEX is not set, a call to NAND PD may return with this busy flag. - Repeat operation. Report if problem still exist. - Repeat operation. Report if problem still exist. - Repeat operation. Report if problem still exist. + --> + Repeat operation. Report if problem still exist. + Repeat operation. Report if problem still exist. + Repeat operation. Report if problem still exist. + Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + If T_PD_NAND_CONFIG_FLAG_BLOCKING_MUTEX is not set, a call to NAND PD may return with this busy flag. + Repeat operation. Report if problem still exist. + Repeat operation. Report if problem still exist. + Repeat operation. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. - Possible wrong or missing configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - No data was written in the specified unit. Write data to the unit and than perform read operation. Report if problem still exist. - - Internal error. Reset loader. Report if problem still exist. - - Check input parameters. Requested unit is not supported. Repeat operation with the correct input parameters. Report if problem still exist. - Reset loader. If problem doesn't solved report it. + Internal error. Reset loader. Report if problem still exist. + Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. + Possible wrong or missing configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + No data was written in the specified unit. Write data to the unit and than perform read operation. Report if problem still exist. + + Internal error. Reset loader. Report if problem still exist. + + Check input parameters. Requested unit is not supported. Repeat operation with the correct input parameters. Report if problem still exist. + Reset loader. If problem doesn't solved report it. - Reset loader. - Reset loader. If problem does'n solved report it. - Reset loader. If problem does'n solved report it. - Check ZIP archive. Reset loader. If problem doesn't solved, report it. - Check input parameters. Repeat operation with correct input. - Possible damaged elf file. Retry operation and reset loader. If problem doesn't solved report it. - Check input parameters. Retry operation. - Some information in boot image doesn't agree. Check software that you flash. - Internal error. Reset loader. If problem doesn't solved, report it. - Invalid boot image. Check software that you flash. - Internal limitation. Report this problem. - The boot record with that ID is never written. - The boot record with that ID was not written. - For successfully writing in flash boot record must be a multiple of four bytes. - Check manifest file from flash archive. Repeat operation with correct flash archive. Report if problem still exist. - Check manifest file from flash archive. Repeat operation with correct flash archive. Report if problem still exist. - Internal error. Reset the loader. Report if problem still exist. - Internal error. Reset the loader. Report if problem still exist. + Reset loader. + Reset loader. If problem does'n solved report it. + Reset loader. If problem does'n solved report it. + Check ZIP archive. Reset loader. If problem doesn't solved, report it. + Check input parameters. Repeat operation with correct input. + Possible damaged elf file. Retry operation and reset loader. If problem doesn't solved report it. + Check input parameters. Retry operation. + Some information in boot image doesn't agree. Check software that you flash. + Internal error. Reset loader. If problem doesn't solved, report it. + Invalid boot image. Check software that you flash. + Internal limitation. Report this problem. + The boot record with that ID is never written. + The boot record with that ID was not written. + For successfully writing in flash boot record must be a multiple of four bytes. + Check manifest file from flash archive. Repeat operation with correct flash archive. Report if problem still exist. + Check manifest file from flash archive. Repeat operation with correct flash archive. Report if problem still exist. + Internal error. Reset the loader. Report if problem still exist. + Internal error. Reset the loader. Report if problem still exist. - Check the module number and try again. - Use List Cases command to see available modules for testing. - Use List Cases command to see available test cases. - Use List Cases command to see available test cases. - Use List Interface command to see available internal groups. - Use List Interface command to see if is any available internal group. - Use List Interface command to see if specified internal function exist. - Use List Interface command to see if there's any available internal function. - Precondition is already set. If you want to change it, recover precondition, and than set it again. - You cannot recover condition that is not set before. There's no need of any further activities in order to resolve this problem. Loader will work fine. + Check the module number and try again. + Use List Cases command to see available modules for testing. + Use List Cases command to see available test cases. + Use List Cases command to see available test cases. + Use List Interface command to see available internal groups. + Use List Interface command to see if is any available internal group. + Use List Interface command to see if specified internal function exist. + Use List Interface command to see if there's any available internal function. + Precondition is already set. If you want to change it, recover precondition, and than set it again. + You cannot recover condition that is not set before. There's no need of any further activities in order to resolve this problem. Loader will work fine. - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist - Internal error.Possible hardware malfunction. Please report this problem immediately - The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value - Internal error. Reset loader. Report if problem still exist - It is not allowed to write in already locked OTP area + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist + Internal error.Possible hardware malfunction. Please report this problem immediately + The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value + Internal error. Reset loader. Report if problem still exist + It is not allowed to write in already locked OTP area - If specified property cannot be found by COPS module. - If user try to change IMEI in COPS while IMEI is set as non - changeable in OTP area. - If some security operation cannot be accomplished due to various reasons. - . - Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - If you are trying to install flash patch ,please make sure that version of ROM patch is greater than already installed. Reinstallation of OTP patch is not allowed. - ROM Patch in Flash is successfuly reinstalled. - .Please make sure that version of Root key is the same with already installed - Root Key is successfuly reinstalled. + If specified property cannot be found by COPS module. + If user try to change IMEI in COPS while IMEI is set as non - changeable in OTP area. + If some security operation cannot be accomplished due to various reasons. + . + Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + If you are trying to install flash patch ,please make sure that version of ROM patch is greater than already installed. Reinstallation of OTP patch is not allowed. + ROM Patch in Flash is successfuly reinstalled. + .Please make sure that version of Root key is the same with already installed + Root Key is successfuly reinstalled. - Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist - No data was written in the specified unit. Write data to the unit and than perform read operation. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist - Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - - Internal error. Reset loader. Report if problem still exist. - Possible wrong or missing configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. + Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist + No data was written in the specified unit. Write data to the unit and than perform read operation. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist + Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + + Internal error. Reset loader. Report if problem still exist. + Possible wrong or missing configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem. - Init request is twice called and state is changed. Should be sent Update request then can be used Init request again. - Use the implemented change operation. + Init request is twice called and state is changed. Should be sent Update request then can be used Init request again. + Use the implemented change operation. - - Internal error. Reset loader. Report if problem still exist. - It is possible that part of the operation has been carried out. - Internal error. Report the problem. - Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Check input parameters. Repeat operation. Report if problem still exist. - Possible hardware malfunction, or error in HW configuration.Reset loader,report if problem still exist. - Operation is completed. - NOR memory is not present or some hardware malfunction occurred. + + Internal error. Reset loader. Report if problem still exist. + It is possible that part of the operation has been carried out. + Internal error. Report the problem. + Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Check input parameters. Repeat operation. Report if problem still exist. + Possible hardware malfunction, or error in HW configuration.Reset loader,report if problem still exist. + Operation is completed. + NOR memory is not present or some hardware malfunction occurred. - It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist - .Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Implementation it is not supported anymore. - Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size. - Current transfer is not finished. + It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist + .Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Implementation it is not supported anymore. + Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size. + Current transfer is not finished. - Simultaneous data and flag transaction. - Incorrect number of bits received. - .Reset loader.Report if problem still exist. - Reset loader.Report if problem still exist. - Reset loader.Report if problem still exist. + Simultaneous data and flag transaction. + Incorrect number of bits received. + .Reset loader.Report if problem still exist. + Reset loader.Report if problem still exist. + Reset loader.Report if problem still exist. - Wrong value passed as state for the communication relay and hence it can't be used. Try setting some of predifined communication relay states. - Communication relay is set in error state or it is not configured properly. Check the relay state. If error occured restart the loader, otherwise try reconfiguring the relay. + Wrong value passed as state for the communication relay and hence it can't be used. Try setting some of predifined communication relay states. + Communication relay is set in error state or it is not configured properly. Check the relay state. If error occured restart the loader, otherwise try reconfiguring the relay. - It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist - .Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. - Implementation it is not supported anymore. - Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size. - Current transfer is not finished. + It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist + .Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved. + Implementation it is not supported anymore. + Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size. + Current transfer is not finished. - Incorrect number of bits received. - .Reset loader.Report if problem still exist. - Reset loader.Report if problem still exist. - Reset loader.Report if problem still exist. + Incorrect number of bits received. + .Reset loader.Report if problem still exist. + Reset loader.Report if problem still exist. + Reset loader.Report if problem still exist. + + + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . - The verification of ChipID list failed. - The function that was called did not have correct parameters passed. - Some unexpected error occurs.Reset the loader.If problem does'n solved report it - The verification of hash list in Loader Security Library failed. - The verification of the header has failed. - Successful verification of the header. - Internal error. Reset loader. Report if problem still exist. - Restart the loader. - Restart the loader. - Restart the loader. - nternal error. Reset loader. Report if problem still exist. - nternal error. Reset loader. Report if problem still exist. - Try to use the appropriate authentication type (control key or CA certificate). - Restart the laoder and use the correct control keys or CA certificate to authenticate. - Possible error in hardware configuration, or hardware malfunction.Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Internal error. Reset loader. Report if problem still exist. - Verify that authentication is performed with correct control keys, otherwise report this error. - Verify that CA certifiacte which is used is valid and appropiate for the HW on which authentication is performed,otherwise report this error. - An error ocured while parsing X.509 certificate. Check that certificate structure is valid. - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exis - Verify that Bind properties is already performed. Report if problem still exist - Verify that the data is correct and flash is not corupted. Report if problem still exist - Internal error.Please reset the loader and try again.Please report if problem still exist. - Internal error. Possible hardware malfunction. Please report this problem immediately. - Internal error.Possible hardware malfunction. Please report this problem immediately. - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist> - You are not allowed to write in already locked OTP area. - The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value. - Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist - Internal error. Reset loader. Report if problem still exist - Check the authentication level and try again. Report if problem still exist - Internal error. Reset loader. Report if problem still exist. - Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed. - Check the authentication level and try again. Report if problem still exist - If boot block is corrupted or do not exist, processFile command should be used to flash the new boot record or recovery domain data to generate the boot record template. - If domain data are corrupted or do not exist should be use the bind properties command or recover domain data to generate the new domain data. - Select appropriated domain. - Verify that challene data block is created properly. - Cuurent opertaion can be executed only on Debug HW. + The verification of ChipID list failed. + The function that was called did not have correct parameters passed. + Some unexpected error occurs.Reset the loader.If problem does'n solved report it + The verification of hash list in Loader Security Library failed. + The verification of the header has failed. + Successful verification of the header. + Internal error. Reset loader. Report if problem still exist. + Restart the loader. + Restart the loader. + Restart the loader. + nternal error. Reset loader. Report if problem still exist. + nternal error. Reset loader. Report if problem still exist. + Try to use the appropriate authentication type (control key or CA certificate). + Restart the laoder and use the correct control keys or CA certificate to authenticate. + Possible error in hardware configuration, or hardware malfunction.Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Internal error. Reset loader. Report if problem still exist. + Verify that authentication is performed with correct control keys, otherwise report this error. + Verify that CA certifiacte which is used is valid and appropiate for the HW on which authentication is performed,otherwise report this error. + An error ocured while parsing X.509 certificate. Check that certificate structure is valid. + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exis + Verify that Bind properties is already performed. Report if problem still exist + Verify that the data is correct and flash is not corupted. Report if problem still exist + Internal error.Please reset the loader and try again.Please report if problem still exist. + Internal error. Possible hardware malfunction. Please report this problem immediately. + Internal error.Possible hardware malfunction. Please report this problem immediately. + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist> + You are not allowed to write in already locked OTP area. + The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value. + Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist + Internal error. Reset loader. Report if problem still exist + Check the authentication level and try again. Report if problem still exist + Internal error. Reset loader. Report if problem still exist. + Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed. + Check the authentication level and try again. Report if problem still exist + If boot block is corrupted or do not exist, processFile command should be used to flash the new boot record or recovery domain data to generate the boot record template. + If domain data are corrupted or do not exist should be use the bind properties command or recover domain data to generate the new domain data. + Select appropriated domain. + Verify that challene data block is created properly. + Cuurent opertaion can be executed only on Debug HW. - Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - Reset loader. Report if problem still exist. - Reset loader. Report if problem stil exist. - Possible error in HW configuration. Try to reset the loader and if problem still exist, report it. - Possible error in HW configuration. Try to reset the loader and if problem still exist, report it. - Verify that the flash image is valid, otherwise report the problem. - Reset loader. Report if problem still exist. - The loader will start with the default settings. + Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + Reset loader. Report if problem still exist. + Reset loader. Report if problem stil exist. + Possible error in HW configuration. Try to reset the loader and if problem still exist, report it. + Possible error in HW configuration. Try to reset the loader and if problem still exist, report it. + Verify that the flash image is valid, otherwise report the problem. + Reset loader. Report if problem still exist. + The loader will start with the default settings. - . - The selected property is not supported by the loader. - . - .Property value does not exist. - . - . - Internal error. Reset loader. If problem doesn't solved, report it. - Specify the correct time. - Check if property id exists. - . - This command is not supported. - Internal error. Reset loader. - . - Check if input parameters are in the correct format. - The command group is not supported. Check the command documentation. - Reset loader. If problem doesn't solved, report it. - . - . - Restart loader, if the problem still exists report it. - Restart loader, if the problem still exists report it. - . - - - Restart loader, if the problem still exists report it. - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - Buffer is not big enough. - . - . - . - . - Error encountered when loader tried to change MMU setting. - Error encountered when loader tried to startup on invalid Hardware. - - - - - - - - - - - - - - - . - . - . - . - . - . - . - Loaded file does not contain a valid partition table. Please load a file containing partition table. - . - . - . - . - . - Non fatal error. - . - . - . - . - - - - - - + . + The selected property is not supported by the loader. + . + .Property value does not exist. + . + . + Internal error. Reset loader. If problem doesn't solved, report it. + Specify the correct time. + Check if property id exists. + . + This command is not supported. + Internal error. Reset loader. + . + Check if input parameters are in the correct format. + The command group is not supported. Check the command documentation. + Reset loader. If problem doesn't solved, report it. + . + . + Restart loader, if the problem still exists report it. + Restart loader, if the problem still exists report it. + . + + + Restart loader, if the problem still exists report it. + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + Buffer is not big enough. + . + . + . + . + Error encountered when loader tried to change MMU setting. + Error encountered when loader tried to startup on invalid Hardware. + + + + + + + + + + + + + + + . + . + . + . + . + . + . + Loaded file does not contain a valid partition table. Please load a file containing partition table. + . + . + . + . + . + Non fatal error. + . + . + . + . + + + + + + - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - - + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + + - . - . - . - . - . - . - . - . - . - . - . - . - . - . - . - - - - Request for recovery condition for condition that is not changed. + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + + + + Request for recovery condition for condition that is not changed. diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h index 86e2990..6d88855 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h @@ -57,6 +57,8 @@ extern Communication_t *GlobalCommunication_p; extern Communication_t DebugCommunication; + + /******************************************************************************* * Declaration of functions ******************************************************************************/ @@ -216,6 +218,15 @@ extern "C" */ LCM_API ErrorCode_e Do_Communication_Cancel_Receiver(Communication_t *Communication_p, uint8 PacketsBeforeReceiverStop); + /** + * Function used to get the LCM version. + * + * LCM version string for the current version is placed in lcm_version.c file + * + * @retval char LCM_CurrentVersion[] After successful execution. + */ + LCM_API char *Do_Communication_GetVersion(); + #ifdef __cplusplus }; #endif // #ifdef __cplusplus diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c index e7ccd73..3db459b 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c @@ -34,6 +34,10 @@ #include "r_z_transport.h" #endif + +extern char LCM_CurrentVersion[]; + + /******************************************************************************* * File scope types, constants and variables ******************************************************************************/ @@ -463,6 +467,18 @@ ErrorExit: return ReturnValue; } +/* + * Function used to get the LCM version. + * + * LCM version string for the current version is placed in lcm_version.c file + * + * @retval char LCM_CurrentVersion[] After successful execution. + */ +char *Do_Communication_GetVersion() +{ + return LCM_CurrentVersion; +} + void Do_CommunicationInternalErrorHandler(const ErrorCode_e IntError) { #ifndef PRINT_A_ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c new file mode 100644 index 0000000..3806e59 --- /dev/null +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c @@ -0,0 +1,16 @@ +/******************************************************************************* + * Copyright (C) ST-Ericsson SA 2011 + * License terms: 3-clause BSD license + ******************************************************************************/ +/** + * @addtogroup ldr_communication_serv + * @{ + */ +/** + * var char LCM_CurrentVersion[] + * brief ASCII string variable holding the LCM version/build time/product number.. + */ + +char LCM_CurrentVersion[] = "R1V"; + +/** @} */ diff --git a/source/LCDriver.rc b/source/LCDriver.rc old mode 100755 new mode 100644 index 7fe379e..4d6b2e5 --- a/source/LCDriver.rc +++ b/source/LCDriver.rc @@ -87,9 +87,9 @@ BEGIN VALUE "FileVersion", "1, 0, 0, 1" VALUE "InternalName", "Loader Communication Driver" VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011" - VALUE "PrivateBuild", "Change-Id: I0498cbaecea78651418d11ea2643fcafa3ac4880" + VALUE "PrivateBuild", "Change-Id: If5b3c993739f93276e2a76b012a1852d687ad746" VALUE "ProductName", "CXC 173 0865, LCDriver DLL" - VALUE "ProductVersion", "PT8" + VALUE "ProductVersion", "R1T" END END BLOCK "VarFileInfo" diff --git a/source/LCDriver.vcproj b/source/LCDriver.vcproj index 23d1308..21feb76 100644 --- a/source/LCDriver.vcproj +++ b/source/LCDriver.vcproj @@ -539,6 +539,10 @@ RelativePath=".\LCDriverThread.cpp" > + + Do_BulkDataReqCallback(uiSession, uiChunkSize, uiOffset, uiLength, uiTotalLength, uiTransferedLength); } +void CLCDriverMethods::BulkReleaseBuffers(void *pObject, TL_BulkVectorList_t *BulkVector_p) +{ + CLCDriverMethods *pLcdMethods = static_cast(pObject); + return pLcdMethods->m_pBuffers->ReleaseBulkVector(BulkVector_p); +} + + void CLCDriverMethods::BulkDataEndOfDumpCallback(void *pObject) { CLCDriverMethods *pLcdMethods = static_cast(pObject); @@ -526,6 +533,10 @@ int CLCDriverMethods::Done_System_LoaderStartupStatus(char *pchVersion, int *piV CopyStringToArray(m_pCmdResult->System_LoaderStartupStatus_LoaderVersion, pchVersion, piVersionSize); CopyStringToArray(m_pCmdResult->System_LoaderStartupStatus_ProtocolVersion, pchProtocol, piProtocolSize); + //TODO: enable LCM_LDR Version check here!!!! + //LCM_t LCMType = LDR_LCM; + //VERIFY_SUCCESS(m_pLcmInterface->CommunicationCheckVersion(pchProtocol,LCMType)); + ErrorExit: if (E_SUCCESS != ReturnValue) { @@ -688,7 +699,12 @@ int CLCDriverMethods::Do_System_ExecuteSoftware(const uint32 ExecuteMode, const ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } @@ -910,6 +926,7 @@ int CLCDriverMethods::Do_Flash_ProcessFile(const char *pchPath, const char *pchT if (iUseBulk) { CLockCS lock(LCDMethodsCS); m_pLcmInterface->BulkSetCallbacks((void *)BulkCommandReqCallback, (void *)BulkDataReqCallback, (void *)BulkDataEndOfDumpCallback); + m_pLcmInterface->BulkBuffersRelease((void *)BulkReleaseBuffers); VERIFY_SUCCESS(m_pBuffers->AllocateBulkFile(pchPath)); uint64 uiLength = m_pBuffers->GetBulkFileLength(); m_uiBulkLength = uiLength; @@ -927,10 +944,14 @@ int CLCDriverMethods::Do_Flash_ProcessFile(const char *pchPath, const char *pchT ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); - if (0 != iDeleteBuffers) { - m_pBuffers->ReleaseBulkFile(); + if (0 != iDeleteBuffers) { + m_pBuffers->ReleaseBulkFile(); + } } } @@ -1008,7 +1029,11 @@ int CLCDriverMethods::Do_Flash_DumpArea(const char *pchPathToDump, uint64 uiStar ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } } return ReturnValue; @@ -1081,7 +1106,11 @@ int CLCDriverMethods::Do_Flash_FlashRaw(const char *pchPath, uint64 uiStart, uin ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } if (0 != iDeleteBuffers) { m_pBuffers->ReleaseBulkFile(); @@ -1282,7 +1311,11 @@ int CLCDriverMethods::Do_FileSystem_CopyFile(const char *pchSourcePath, int iSou ErrorExit: if (iSourceUseBulk || iDestinationUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } if (iSourceUseBulk) { m_pBuffers->ReleaseBulkFile(); @@ -1376,7 +1409,13 @@ int CLCDriverMethods::Do_FileSystem_ReadLoadModuleManifests(const char *pchTarge VERIFY_SUCCESS(WaitForEvent(EVENT_GR_RECEIVED, GROUP_FILE_SYSTEM_OPERATIONS, COMMAND_FILE_SYSTEM_OPERATIONS_READLOADMODULESMANIFESTS)); ErrorExit: - m_pBulkHandler->Finish(); + + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + return ReturnValue; } @@ -1495,7 +1534,12 @@ int CLCDriverMethods::Do_OTP_StoreSecureObject(const char *pchSourcePath, int iD ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } @@ -1580,7 +1624,11 @@ int CLCDriverMethods::Do_ParameterStorage_ReadGlobalDataSet(const char *pchGdfsI ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } } return ReturnValue; @@ -1618,7 +1666,12 @@ int CLCDriverMethods::Do_ParameterStorage_WriteGlobalDataSet(const char *pchGdfs ErrorExit: if (iUseBulk) { - m_pBulkHandler->Finish(); + if (E_SUCCESS != ReturnValue) { + m_pBulkHandler->Finish(TRUE); + } else { + m_pBulkHandler->Finish(FALSE); + } + m_pBuffers->ReleaseBulkFile(); } diff --git a/source/LCDriverMethods.h b/source/LCDriverMethods.h index 203b0e5..037b880 100644 --- a/source/LCDriverMethods.h +++ b/source/LCDriverMethods.h @@ -215,6 +215,9 @@ public: static void BulkDataEndOfDumpCallback(void *pObject); void Do_BulkDataEndOfDumpCallback(); + static void BulkReleaseBuffers(void *pObject, TL_BulkVectorList_t *BulkVector_p); + + int MapLcmError(int error); void SignalError(int error); diff --git a/source/LCM/include/t_bulk_protocol.h b/source/LCM/include/t_bulk_protocol.h index 99109e6..38ca8b4 100644 --- a/source/LCM/include/t_bulk_protocol.h +++ b/source/LCM/include/t_bulk_protocol.h @@ -35,13 +35,6 @@ /** Defined bulk error in 64 bits format. */ #define BULK_ERROR_64 0xffffffffffffffff -#ifndef CFG_ENABLE_LOADER_TYPE -/** Defined Callback functions used for bulk transfer in the LCM on PC side. */ -typedef void (*BulkCommandReqCallback_t)(void *Object_p, uint16 Session, uint32 ChunkSize, uint64 Offset, uint32 Length, boolean ACK_Read); -typedef void (*BulkDataReqCallback_t)(void *Object_p, uint16 Session, uint32 ChunkSize, uint64 Offset, uint32 Length, uint64 TotalLength, uint32 TransferedLength); -typedef void (*BulkDataEndOfDump_t)(void *Object_p); -#endif // CFG_ENABLE_LOADER_TYPE - /** Defined bulk commands. */ typedef enum { CMD_BULK_STATUS = 0x00, /**< Status packet type command. */ @@ -71,7 +64,8 @@ TYPEDEF_ENUM { WAIT_TX_DONE = 9, /**< Wait all chunks to be sent. */ WRITE_BULK_FINISH = 10, /**< Bulk acknowledge has been received, finish the write bulk process. */ - WAIT_WRITE_REQUEST = 11 /**< Wait bulk request command. */ + WAIT_WRITE_REQUEST = 11, /**< Wait bulk request command. */ + CANCEL_BULK = 12 } ENUM8(TL_BulkProtocolState_t); /** Defined bulk process states. */ @@ -162,6 +156,15 @@ typedef struct { current session is in process of sending. */ } BulkHandle_t; +#ifndef CFG_ENABLE_LOADER_TYPE +/** Defined Callback functions used for bulk transfer in the LCM on PC side. */ +typedef void (*BulkCommandReqCallback_t)(void *Object_p, uint16 Session, uint32 ChunkSize, uint64 Offset, uint32 Length, boolean ACK_Read); +typedef void (*BulkDataReqCallback_t)(void *Object_p, uint16 Session, uint32 ChunkSize, uint64 Offset, uint32 Length, uint64 TotalLength, uint32 TransferedLength); +typedef void (*BulkDataEndOfDump_t)(void *Object_p); +typedef void (*BulkBuffersRelease_t)(void *Object_p, TL_BulkVectorList_t *BulkVector_p); +#endif // CFG_ENABLE_LOADER_TYPE + + /** @} */ /** @} */ /** @} */ diff --git a/source/LcdVersion.cpp b/source/LcdVersion.cpp new file mode 100644 index 0000000..4b46588 --- /dev/null +++ b/source/LcdVersion.cpp @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (C) ST-Ericsson SA 2011 + * License terms: 3-clause BSD license + ******************************************************************************/ +#include "lcdriver_error_codes.h" +#include "LcmInterface.h" +#include "Error.h" +#ifdef _WIN32 +#include "WinApiWrappers.h" +#else +#include "LinuxApiWrappers.h" +#include +#define GetProcAddress dlsym +#endif +/** + * var char *LCD_VersionList[] + * brief ASCII string list variable holding the LCD version/build time/product number.. + */ +char *LCD_VersionList[] = {"R1V", + NULL + }; diff --git a/source/LcmInterface.cpp b/source/LcmInterface.cpp index f820603..335fbe0 100644 --- a/source/LcmInterface.cpp +++ b/source/LcmInterface.cpp @@ -15,7 +15,7 @@ #endif char *LcmInterface::m_pchLCMLibPath = 0; - +extern char *LCD_VersionList[]; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// @@ -75,6 +75,7 @@ int LcmInterface::LoadLCMLibrary() Communication.Send_Fn = (CommunicationSend_t)GetProcAddress(m_hDLL, "Do_Communication_Send"); Communication.SetProtocolTimeouts_Fn = (CommunicationSetProtocolTimeouts_t)GetProcAddress(m_hDLL, "Do_Communication_SetProtocolTimeouts"); Communication.GetProtocolTimeouts_Fn = (CommunicationGetProtocolTimeouts_t)GetProcAddress(m_hDLL, "Do_Communication_GetProtocolTimeouts"); + Communication.GetVersion_Fn = (CommunicationGetVersion_t)GetProcAddress(m_hDLL, "Do_Communication_GetVersion"); Communication.CancelReceiver_Fn = (CommunicationCancelReceiver_t)GetProcAddress(m_hDLL, "Do_Communication_Cancel_Receiver"); R15Command.Send_Fn = (R15CommandSend_t)GetProcAddress(m_hDLL, "Do_R15_Command_Send"); @@ -87,8 +88,9 @@ int LcmInterface::LoadLCMLibrary() R15Bulk.GetStatusSession_Fn = (R15BulkGetStatusSession_t)GetProcAddress(m_hDLL, "Do_R15_Bulk_GetStatusSession"); R15Bulk.CloseSession_Fn = (R15BulkCloseSession_t)GetProcAddress(m_hDLL, "Do_R15_Bulk_CloseSession"); R15Bulk.SetCallbacks_Fn = (R15BulkSetCallbacks_t)GetProcAddress(m_hDLL, "Do_R15_Bulk_SetCallbacks"); + R15Bulk.SetBuffersRelease_Fn = (R15BulkBuffersRelease_t)GetProcAddress(m_hDLL, "Do_R15_Bulk_SetBuffersRelease"); - A2Command.Send_Fn = (A2CommandSend_t)GetProcAddress(m_hDLL, "Do_A2_Command_Send"); + A2Command.Send_Fn = (A2CommandSend_t)GetProcAddress(m_hDLL, "Do_A2_Command_Send"); A2Command.SpeedflashStart_Fn = (A2SpeedflashStart_t)GetProcAddress(m_hDLL, "Do_A2_Speedflash_Start"); A2Command.SpeedflashSetLastBlock_Fn = (A2SpeedflashSetLastBlock_t)GetProcAddress(m_hDLL, "Do_A2_Speedflash_SetLastBlock"); A2Command.SpeedflashWriteBlock_Fn = (A2SpeedflashWriteBlock_t)GetProcAddress(m_hDLL, "Do_A2_Speedflash_WriteBlock"); @@ -101,6 +103,7 @@ int LcmInterface::LoadLCMLibrary() Communication.Send_Fn == 0 || Communication.SetProtocolTimeouts_Fn == 0 || Communication.GetProtocolTimeouts_Fn == 0 || + Communication.GetVersion_Fn == 0 || R15Command.Send_Fn == 0 || R15Command.ResetSessionCounters_Fn == 0 || R15Bulk.OpenSession_Fn == 0 || @@ -110,10 +113,10 @@ int LcmInterface::LoadLCMLibrary() R15Bulk.GetStatusSession_Fn == 0 || R15Bulk.CloseSession_Fn == 0 || R15Bulk.SetCallbacks_Fn == 0 || - A2Command.Send_Fn == 0 || - A2Command.SpeedflashStart_Fn == 0 || - A2Command.SpeedflashSetLastBlock_Fn == 0 || - A2Command.SpeedflashWriteBlock_Fn == 0 + A2Command.Send_Fn == 0 || + A2Command.SpeedflashStart_Fn == 0 || + A2Command.SpeedflashSetLastBlock_Fn == 0 || + A2Command.SpeedflashWriteBlock_Fn == 0 ) { return LCM_DLL_LOAD_FUNCTION_NOT_FOUND; } @@ -150,12 +153,16 @@ void LcmInterface::CloseLCMLibrary() ErrorCode_e LcmInterface::CommunicationInitialize(void *Object_p, Family_t Family, HashDevice_t *HashDevice_p, CommunicationDevice_t *CommunicationDevice_p, Do_CEH_Call_t CommandCallback_p, BuffersInterface_t *Buffers_p, TimersInterface_t *Timers_p, QueueInterface_t *Queue_p) { int ReturnValue = E_SUCCESS; + char *LCMVersion_p = NULL; + LCM_t LCMType = PC_LCM; if (m_hDLL == NULL) { CLockCS lock(m_CriticalSection); if (m_hDLL == NULL) { VERIFY_SUCCESS(LoadLCMLibrary()); + // LCMVersion_p = Communication.GetVersion_Fn(m_pCommunication); + // VERIFY_SUCCESS(CommunicationCheckVersion(LCMVersion_p, LCMType)); } } @@ -185,6 +192,28 @@ ErrorCode_e LcmInterface::CommunicationGetProtocolTimeouts(void *TimeoutData_p) return Communication.GetProtocolTimeouts_Fn(m_pCommunication, TimeoutData_p); } +ErrorCode_e LcmInterface::CommunicationCheckVersion(char *LCMVersion_p, LCM_t LCMType) +{ + + int ReturnValue = LCM_DLL_LOAD_INCOMPATIBLE_PC_VERSION; + int i = 0; + + if (LCMType == LDR_LCM) { + ReturnValue = LCM_DLL_LOAD_INCOMPATIBLE_LDR_VERSION; + } + + do { + if (strcmp(LCMVersion_p, LCD_VersionList[i]) == 0) { + ReturnValue = E_SUCCESS; + break; + } + + i++; + } while (LCD_VersionList[i] != NULL); + + return static_cast(ReturnValue); +} + ErrorCode_e LcmInterface::CommunicationShutdown() { return Communication.Shutdown_Fn(&m_pCommunication); @@ -214,6 +243,11 @@ void LcmInterface::BulkSetCallbacks(void *BulkCommandCallback_p, void *BulkDataC R15Bulk.SetCallbacks_Fn(m_pCommunication, BulkCommandCallback_p, BulkDataCallback_p, BulkDataEndOfDump_p); } +void LcmInterface::BulkBuffersRelease(void *BulkBufferRelease_p) +{ + R15Bulk.SetBuffersRelease_Fn(m_pCommunication, BulkBufferRelease_p); +} + uint32 LcmInterface::BulkOpenSession(const uint16 SessionId, const TL_SessionMode_t Mode, uint32 Length) { return R15Bulk.OpenSession_Fn(m_pCommunication, SessionId, Mode, Length); diff --git a/source/LcmInterface.h b/source/LcmInterface.h index 9525f02..021559e 100644 --- a/source/LcmInterface.h +++ b/source/LcmInterface.h @@ -24,6 +24,7 @@ typedef ErrorCode_e(*CommunicationSetFamily_t)(Communication_t *Communication_p, typedef ErrorCode_e(*CommunicationSend_t)(Communication_t *Communication_p, void *InputData_p); typedef ErrorCode_e(*CommunicationSetProtocolTimeouts_t)(Communication_t *Communication_p, void *TimeoutData_p); typedef ErrorCode_e(*CommunicationGetProtocolTimeouts_t)(Communication_t *Communication_p, void *TimeoutData_p); +typedef char*(*CommunicationGetVersion_t)(Communication_t *Communication_p); typedef ErrorCode_e(*CommunicationCancelReceiver_t)(Communication_t *Communication_p, uint8 PacketsBeforeTransferStop); typedef ErrorCode_e(*R15CommandSend_t)(Communication_t *Communication_p, CommandData_t *CmdData_p); @@ -36,6 +37,7 @@ typedef TL_BulkSessionState_t (*R15BulkGetStatusSession_t)(const Communication_t typedef uint32(*R15BulkDestroyVector_t)(const Communication_t *const Communication_p, TL_BulkVectorList_t *BulkVector_p, boolean ReqReleaseBuffer); typedef uint32(*R15BulkOpenSession_t)(const Communication_t *const Communication_p, const uint16 SessionId, const TL_SessionMode_t Mode, uint32 Length); typedef void (*R15BulkSetCallbacks_t)(Communication_t *Communication_p, void *BulkCommandCallback_p, void *BulkDataCallback_p, void *BulkDataEndOfDump_p); +typedef void (*R15BulkBuffersRelease_t)(Communication_t *Communication_p, void *BulkBuffersRelease_p); typedef ErrorCode_e(*A2CommandSend_t)(Communication_t *Communication_p, A2_CommandData_t *CmdData_p); typedef void (*A2SpeedflashStart_t)(Communication_t *Communication_p); @@ -50,6 +52,7 @@ typedef struct { CommunicationSend_t Send_Fn; CommunicationSetProtocolTimeouts_t SetProtocolTimeouts_Fn; CommunicationGetProtocolTimeouts_t GetProtocolTimeouts_Fn; + CommunicationGetVersion_t GetVersion_Fn; CommunicationCancelReceiver_t CancelReceiver_Fn; } CommunicationInterface_t; @@ -66,6 +69,7 @@ typedef struct { R15BulkDestroyVector_t DestroyVector_Fn; R15BulkOpenSession_t OpenSession_Fn; R15BulkSetCallbacks_t SetCallbacks_Fn; + R15BulkBuffersRelease_t SetBuffersRelease_Fn; } R15BulkInterface_t; typedef struct { @@ -75,6 +79,13 @@ typedef struct { A2SpeedflashWriteBlock_t SpeedflashWriteBlock_Fn; } A2CommandInterface_t; + +typedef enum { + UNKNOWN_LCM = 0, + LDR_LCM = 1, + PC_LCM = 2 +} LCM_t; + class LcmInterface { public: @@ -87,6 +98,7 @@ public: ErrorCode_e CommunicationSetFamily(Family_t family, Do_CEH_Call_t CEHCallback); ErrorCode_e CommunicationSetProtocolTimeouts(void *TimeoutData_p); ErrorCode_e CommunicationGetProtocolTimeouts(void *TimeoutData_p); + ErrorCode_e CommunicationCheckVersion(char *LCMVersion_p, LCM_t LCM_type); ErrorCode_e CommunicationShutdown(); ErrorCode_e CommunicationCancelReceiver(uint8 PacketsBeforeReceiverStop); @@ -94,6 +106,7 @@ public: ErrorCode_e CommandResetSessionCounters(); void BulkSetCallbacks(void *BulkCommandCallback_p, void *BulkDataCallback_p, void *BulkDataEndOfDump_p); + void BulkBuffersRelease(void *BulkBufferRelease_p); uint32 BulkOpenSession(const uint16 SessionId, const TL_SessionMode_t Mode, uint32 Length); TL_BulkVectorList_t *BulkCreateVector(const uint32 BulkVector, uint32 Length, const uint32 BuffSize, TL_BulkVectorList_t *CreatedBulkVector_p); ErrorCode_e BulkStartSession(TL_BulkVectorList_t *BulkVector_p, const uint64 Offset); diff --git a/source/config/lcdriver_error_codes.xml b/source/config/lcdriver_error_codes.xml index a68d939..a7f7f5c 100644 --- a/source/config/lcdriver_error_codes.xml +++ b/source/config/lcdriver_error_codes.xml @@ -83,6 +83,8 @@ --> Loading of dependant library failed. Make sure that it is placed on correct location. Some of dependend functions was not found in the given LCM library. Make sure that the version that is used is compatible. + Some of functions may not work in the given LCM library. Make sure that the PC LCM version that is used is compatible. + Some of functions may not work in the given LCM library. Make sure that the LDR LCM version that is used is compatible.