mbed-os/components/cellular/COMPONENT_STMOD_CELLULAR
Kimmo Vaisanen bd0f939277 Cellular: Remove support for multiple ATHandlers
Major changes:
- Dependency to FileHandle removed from base classes
- AT_CellularDevice owns the default FileHandle and shares it with AT -classes
- Hang-up -detection moved as CellularContext::configure_hup(). Cannot be configured via CellularDevice any more.

Result on NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

RAM increase is because now ATHandler is no longer created with new -operator but is now member of AT_CellularDevice,
so image tool is able to count it. Actually total RAM consumption has decreased due to removed variables.
2020-01-23 09:27:44 +02:00
..
README.md STMOD_CELLULAR: improve debug print 2019-12-03 14:22:47 +01:00
STModCellular.cpp Cellular: Remove support for multiple ATHandlers 2020-01-23 09:27:44 +02:00
STModCellular.h Adding stmod_cellular component 2019-06-19 11:05:37 +02:00
mbed_lib.json STMOD_CELLULAR: remove flow control support for DISCO_L4R9I 2019-10-07 16:20:32 +02:00

README.md

STMOD CELLULAR library

This library allows enabling the cellular module that is connected to the STMOD+ connector of the board.

Supported modems.

Currently supported cellular modules are Quectel UG96 and BG96 expansion boards that are included in p-l496g-cell01 and p-l496g-cell02 packs.

Specifications

The STMOD+ Connector specification can be found here.

Debug print

mbed_trace feature is used: https://github.com/ARMmbed/mbed-os/blob/master/features/frameworks/mbed-trace/README.md

Enable it in your mbed_app.json file:

{
    "target_overrides": {
        "*": {
            "mbed-trace.enable": 1
        }
    }
}

Look for "STMOD" group name:

[DBG ][STMOD]: STMOD_CELLULAR default instance
[INFO][STMOD]: STModCellular creation
[DBG ][STMOD]: STMOD cellular modem power ON
[INFO][STMOD]: Booting BG96
[INFO][STMOD]: Modem ready to receive AT commands
[INFO][STMOD]: Enable flow control
[DBG ][STMOD]: Flow control turned ON

Cellular tests in mbed-os

Since mbed-os-5.14.1, cellular tests have been replaced with generic mbed-os netsocket and network interface tests.

https://github.com/ARMmbed/mbed-os/blob/master/TESTS/netsocket/README.md

Here is an example of needed mbed_app.json:

{
    "config": {
        "echo-server-discard-port": {
            "help": "Discard port of echo server",
            "value": "9
        },
        "echo-server-discard-port-tls": {
            "help": "Discard port of echo server",
            "value": "2009"
        },
        "echo-server-port": {
            "help": "Port of echo server",
            "value": "7"
        },
        "echo-server-port-tls": {
            "help": "Echo port of echo server",
            "value": "2007"
        },
    },
    "target_overrides": {
        "DISCO_L496AG": {
            "target.components_add": [
                "STMOD_CELLULAR"
            ],
            "stmod_cellular.provide-default": "true",
            "nsapi.default-cellular-apn": "\"APN\"",
            "target.network-default-interface-type": "CELLULAR"
        }
    }
}
$ mbed test -t ARM -m DISCO_L496AG -v -n tests-net*

Cellular mbed-os example

https://github.com/ARMmbed/mbed-os-example-cellular

mbed import mbed-os-example-cellular
cd mbed-os-example-cellular
 
<edit mbed_app.json file as explained in the example: APN, PIN,... >
 
mbed compile -t GCC_ARM -m DISCO_L496AG --flash

Then check the serial console (serial baudrate set to 115200 bit/s)

Board with STMOD+ Connector

DISCO_L496AG

https://os.mbed.com/platforms/ST-Discovery-L496AG/

Default HW configuration:

  • STMOD pins 1, 2, 3 and 4 are mapped to UART CTS/TX/RX/RTS

BG96 expansion board is fully compatible.

DISCO_L4R9I

https://os.mbed.com/platforms/DISCO-L4R9I/

Default HW configuration:

  • STMOD pins 1 and 2 are mapped to SPI
  • STMOD pins 2 and 3 are mapped to UART TX/RX

BG96 expansion board can be used but without flow control.

DISCO_H747I

https://os.mbed.com/platforms/ST-Discovery-H747I/

Default HW configuration:

  • STMOD pins 1, 2, 3 and 4 are mapped to SPI

BG96 expansion board can not be used without solder bridges update