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

[Boron] Workaround for SARA R4 ppp session getting broken #1726

Merged
merged 10 commits into from Apr 11, 2019

Conversation

@avtolstoy
Copy link
Member

commented Mar 14, 2019

Problem

  1. PPP link gets broken on LTE Borons and SoMs when sending larget packets:
0000040423 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 40
0000040426 [hal] TRACE: Outputing 1320 bytes
0000040433 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 1316
0000042175 [hal] TRACE: Outputing 16 bytes
0000042175 [lwip] TRACE: pppos_write[3]: len=12
0000042360 [hal] TRACE: Outputing 22 bytes
0000042360 [lwip] TRACE: pppos_write[3]: len=18
0000043426 [hal] TRACE: Outputing 1321 bytes
0000043427 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 1316
0000047176 [hal] TRACE: Outputing 16 bytes
0000047176 [lwip] TRACE: pppos_write[3]: len=12
0000048361 [hal] TRACE: Outputing 22 bytes
0000048361 [lwip] TRACE: pppos_write[3]: len=18
0000049429 [hal] TRACE: Outputing 1321 bytes
0000049430 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 1316
0000052177 [hal] TRACE: Outputing 16 bytes
0000052177 [lwip] TRACE: pppos_write[3]: len=12
0000054362 [hal] TRACE: Outputing 22 bytes
0000054362 [lwip] TRACE: pppos_write[3]: len=18
0000057178 [hal] TRACE: Outputing 16 bytes
0000057178 [lwip] TRACE: pppos_write[3]: len=12
0000060363 [hal] TRACE: Outputing 22 bytes
0000060363 [lwip] TRACE: pppos_write[3]: len=18
0000061432 [hal] TRACE: Outputing 1321 bytes
0000061433 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 1316
0000062179 [hal] TRACE: Outputing 16 bytes
0000062179 [lwip] TRACE: pppos_write[3]: len=12
0000066364 [hal] TRACE: Outputing 22 bytes
0000066364 [lwip] TRACE: pppos_write[3]: len=18
0000067180 [hal] TRACE: Outputing 16 bytes
0000067180 [lwip] TRACE: pppos_write[3]: len=12
0000072181 [hal] TRACE: Outputing 16 bytes
0000072181 [lwip] TRACE: pppos_write[3]: len=12
0000072365 [lwip] TRACE: IPV6CP: timeout sending Config-Requests
0000077182 [hal] TRACE: Outputing 16 bytes
0000077182 [lwip] TRACE: pppos_write[3]: len=12
0000082183 [hal] TRACE: Outputing 16 bytes
0000082183 [lwip] TRACE: pppos_write[3]: len=12
0000085436 [hal] TRACE: Outputing 1321 bytes
0000085437 [lwip] TRACE: pppos_netif_output[3]: proto=0x21, len = 1316
0000087184 [hal] TRACE: Outputing 16 bytes
0000087184 [lwip] TRACE: pppos_write[3]: len=12
0000092185 [lwip] TRACE: No response to 10 echo-requests
0000092185 [lwip] TRACE: Serial link appears to be disconnected.
0000092186 [lwip] TRACE: ppp phase changed[3]: phase=11

Solution

  1. Decrease MTU on LTE Borons and SoMs to a lower value (NCP_SARA_R410_MTU) TODO: for now it's at 1300, should be changed to the one that actually works after the testing

Steps to Test

  1. Can be tested with MDM_01_socket_writes_with_length_more_than_1023_work_correctly

Example App

N/A

References

N/A


Completeness

  • User is totes amazing for contributing!
  • Contributor has signed CLA (Info here)
  • Problem and Solution clearly stated
  • Run unit/integration/application tests on device
  • Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

  • [Bugfix] [Boron] Workaround for SARA R4 ppp session getting broken and system power manager fix #1726
  • [Bugfix] Fixes system power manager re-enabling charging every 1s with a battery connected (now every 60s) #1726

@avtolstoy avtolstoy added this to the 1.1.0-rc.1 milestone Mar 14, 2019

@avtolstoy avtolstoy requested a review from technobly Mar 14, 2019

@avtolstoy avtolstoy changed the title [Boron] Workaround for SARA R4 ppp session getting and system power manager fix [Boron] Workaround for SARA R4 ppp session getting broken and system power manager fix Mar 14, 2019

@@ -55,6 +55,8 @@ enum class NetifEvent {
PowerOn = 5
};

unsigned NCP_SARA_R410_MTU = 1300;

This comment has been minimized.

Copy link
@technobly

technobly Mar 14, 2019

Member

Currently 1012 passes, 1013 fails.

user/build.mk Outdated Show resolved Hide resolved

@avtolstoy avtolstoy force-pushed the fix/boron-mtu-and-power-manager-watchdog branch from 64476ee to e791dae Mar 20, 2019

@avtolstoy avtolstoy changed the title [Boron] Workaround for SARA R4 ppp session getting broken and system power manager fix [Boron] Workaround for SARA R4 ppp session getting broken Mar 20, 2019

@technobly technobly force-pushed the fix/boron-mtu-and-power-manager-watchdog branch 2 times, most recently from a382680 to 4aec979 Mar 21, 2019

@avtolstoy avtolstoy added in progress and removed needs review labels Mar 25, 2019

@avtolstoy avtolstoy referenced this pull request Mar 25, 2019
4 of 6 tasks complete

@avtolstoy avtolstoy force-pushed the fix/boron-mtu-and-power-manager-watchdog branch from 44a7c81 to ed09f8d Mar 26, 2019

@@ -559,7 +559,7 @@ int SaraNcpClient::waitReady() {
// Disable voltage translator
modemSetUartState(false);
// Hard reset the modem
modemHardReset();
modemHardReset(true);

This comment has been minimized.

Copy link
@technobly

technobly Mar 28, 2019

Member

What is the optimization here? I see we now if initialization of the modem fails, we hard reset the modem which results in it turning off, and we don't turn it back on for R410. Was there a double turn on occurring and now there's only one? Any chance the turn on will not re-occur?

@technobly technobly force-pushed the fix/boron-mtu-and-power-manager-watchdog branch from e8e1e42 to 61fd163 Apr 8, 2019

@technobly technobly merged commit 31eef09 into develop Apr 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@technobly technobly deleted the fix/boron-mtu-and-power-manager-watchdog branch Apr 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.