Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle undefined message when sending AT command #110

Merged
merged 54 commits into from
Oct 6, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
210a55c
Update cellular library to MIT license
chinglee-iot Mar 29, 2021
298ae4c
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jun 30, 2021
21ea9bc
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jul 16, 2021
6690f3b
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jul 23, 2021
4a58d89
Merge branch 'FreeRTOS:main' into main
chinglee-iot Aug 24, 2021
955ebc0
Merge branch 'FreeRTOS:main' into main
chinglee-iot Oct 25, 2021
bba8adf
Merge branch 'FreeRTOS:main' into main
chinglee-iot Nov 4, 2021
440bec9
Merge branch 'FreeRTOS:main' into main
chinglee-iot Nov 9, 2021
a0fb7c7
Merge branch 'FreeRTOS:main' into main
chinglee-iot Nov 16, 2021
b28ed63
Merge branch 'FreeRTOS:main' into main
chinglee-iot Nov 24, 2021
b40cb10
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 1, 2021
ca024c6
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 1, 2021
277d8b7
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 15, 2021
06402e9
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 21, 2021
a993410
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 21, 2021
45b9bcd
Merge branch 'FreeRTOS:main' into main
chinglee-iot Dec 27, 2021
cacbf87
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jan 6, 2022
128407c
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jan 7, 2022
b1e3e46
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jan 10, 2022
70e76c4
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jan 11, 2022
107896c
Merge branch 'FreeRTOS:main' into main
chinglee-iot Feb 7, 2022
b3f4fab
Merge branch 'FreeRTOS:main' into main
chinglee-iot Mar 15, 2022
5027c96
Merge branch 'FreeRTOS:main' into main
chinglee-iot Apr 27, 2022
61f5c46
Merge branch 'FreeRTOS:main' into main
chinglee-iot May 11, 2022
14cb0e7
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jun 7, 2022
7a5972d
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jun 22, 2022
a566304
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jul 1, 2022
9dd71d0
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jul 7, 2022
4584fbb
Merge branch 'FreeRTOS:main' into main
chinglee-iot Jul 18, 2022
74bfc9d
Merge branch 'FreeRTOS:main' into main
chinglee-iot Sep 23, 2022
dcff898
Merge branch 'FreeRTOS:main' into main
chinglee-iot Sep 28, 2022
607a810
Use PktRespMutex in pktio thread
chinglee-iot Sep 29, 2022
ca85365
Update pktio to handle undefined message when sending AT command
chinglee-iot Sep 29, 2022
ca70d3f
Fix uncrustify
chinglee-iot Sep 29, 2022
b819f36
Fix lexicon
chinglee-iot Sep 29, 2022
d456d75
Fix unit test compile warning
chinglee-iot Sep 29, 2022
d59fa57
Update size
chinglee-iot Sep 29, 2022
14d1e2c
Fix typo
chinglee-iot Sep 29, 2022
7b94c6b
Reduce the lock range
chinglee-iot Sep 30, 2022
6cbb2d2
Update for CI
chinglee-iot Sep 30, 2022
4b24847
Fix memory and CI again
chinglee-iot Sep 30, 2022
0c1f0a2
Fix CI
chinglee-iot Sep 30, 2022
d667270
Add more test case for coverage
chinglee-iot Sep 30, 2022
1c627e7
Add response prefix test case
chinglee-iot Sep 30, 2022
4fd030d
Fix formatting
chinglee-iot Sep 30, 2022
93c9fad
Remove unnecessary comment
chinglee-iot Oct 4, 2022
f9343a3
Update HL7802 for ATE0
chinglee-iot Oct 4, 2022
9049b6e
Update HL7802 ATE0 type
chinglee-iot Oct 4, 2022
647e5c2
Update ATE0
chinglee-iot Oct 4, 2022
56c75f9
Remove comm interface resp lock
chinglee-iot Oct 4, 2022
aa3956e
Fix typo
chinglee-iot Oct 4, 2022
35591ad
Update size
chinglee-iot Oct 5, 2022
2fb0fb7
Fix comment
chinglee-iot Oct 5, 2022
635b0bf
Update complexity
chinglee-iot Oct 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix comment
chinglee-iot committed Oct 5, 2022
commit 2fb0fb76d8c101de5fb7215167aba9af852f0e85
12 changes: 11 additions & 1 deletion source/cellular_pktio.c
Original file line number Diff line number Diff line change
@@ -708,7 +708,7 @@ static CellularPktStatus_t _handleMsgType( CellularContext_t * pContext,
( void ) pContext->pPktioHandlepktCB( pContext, AT_SOLICITED, *ppAtResp );
}

/* Clean the command type. Further response from cellular modem won't be
/* Reset the command type. Further response from cellular modem won't be
* regarded as AT_SOLICITED response. */
PlatformMutex_Lock( &pContext->PktRespMutex );
pContext->PktioAtCmdType = CELLULAR_AT_NO_COMMAND;
@@ -752,10 +752,20 @@ static CellularPktStatus_t _handleMsgType( CellularContext_t * pContext,
LogError( ( "recvdMsgType is AT_UNDEFINED for Message: %s, cmd %s",
pLine,
( pContext->pCurrentCmd != NULL ? pContext->pCurrentCmd : "NULL" ) ) );

/* Reset the command type. */
PlatformMutex_Lock( &pContext->PktRespMutex );
pContext->PktioAtCmdType = CELLULAR_AT_NO_COMMAND;
pContext->pRespPrefix = NULL;
PlatformMutex_Unlock( &pContext->PktRespMutex );

/* Clean the read buffer and read pointer. */
( void ) memset( pContext->pktioReadBuf, 0, PKTIO_READ_BUFFER_SIZE + 1U );
pContext->pPktioReadPtr = NULL;
pContext->partialDataRcvdLen = 0;
FREE_AT_RESPONSE_AND_SET_NULL( *ppAtResp );

/* Return invalid data error code. */
pkStatus = CELLULAR_PKT_STATUS_INVALID_DATA;
}
else