Skip to content

Disable the cell AUX UART by default on EP_AGORA #12258

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

Merged

Conversation

trowbridgec
Copy link

Summary of changes

Disables the auxiliary UART of the cell module on the EP_AGORA target by default. This was causing issues in the mbed-os-example-pelion example because the auxiliary UART is muxed with the default standard output UART. Therefore, if the auxiliary UART on the cell module is enabled, it has the undesired effect of receiving and attempting to parse the debug output as an AT command. When the parsing fails, it echoes back an error in the form:

<input string> + CME ERROR: unknown

In the mbed-os-example-pelion example, this would result in undesired characters being received via standard input and subsequently undesired application behavior.

So, the best path forward is to disable the auxiliary UART by default and let a user enable it if/when needed.

From the Telit ME910C1 AT command reference guide, for the AT#PORTCFG command (page 76) a Variant value of 0 enables the main cell module UART and 2 USB interfaces and does not enable the auxiliary UART (USIF1):

#PORTCFG: Variant=0: AT= USIF0 USB0 USB1
#PORTCFG: Variant=3: AT= USIF0 USIF1 USB0
#PORTCFG: Variant=8: AT= USB0 USB1
#PORTCFG: Variant=13: AT= USIF0 USB0; CMUX

Therefore, changing from a Variant value of 3 to a value of 0 should effectively disable the auxiliary UART.

NOTE: As stated in the AT command reference guide, this setting change does not take effect until the cell module is rebooted, but should only ever have to be configured once.

Impact of changes

The auxiliary UART of the cell module is disabled by default.

Migration actions required

None.

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@linlingao


@trowbridgec
Copy link
Author

@ARMmbed/team-embeddedplanet @maclobdell

@0Grit
Copy link

0Grit commented Jan 14, 2020

@ARMmbed/team-embeddedplanet

@trowbridgec trowbridgec force-pushed the disable-ep_agora-cell-aux-uart-by-default branch from f95e213 to 3ed710f Compare January 14, 2020 17:03
@trowbridgec
Copy link
Author

I pushed new changes which makes the port configuration (AT#PORTCFG) configurable via a user's mbed_app.json file (default is still 0: auxiliary UART disabled). The new setting is exposed as ep-agora.port-configuration-variant.

@@ -114,7 +114,7 @@ nsapi_error_t ONBOARD_TELIT_ME910::init()
// AT#PORTCFG=0
// Set command allows to connect Service Access Points to the external physical ports giving a great
// flexibility. Examples of Service Access Points: AT Parser Instance #1, #2, #3, etc..
_at->at_cmd_discard("#PORTCFG", "=3");
_at->at_cmd_discard("#PORTCFG", "=", EP_AGORA_PORT_CONFIGURATION_VARIANT);

Copy link
Contributor

Choose a reason for hiding this comment

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

This line is missing a "%d".
Should be _at->at_cmd_discard("#PORTCFG", "=", "%d", EP_AGORA_PORT_CONFIGURATION_VARIANT);

Copy link
Author

Choose a reason for hiding this comment

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

Ah, you're right! Change added.

@trowbridgec trowbridgec force-pushed the disable-ep_agora-cell-aux-uart-by-default branch from 3ed710f to a21a006 Compare January 14, 2020 17:55
@ciarmcom ciarmcom requested review from linlingao and a team January 14, 2020 18:00
@ciarmcom
Copy link
Member

@trowbridgec, thank you for your changes.
@linlingao @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 15, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jan 15, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 15, 2020

We are investigating, CI tests are not executing, might restart CI

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 15, 2020

All good, no execution of tests as this is target is not in the CI , thus skipped that stage.

@0xc0170 0xc0170 added release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0 and removed ready for merge labels Jan 15, 2020
@0xc0170 0xc0170 merged commit 4c4ed0a into ARMmbed:master Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-2 Second pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants