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

Bug fixes for SARA_R410 LTE E Series [ch16140] #1547

Merged
merged 3 commits into from Jun 11, 2018

Conversation

@technobly
Copy link
Member

commented Jun 9, 2018

Problem

  • GPRS URCs (CIEV: 9,x) were causing SARA_R410 to disconnect
  • Fast OTA is not working correctly for SARA_R410
  • Kore SIMs on SARA_R410 experience a UDP NAT timeout after 60s

Solution

  • GPRS URCs disabled on SARA_R410
  • disables Fast OTA for SARA_R410
  • enables 30 second ping for Kore SIMs on SARA_R410

Steps to Test

  • Test with Kore SIM on SARA_R410 E Series, should exhibit 30 second ping, port 5684 and use Slow OTA updates.
  • Test with any SIM on SARA_R410 E Series with 3rd Party credentials API with no Particle.keepAlive() API, should exhibit 23 minute ping, port 5684 and use Slow OTA updates (should connect using custom APN).
  • Test with Twilio SIM on U260 Electron, should exhibit 23 minute ping, port 4500 and use Fast OTA updates.
  • Test with Telefonica SIM on U260 Electron, should exhibit 23 minute ping, port 5684 and use Fast OTA updates.

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 (N/A)
  • Added to CHANGELOG.md after merging (add links to docs and issues)

@technobly technobly added the bug label Jun 9, 2018

@technobly technobly added this to the 0.8.0-rc.7 milestone Jun 9, 2018

@technobly technobly requested a review from sergeuz Jun 9, 2018

@technobly technobly changed the title Bug fixes for SARA_R410 LTE E Series Bug fixes for SARA_R410 LTE E Series [ch16140] Jun 9, 2018

@@ -33,6 +33,18 @@ ProtocolError ChunkedTransfer::handle_update_begin(
if (actual_len >= 20 && queue[7] == 0xFF)
{
flags = decode_uint8(queue + 8);

#if PLATFORM_ID == 10

This comment has been minimized.

Copy link
@avtolstoy

avtolstoy Jun 9, 2018

Member

Could we possibly do this in a more generic way? Bringing platform-specific stuff into communication library doesn't sound like a good idea.

One possible approach I can think of from the top of my head is adding a new protocol command (ProtocolCommands / spark_protocol_command) that would allow to force ChunkedTransfer instance to use non-Fast-OTA mode. Having such a command available we could call it either from cellular_hal, once device type is detected, or at least from the system.

This comment has been minimized.

Copy link
@technobly

technobly Jun 10, 2018

Author Member

I ended up moving this code to system_task.cpp and pushing the FAST_OTA override into the communications library as we discussed.

@technobly technobly force-pushed the fix/lte-ota-disconnects branch from 54781f6 to dcb7378 Jun 10, 2018

else if ((sscanf(cmd, "CIEV: 9,%d", &a) == 1)) {
// TODO: This should include other LTE devices,
// perhaps adding _net.act < 7
else if ((_dev.dev != DEV_SARA_R410) && (sscanf(cmd, "CIEV: 9,%d", &a) == 1)) {

This comment has been minimized.

Copy link
@sergeuz

sergeuz Jun 10, 2018

Member

A minor thing, but consider making _dev.dev != DEV_SARA_R410 a nested if under the sscanf() check, as otherwise all other sscanf() statements will still be executed for a successfully parsed CIEV URC.

This comment has been minimized.

Copy link
@technobly

technobly Jun 11, 2018

Author Member

My intention here was that if the device is the SARA_R410, it will evaluate to false and short-circuit the rest of the && expression, not running the sscanf(). As far as I can tell it works because I don't see the CIEV matched: 9,x debugging messages with SARA_R410.

@avtolstoy
Copy link
Member

left a comment

👍

@technobly technobly merged commit b20d009 into develop Jun 11, 2018

2 checks passed

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

@technobly technobly deleted the fix/lte-ota-disconnects branch Jun 11, 2018

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.