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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Electron/LTE] disables all eDRX AcT types [ch32051] #1762

Merged
merged 1 commit into from May 16, 2019

Conversation

@technobly
Copy link
Member

commented May 3, 2019

Problem

eDRX is enabled by default on production u-Blox modules, and it causes a variable lag in the network data transmissions. We have previously disabled it, but not entirely.

Solution

Scan for and disable each eDRX AcT type, and reset the modem if disabling is required or an error occurs.

Note: When disabling eDRX mode, the modem needs to be reset to clear eDRX behavior in the cellular network. This will cause a one time ~30s reconnection delay after OTA updating the new firmware.

Note: When eDRX mode is enabled, TX on the device temporarily allows the network to RX faster. For example, if the device published every 2 minutes and we asynchronous tried to read a Particle Variable every ~5 seconds, the device would up timing out 2-3 times in a row and succeeding 2-3 times in a row repeatedly. This affects OTA updates as well. An OTA update might never start until the device pings the Cloud and reduces the RX timing in the network. Because of this, devices with this behavior that are remote in the field might need special care in updating them remotely, Ex. a script that repeatedly tries OTA updating every 30 seconds for 30 minutes.

Steps to Test

馃敆 Electron/LTE firmware compiled for this PR-1762, v1.1.0-rc.2. Tinker included but not required.

Manual testing required:

  1. Flash LTE device with this system firmware and tinker
  2. Make a function call particle call <device> digitalwrite D7,LOW
  3. It should return 1 if successful
  4. Repeat every 30 seconds for 10 or more attempts

鈿狅笍 Should you need to for testing purposes, you may enable eDRX mode with the following commands:

sendFormated("AT+CEDRXS=2,2,\"1001\"\r\n"); waitFinalResp();
sendFormated("AT+CEDRXS=2,3,\"1001\"\r\n"); waitFinalResp();
sendFormated("AT+CEDRXS=2,4,\"1001\"\r\n"); waitFinalResp();
sendFormated("AT+CEDRXS=2,5,\"1001\"\r\n"); waitFinalResp();

References

#1567
Closes [ch32051]


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
  • [n/a] Added documentation
  • Added to CHANGELOG.md after merging (add links to docs and issues)

  • [bugfix] [Electron/LTE] disables all eDRX AcT types [ch32051] #1762

@technobly technobly added the bug label May 3, 2019

@technobly technobly added this to the 1.1.0-rc.3 milestone May 3, 2019

@technobly technobly requested review from sergeuz and jlovinger-particle May 3, 2019

@technobly technobly modified the milestones: 1.1.0-rc.3, 1.2.0-rc.1 May 10, 2019

hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Show resolved Hide resolved
@sergeuz

This comment has been minimized.

Copy link
Member

commented May 15, 2019

I approved this PR, but it looks like the handler for +CEDRXS command won't work correctly in case of multiple modem initialization attempts, because it stores the number of AcT types in a static variable which never gets reset (see this comment)

@sergeuz

This comment has been minimized.

Copy link
Member

commented May 15, 2019

@jlovinger-particle Could you test this PR? I don't have an LTE Gen 2 device

@technobly technobly removed the request for review from jlovinger-particle May 15, 2019

@technobly technobly force-pushed the fix/lte-edrx branch from 4abb7a6 to 2d9b469 May 16, 2019

@technobly technobly requested a review from sergeuz May 16, 2019

hal/src/electron/modem/enums_hal.h Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.h Outdated Show resolved Hide resolved

@sergeuz sergeuz added ready to merge and removed needs review labels May 16, 2019

@technobly technobly force-pushed the fix/lte-edrx branch from 2d9b469 to b309fd3 May 16, 2019

@technobly technobly merged commit 63fcaac into develop May 16, 2019

1 check passed

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

@technobly technobly deleted the fix/lte-edrx branch May 16, 2019

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