Skip to content

Cellular: Fix to use PPP stack in PPP mode #9101

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
merged 1 commit into from
Dec 14, 2018

Conversation

jarvte
Copy link
Contributor

@jarvte jarvte commented Dec 14, 2018

Description

In QUECTEL_BG96 and QUECTEL_BC95 there was missing #ifdefs for
PPP mode and our stack was used instead of PPP stack.

@AriParkkila please review

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

In QUECTEL_BG96 and QUECTEL_BC95 there was missing #ifdefs for
PPP mode and our stack was used. Also BG96 needed to be added
AT_CellularBase::AT_CGDATA as not supported.
@jarvte jarvte force-pushed the fix_pppmode_wrong_stack branch from eaaf44d to fc4ed93 Compare December 14, 2018 07:41
@kjbracey
Copy link
Contributor

If that ifdef is the way the rest of your code is switched, then so be it.

But as a concept I'm not keen on flagging like this. "If the system supports PPP, this driver uses PPP, else it's a command-based driver". Should it not in principle be possible to drive the modem with the AT commands even if the system supports PPP? I would have thought it made more sense to have 2 driver classes - the PPP one and the non-PPP one. A single test image could exercise both...

@ciarmcom ciarmcom requested review from a team December 14, 2018 08:00
@ciarmcom
Copy link
Member

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

@jarvte
Copy link
Contributor Author

jarvte commented Dec 14, 2018

Question: Ari Parkkila is part of mbed-os-wan but he accepted this before setting mbed-os-wan as a reviewer. Now github shows that mbed-os-wan has not accepted. Is this a github issue or can we do something about this?

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 14, 2018

He was too fast :-) It's OK , We can proceed with CI now

@MarceloSalazar
Copy link

MarceloSalazar commented Dec 14, 2018

@jarvte thanks for the PR! This is important to unblock critical ongoing work.

As a side note, the enablement work on adding Cellular support for a new target (not necessarily inside Mbed OS) is not trivial - this depends on ifdef config inside Mbed OS.
This is very ugly:

#ifndef CELLULAR_DEVICE
#if defined(TARGET_ADV_WISE_1570) || defined(TARGET_MTB_ADV_WISE_1570)
#define CELLULAR_DEVICE QUECTEL_BC95
#elif TARGET_WIO_3G
#define CELLULAR_DEVICE QUECTEL_UG96
#elif TARGET_WIO_BG96
#define CELLULAR_DEVICE QUECTEL_BG96
#elif TARGET_MTS_DRAGONFLY_F411RE
#define CELLULAR_DEVICE TELIT_HE910
#elif TARGET_MTB_MTS_DRAGONFLY
#define CELLULAR_DEVICE TELIT_HE910
#elif TARGET_UBLOX_C030
#if defined(TARGET_UBLOX_C030_N211) || defined(TARGET_UBLOX_C030_R410M)
#define CELLULAR_DEVICE UBLOX_AT
#else
#define CELLULAR_DEVICE UBLOX_PPP
#endif
#elif TARGET_UBLOX_C027
#define CELLULAR_DEVICE UBLOX_PPP
#elif TARGET_MTS_DRAGONFLY_L471QG
#define CELLULAR_DEVICE SARA4_PPP

For cellular, I'd like us to consider moving to a configuration based system aligned with other solutions. For example, see connectivity drivers here for ESP8266, using mbed_app.json
https://github.com/ARMmbed/mbed-os/tree/master/components

FYI @kjbracey-arm @sg-

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 14, 2018

@MarceloSalazar Can you create a new issue and mention @ARMmbed/mbed-os-wan for review (will be triaged).

CI started

@AnttiKauppila
Copy link

@MarceloSalazar Removing CELLULAR_DEVICE macro is already ongoing: See IOTCELL-1547.

@mbed-ci
Copy link

mbed-ci commented Dec 14, 2018

Test run: SUCCESS

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

@cmonr cmonr merged commit 6380d88 into ARMmbed:master Dec 14, 2018
@jarvte jarvte deleted the fix_pppmode_wrong_stack branch December 17, 2018 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants