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|bsom] u-blox R510 support #2359

Merged
merged 23 commits into from
Sep 28, 2021
Merged

Conversation

technobly
Copy link
Member

@technobly technobly commented Sep 20, 2021

Feature

  • u-blox R510 base modem support for Gen 3 Boron & B SoM

Details

  • This branch is based on feature/SARA-R510-NCP-FW-update but removes FOTA features

Testing

  • Modem can be on 3.14 ES or 3.15 IP firmware with EVT3 hardware (SARA-R510S-01B-00).
  • For B SoM EVT3 hardware and testing, it is necessary to apply this diff and use the SIM INTERNAL setting even if you are using an external SIM with the jumper soldered.
  • Run tinker-serial1-debugging and switch between Kore AT&T and EtherSIM
  • Try cold boot and warm boot, modem should register quickly with 3.15, but may have some delays with 3.14.
  • Run TEST=wiring/no_fixture_cellular and TEST=wiring/no_fixture_long_running
  • Run Dioptra tests
diff --git a/hal/network/ncp_client/sara/sara_ncp_client.cpp b/hal/network/ncp_client/sara/sara_ncp_client.cpp
index 5f20336c5..f8e6d90c9 100644
--- a/hal/network/ncp_client/sara/sara_ncp_client.cpp
+++ b/hal/network/ncp_client/sara/sara_ncp_client.cpp
@@ -1254,7 +1254,11 @@ int SaraNcpClient::selectSimCard(ModemState& state) {
                 // NOTE: [ch76449] R510S will not retain GPIO's HIGH after a cold boot
                 // Workaround: Set pin that needs to be HIGH to mode "Module status indication",
                 //             which will be set HIGH when the module is ON, and LOW when it's OFF.
-                const int internalSimMode = 10; // Module status indication mode
+                // DO NOT COMMIT
+                // DO NOT COMMIT
+                const int internalSimMode = 255;
+                // DO NOT COMMIT
+                // DO NOT COMMIT
                 if (mode != internalSimMode) {
                     const int r = CHECK_PARSER(parser_.execCommand("AT+UGPIOC=%u,%d",
                             UBLOX_NCP_SIM_SELECT_PIN, internalSimMode));

hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/network/ncp_client/sara/sara_ncp_client.cpp Outdated Show resolved Hide resolved
hal/src/electron/modem/mdm_hal.cpp Outdated Show resolved Hide resolved
@technobly technobly force-pushed the feature/SARA-R510-support2 branch 2 times, most recently from 358dd29 to 13ac9d0 Compare September 27, 2021 18:41
Copy link
Contributor

@keeramis keeramis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Plus, for quick reference, this is the dioptra results from a device, which despite pretty high connection times seems to recover and run ok - link

@technobly
Copy link
Member Author

Hmm, yeah... those long connection times are definitely due to v3.14 firmware. v3.15 is much better.

technobly and others added 12 commits September 28, 2021 17:22
commit d83dfb8
Author: keeramis <[email protected]>
Date:   Thu Jun 3 22:47:24 2021 -0500

    Add support for the new UCGED format for R510

commit eea964d
Author: Technobly <[email protected]>
Date:   Wed Apr 21 15:27:13 2021 -0500

    [WIP] Kore AT&T to use UMNOPROF=100 and UBANDMASK=0,6170,0 for R510 and R410? [ch76468]

commit 067da51
Author: Technobly <[email protected]>
Date:   Thu Apr 8 18:08:16 2021 -0500

    workaround for R510 not saving network settings [ch76696]

commit e20e3fe
Author: keeramis <[email protected]>
Date:   Tue Apr 6 23:44:38 2021 -0500

    formatting

commit 90afd35
Author: keeramis <[email protected]>
Date:   Tue Apr 6 13:05:48 2021 -0500

    Support Reset seqeunce on the R5

commit de8f4f9
Author: Technobly <[email protected]>
Date:   Fri Apr 2 13:11:16 2021 -0500

    Workaround for setting GPIO 23 HIGH on boot for R510S [ch76449]

commit b6f9b3c
Author: Technobly <[email protected]>
Date:   Tue Mar 30 20:21:31 2021 -0500

    Fixes parsing of +CEDRXS for R510

commit ba6c3f6
Author: keeramis <[email protected]>
Date:   Tue Mar 30 20:00:26 2021 -0500

    Replace CFUN=0 with CFUN=4 to set CGDCONT. Set CFUN=1,0 only when needed

commit 99a5262
Author: Technobly <[email protected]>
Date:   Thu Mar 25 19:47:24 2021 -0500

    oldFirmwarePresent_ is only applicable for R410 modems

commit 8791a8c
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:50:21 2021 -0500

    FIXME: Temporary patch to work with test devices that do not have ncpId() OTP set

commit 8f7bf6f
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:49:29 2021 -0500

    Create a CH story for this issue :)

commit 983546b
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:48:30 2021 -0500

    CFUN timeout and operation related fixes

commit f1fa4c5
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:47:20 2021 -0500

    R510 specific additions and fixes

commit 28dd016
Author: Eugene <[email protected]>
Date:   Thu Mar 25 19:51:35 2021 +0800

    hal: WIP: update sara ncp driver to just boot R510

commit 9177d4e
Author: Eugene <[email protected]>
Date:   Thu Mar 25 16:05:44 2021 +0800

    hal: add SARA R510 identifier
commit bad978e
Author: keeramis <[email protected]>
Date:   Thu Jun 3 22:47:24 2021 -0500

    Add support for the new UCGED format for R510

commit c96c347
Author: Technobly <[email protected]>
Date:   Tue May 25 17:26:38 2021 -0500

    WIP - rebase and squash 2

commit cb35715
Author: Technobly <[email protected]>
Date:   Tue Apr 20 11:36:57 2021 -0500

    WIP - rebase and squash

commit af55f74
Author: Todd Stellanova <[email protected]>
Date:   Thu Apr 15 13:56:40 2021 -0700

    share latest CEDRXS code

commit 6a1436a
Author: Todd Stellanova <[email protected]>
Date:   Thu Apr 15 12:18:35 2021 -0700

    remove some debug logs, more CEDRXS tests

commit 6641b23
Author: Todd Stellanova <[email protected]>
Date:   Thu Apr 15 11:26:22 2021 -0700

    bring back CEDRXS parsing for R510 format

commit 53c4b8e
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 13 11:57:42 2021 -0700

    cleanup Gen2 branch for merge

commit 9dd1ab0
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 16:24:51 2021 -0700

    only process UUPSDD if we're still attached

commit 2132589
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 16:05:17 2021 -0700

    for now ignore UUPSDD URCs on R510

commit abd9d29
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 11:34:52 2021 -0700

    urat changes and more debug

commit 2161ee7
Merge: 00e3306 7289726
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 10:12:23 2021 -0700

    Merge branch 'feature/ch76511' of https://github.com/particle-iot/device-os into feature/ch76511

commit 00e3306
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 09:47:03 2021 -0700

    change reset pin timing for r510 per ch76727

commit 5b90f39
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 08:51:36 2021 -0700

    use CSQ for now for signal RSRP

commit 0b1d9c9
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:56:35 2021 -0700

    add some support for UPSND

commit b8ba678
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:35:57 2021 -0700

    CFUN=0 on disconnect

commit e7109e6
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:27:12 2021 -0700

    faster first AT response

commit 1ce55c2
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 12:53:47 2021 -0700

    remove debug logging, reduce changeset

commit 90d1b02
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 16:19:16 2021 -0700

    fixes to get IP started

commit 6a2d437
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 10:50:40 2021 -0700

    avoid CFUN errors on R510

commit 6a21b95
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 10:41:18 2021 -0700

    first somewhat working changes

commit 7289726
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 09:47:03 2021 -0700

    change reset pin timing for r510 per ch76727

commit 7a651df
Author: Todd Stellanova <[email protected]>
Date:   Wed Apr 7 08:51:36 2021 -0700

    use CSQ for now for signal RSRP

commit e20e3fe
Author: keeramis <[email protected]>
Date:   Tue Apr 6 23:44:38 2021 -0500

    formatting

commit 90afd35
Author: keeramis <[email protected]>
Date:   Tue Apr 6 13:05:48 2021 -0500

    Support Reset seqeunce on the R5

commit f6b95fc
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:56:35 2021 -0700

    add some support for UPSND

commit 045e111
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:35:57 2021 -0700

    CFUN=0 on disconnect

commit 20b844b
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 13:27:12 2021 -0700

    faster first AT response

commit 37e1af3
Author: Todd Stellanova <[email protected]>
Date:   Tue Apr 6 12:53:47 2021 -0700

    remove debug logging, reduce changeset

commit 64f1c72
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 16:19:16 2021 -0700

    fixes to get IP started

commit 1cc4dd7
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 10:50:40 2021 -0700

    avoid CFUN errors on R510

commit 6b62515
Author: Todd Stellanova <[email protected]>
Date:   Mon Apr 5 10:41:18 2021 -0700

    first somewhat working changes

commit de8f4f9
Author: Technobly <[email protected]>
Date:   Fri Apr 2 13:11:16 2021 -0500

    Workaround for setting GPIO 23 HIGH on boot for R510S [ch76449]

commit b6f9b3c
Author: Technobly <[email protected]>
Date:   Tue Mar 30 20:21:31 2021 -0500

    Fixes parsing of +CEDRXS for R510

commit ba6c3f6
Author: keeramis <[email protected]>
Date:   Tue Mar 30 20:00:26 2021 -0500

    Replace CFUN=0 with CFUN=4 to set CGDCONT. Set CFUN=1,0 only when needed

commit 99a5262
Author: Technobly <[email protected]>
Date:   Thu Mar 25 19:47:24 2021 -0500

    oldFirmwarePresent_ is only applicable for R410 modems

commit 8791a8c
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:50:21 2021 -0500

    FIXME: Temporary patch to work with test devices that do not have ncpId() OTP set

commit 8f7bf6f
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:49:29 2021 -0500

    Create a CH story for this issue :)

commit 983546b
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:48:30 2021 -0500

    CFUN timeout and operation related fixes

commit f1fa4c5
Author: Technobly <[email protected]>
Date:   Thu Mar 25 18:47:20 2021 -0500

    R510 specific additions and fixes

commit 28dd016
Author: Eugene <[email protected]>
Date:   Thu Mar 25 19:51:35 2021 +0800

    hal: WIP: update sara ncp driver to just boot R510

commit 9177d4e
Author: Eugene <[email protected]>
Date:   Thu Mar 25 16:05:44 2021 +0800

    hal: add SARA R510 identifier
- Move ncp_fw_update.cpp to services/ instead of system/ since we have more space available there
- Save state_, status_, firmwareVersion_ variables and more in retained system memory to ensure
  - we complete install and waiting
  - we do enter and exit safe mode fw updating cleanly
  - we do not get stuck in a fail-retry loop
- Refactor retained structure to use systemCache instead
- Add retry failures, and error status.
- Create a database of starting firmware version / desired firmware version / filename / MD5SUM value, similar to APN DB
- Add a final status log
- Add final status to Device Diagnostics
- Allow user firmware to pass a database entry that overrides the system firmware update database for testing purposes
- Some fixes for sara_ncp_client
  - If UMNOPROF? errors, perform a factory reset
  - Add a way to skip PPP data connection to allow HTTPS FOTA download over internal PDP context
  - skip interveneRegistration for R510
@technobly technobly dismissed avtolstoy’s stale review September 28, 2021 23:48

so we can unblock the merge

@technobly technobly added ready to merge PR has been reviewed and tested and removed needs review labels Sep 28, 2021
@technobly technobly merged commit a1b0659 into develop Sep 28, 2021
@technobly technobly deleted the feature/SARA-R510-support2 branch September 28, 2021 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge PR has been reviewed and tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants