-
Notifications
You must be signed in to change notification settings - Fork 514
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
Boron LTE-M1 radio unresponsive when sending large data continuously #2100
Conversation
hal/inc/hal_platform_compat.h
Outdated
@@ -108,4 +108,8 @@ | |||
#define PRODUCT_SERIES "electron" | |||
#endif | |||
|
|||
#if PLATFORM_ID == PLATFORM_BSOM | |||
#define HAL_PLATFORM_MUXER_MAY_NEED_DELAY_IN_TX (1) | |||
#endif // PLATFORM_ID == PLATFORM_BSOM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avtolstoy Please verify if this is the correct place to set for PLATFORM_BSOM
hal/inc/hal_platform_compat.h
Outdated
@@ -108,4 +108,8 @@ | |||
#define PRODUCT_SERIES "electron" | |||
#endif | |||
|
|||
#if PLATFORM_ID == PLATFORM_BSOM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong file to define this.
bool memoryIssuePresent_ = false; | ||
unsigned registrationTimeout_; | ||
volatile bool inFlowControl_ = false; | ||
|
||
const system_tick_t largePacketTimeoutMs_ = 250; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's probably move this to the source file into the anonymous namespace constants.
system/src/system_cloud_internal.cpp
Outdated
// Boron R410M modems crash when handshake messages are sent without gap | ||
#if HAL_PLATFORM_MUXER_MAY_NEED_DELAY_IN_TX | ||
if (platform_current_ncp_identifier() == PLATFORM_NCP_SARA_R410) { | ||
HAL_Delay_Milliseconds(1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we perhaps want to query the firmware version here as well? I think it should be alright to directly query SaraNcpClient here and perhaps make the timeout come from there as well to avoid using a magic value. So something along the lines of:
#if HAL_PLATFORM_MUXER_MAY_NEED_DELAY_IN_TX
auto timeout = cellularNetworkManager()->ncpClient()->mayNeedTxDelay(); // don't judge the name :)
if (timeout > 0) {
HAL_Delay_Milliseconds(timeout);
}
#endif // HAL_PLATFORM_MUXER_MAY_NEED_DELAY_IN_TX
hal/src/boron/hal_platform_config.h
Outdated
@@ -18,6 +18,7 @@ | |||
#define HAL_PLATFORM_FUELGAUGE_MAX17043_I2C (HAL_I2C_INTERFACE2) | |||
#define HAL_PLATFORM_RADIO_ANTENNA_INTERNAL (1) | |||
#define HAL_PLATFORM_RADIO_ANTENNA_EXTERNAL (1) | |||
#define HAL_PLATFORM_MUXER_MAY_NEED_DELAY_IN_TX (1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs to be defined for B SoM: the #else condition here.
8f42924
to
39bad7c
Compare
…ssions in data channel by dropping them. Separately, add delay after spark handshake.
39bad7c
to
bc2ab95
Compare
Problem
Boron LTE-M1 cell radio becomes unresponsive (by getting stuck at an AT command) after "large" data is sent continuously over muxer data channel
Solution
Whenever we encounter a large packet, we enforce a certain number of milliseconds (set to 250ms) to pass before transmitting anything else on this channel. After we send a "large" packet (of size 512 bytes), we drop messages(bytes) for a certain amount of time defined by largePacketTimeoutMs_ (250ms)
Steps to Test
Example App - 1 - Basic connectivity to cloud since proactively sending describe messages to cloud without waiting for a request from cloud
Example App - 2 - Sending large data packets to cloud
References
ch53040
Completeness