mbed-os/features/cellular/README.md

88 lines
3.1 KiB
Markdown
Raw Normal View History

# Mbed cellular connectivity
2018-02-20 14:01:18 +00:00
This is the Github repo for Mbed cellular connectivity:
easy_cellular/
EasyCellularConnection Simplified cellular usage based on `CellularBase.h`
CellularConnectionUtil A utility class for cellular connection
2018-02-20 14:01:18 +00:00
framework/
API Application Programming Interface for cellular connectivity
AT AT implementation based on 3GPP TS 27.007 specification
common Common and utility sources
targets Vendor specific cellular module adaptations
2018-03-27 12:16:37 +00:00
TESTS Cellular Greentea test
UNITTESTS Cellular unit test
## Known limitations
2018-02-20 14:01:18 +00:00
2018-03-02 08:38:59 +00:00
**Please note that this is a first release of Cellular framework and is subject to further development in future.**
2018-02-20 14:01:18 +00:00
Only UDP is supported when using AT commands to control sockets in an IP stack built into the cellular modem. If TCP is required, use the PPP/LWIP stack.
2018-02-20 14:01:18 +00:00
## Supported modules
2018-02-20 14:01:18 +00:00
You can find currently supported cellular modules in the `framework/targets/` folder, where we also add support for new cellular modules.
2018-02-20 14:01:18 +00:00
## Cellular configuration
2018-02-20 14:01:18 +00:00
2018-03-27 12:16:37 +00:00
You can change cellular defaults in the `mbed_lib.json` configuration file.
You can also override cellular defaults in the `mbed_app.json` configuration file:
2018-02-20 14:01:18 +00:00
"config": {
"cellular_plmn": {
"help": "PLMN selection, 0=auto",
"value": 0
},
"apn": {
"help": "Access point name, e.g. internet",
"value": "\"internet\""
},
"cellular_sim_pin": {
"help": "PIN code",
"value": "\"1234\""
}
}
## Debug traces
2018-02-20 14:01:18 +00:00
You can define the debug tracing level in the `mbed_app.json` configuration file:
2018-02-20 14:01:18 +00:00
"target_overrides": {
"*": {
"target.features_add": ["COMMON_PAL"],
"mbed-trace.enable": true,
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 115200,
"platform.default-serial-baud-rate": 115200
}
},
"config": {
"trace-level": {
"help": "Options are TRACE_LEVEL_ERROR,TRACE_LEVEL_WARN,TRACE_LEVEL_INFO,TRACE_LEVEL_DEBUG",
"macro_name": "MBED_TRACE_MAX_LEVEL",
"value": "TRACE_LEVEL_INFO"
}
}
2018-03-27 12:16:37 +00:00
## Greentea tests
The `TESTS` folder contains Greentea tests for cellular specific classes. You need to give relevant configuration file with `--app-config` parameter, e.g.:
2018-05-02 07:26:27 +00:00
mbed test -n features-cellular-tests-* --app-config features\cellular\TESTS\socket\udp\template_mbed_app.json.txt -v
2018-03-27 12:16:37 +00:00
Note that Greentea tests use SIM PIN so you need to change that or your SIM card may get locked.
## Unit tests
The `UNITTESTS` folder contains unit tests for cellular specific classes. Unit tests are based on the stubbing method.
You can run those tests locally by running `./run_tests` script under the `UNITTESTS/` folder.
You need the following applications: `cpputest`, `gcov` and `lcov` (genhtml) for running the tests.
After you have run the `run_tests` script, you can find test results under `UNITTESTS/results` folder and line and function coverages under the `UNITTESTS/coverages` folder.