ARMmbed / mbed-os-example-cellular

This is an example based on mbed-os cellular APIs that demonstrates a TCP or UDP echo transaction with a public echo server.
Apache License 2.0
21 stars 45 forks source link

L496 stmod #142

Closed LMESTM closed 5 years ago

LMESTM commented 5 years ago

This PR adds the stmod_cellular lib and enables it for DISCO_L496AG target. This allows using the example with DISCO_L496AG + Quectel BG96 expansion board; also called the p-l496g-cell02 PACK. (https://www.st.com/en/evaluation-tools/p-l496g-cell02.html)

Log when running application on p-L496-cell02 pack

mbed-os-example-cellular

Built: May 21 2019, 13:28:08

[MAIN], plmn: NULL Establishing connection ...

Connection Established. TCP: connected with echo.mbedcloudtesting.com server TCP: Sent 4 Bytes to echo.mbedcloudtesting.com Received from echo server 4 Bytes .

Success. Exiting

LMESTM commented 5 years ago

cc @jeromecoutant @ithinuel @MarceloSalazar

LMESTM commented 5 years ago

@MarceloSalazar Could anyone have a look at this PR ? I can see the automated checks have failed but I can't access the logs - can someone also share more details about the failure ?

LMESTM commented 5 years ago

@AnttiKauppila could you explain why ? We had agreed on the stmod lib approach with @ithinuel and @MarceloSalazar The target use case is rather the mbed cloud client example, but this cellular example is a good first step.

AnttiKauppila commented 5 years ago

Why don't you create a new example for that. Why would all example users need to clone the new lib when they don't need it? We want to keep this example clean of anything unrelated.

LMESTM commented 5 years ago

Rationale is that STMOD lib is not a new modem in itself, it inherits from UB96/BG96 support in mbed-os. The lib only manages the HW connector and init procedure. Creating a separate example would mean duplicate efforts for maintaining example with any update of cellular API or mbed-os version change. Also separate example would not have the same visibility as the standard mbed-os example.

ithinuel commented 5 years ago

@LMESTM It failed because the STMOD pin symbols are not defined when compiling for other boards. A solution could be to default those pins to NC and use config specific to this target in mbed_lib.json

@AnttiKauppila Maybe having this living in a branch could be a compromise ? This might mean that it would not be tested in CI.

AnttiKauppila commented 5 years ago

@ithinuel Are you going to do compromise with other vendors as well going forward? This is totally wrong place for this. Options are to create a new target for Mbed OS or to create own example for this.

MarceloSalazar commented 5 years ago

@AnttiKauppila this is an mbed enabled platform and a priority moving forward. We need to add this until the Bg96 driver in Mbed OS is able to support this functionality out of the box.

AnttiKauppila commented 5 years ago

@MarceloSalazar You can create a new example until this functionality is supported by Mbed OS.

LMESTM commented 5 years ago

Ok trying to move on. This example doesn't have a real added value to users so I think that will not create another example copy to limit the maintenance efforts. Probably it's better for now to directly try and get https://github.com/ARMmbed/mbed-cloud-client-example running as a reference example for this target.

AnttiKauppila commented 5 years ago

@LMESTM Could you please provide information about what this feature would require to land on Mbed OS? I see there might be a good reason to add this to Mbed OS and I need more information so that our team can start investigating this. Marcelo was indicating there is some work needed to land this to Mbed OS master and I would like to know what it is.