Daniel Vizcaya / Mbed OS 04_RTOS_Embebidos
Committer:
Bethory
Date:
Wed May 30 04:46:28 2018 +0000
Revision:
1:fcdb45ee95b9
Parent:
0:6ad07c9019fd
Entrega Final

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Bethory 0:6ad07c9019fd 1 # Mbed cellular connectivity
Bethory 0:6ad07c9019fd 2
Bethory 0:6ad07c9019fd 3 This is the Github repo for Mbed cellular connectivity:
Bethory 0:6ad07c9019fd 4
Bethory 0:6ad07c9019fd 5 easy_cellular/
Bethory 0:6ad07c9019fd 6 EasyCellularConnection Simplified cellular usage based on `CellularBase.h`
Bethory 0:6ad07c9019fd 7 CellularConnectionUtil A utility class for cellular connection
Bethory 0:6ad07c9019fd 8
Bethory 0:6ad07c9019fd 9 framework/
Bethory 0:6ad07c9019fd 10 API Application Programming Interface for cellular connectivity
Bethory 0:6ad07c9019fd 11 AT AT implementation based on 3GPP TS 27.007 specification
Bethory 0:6ad07c9019fd 12 common Common and utility sources
Bethory 0:6ad07c9019fd 13 targets Vendor specific cellular module adaptations
Bethory 0:6ad07c9019fd 14
Bethory 0:6ad07c9019fd 15 TESTS Cellular Greentea test
Bethory 0:6ad07c9019fd 16
Bethory 0:6ad07c9019fd 17 UNITTESTS Cellular unit test
Bethory 0:6ad07c9019fd 18
Bethory 0:6ad07c9019fd 19 ## Known limitations
Bethory 0:6ad07c9019fd 20
Bethory 0:6ad07c9019fd 21 **Please note that this is a first release of Cellular framework and is subject to further development in future.**
Bethory 0:6ad07c9019fd 22
Bethory 0:6ad07c9019fd 23 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.
Bethory 0:6ad07c9019fd 24
Bethory 0:6ad07c9019fd 25 ## Supported modules
Bethory 0:6ad07c9019fd 26
Bethory 0:6ad07c9019fd 27 You can find currently supported cellular modules in the `framework/targets/` folder, where we also add support for new cellular modules.
Bethory 0:6ad07c9019fd 28
Bethory 0:6ad07c9019fd 29 ## Cellular configuration
Bethory 0:6ad07c9019fd 30
Bethory 0:6ad07c9019fd 31 You can change cellular defaults in the `mbed_lib.json` configuration file.
Bethory 0:6ad07c9019fd 32
Bethory 0:6ad07c9019fd 33 You can also override cellular defaults in the `mbed_app.json` configuration file:
Bethory 0:6ad07c9019fd 34
Bethory 0:6ad07c9019fd 35 "config": {
Bethory 0:6ad07c9019fd 36 "cellular_plmn": {
Bethory 0:6ad07c9019fd 37 "help": "PLMN selection, 0=auto",
Bethory 0:6ad07c9019fd 38 "value": 0
Bethory 0:6ad07c9019fd 39 },
Bethory 0:6ad07c9019fd 40 "apn": {
Bethory 0:6ad07c9019fd 41 "help": "Access point name, e.g. internet",
Bethory 0:6ad07c9019fd 42 "value": "\"internet\""
Bethory 0:6ad07c9019fd 43 },
Bethory 0:6ad07c9019fd 44 "cellular_sim_pin": {
Bethory 0:6ad07c9019fd 45 "help": "PIN code",
Bethory 0:6ad07c9019fd 46 "value": "\"1234\""
Bethory 0:6ad07c9019fd 47 }
Bethory 0:6ad07c9019fd 48 }
Bethory 0:6ad07c9019fd 49
Bethory 0:6ad07c9019fd 50 ## Debug traces
Bethory 0:6ad07c9019fd 51
Bethory 0:6ad07c9019fd 52 You can define the debug tracing level in the `mbed_app.json` configuration file:
Bethory 0:6ad07c9019fd 53
Bethory 0:6ad07c9019fd 54 "target_overrides": {
Bethory 0:6ad07c9019fd 55 "*": {
Bethory 0:6ad07c9019fd 56 "target.features_add": ["COMMON_PAL"],
Bethory 0:6ad07c9019fd 57 "mbed-trace.enable": true,
Bethory 0:6ad07c9019fd 58 "platform.stdio-convert-newlines": true,
Bethory 0:6ad07c9019fd 59 "platform.stdio-baud-rate": 115200,
Bethory 0:6ad07c9019fd 60 "platform.default-serial-baud-rate": 115200
Bethory 0:6ad07c9019fd 61 }
Bethory 0:6ad07c9019fd 62 },
Bethory 0:6ad07c9019fd 63 "config": {
Bethory 0:6ad07c9019fd 64 "trace-level": {
Bethory 0:6ad07c9019fd 65 "help": "Options are TRACE_LEVEL_ERROR,TRACE_LEVEL_WARN,TRACE_LEVEL_INFO,TRACE_LEVEL_DEBUG",
Bethory 0:6ad07c9019fd 66 "macro_name": "MBED_TRACE_MAX_LEVEL",
Bethory 0:6ad07c9019fd 67 "value": "TRACE_LEVEL_INFO"
Bethory 0:6ad07c9019fd 68 }
Bethory 0:6ad07c9019fd 69 }
Bethory 0:6ad07c9019fd 70
Bethory 0:6ad07c9019fd 71 ## Greentea tests
Bethory 0:6ad07c9019fd 72
Bethory 0:6ad07c9019fd 73 The `TESTS` folder contains Greentea tests for cellular specific classes. You need to give relevant configuration file with `--app-config` parameter, e.g.:
Bethory 0:6ad07c9019fd 74
Bethory 0:6ad07c9019fd 75 mbed test -n features-cellular-tests-* --app-config features\cellular\TESTS\socket\udp\template_mbed_app.json -vv
Bethory 0:6ad07c9019fd 76
Bethory 0:6ad07c9019fd 77 Note that Greentea tests use SIM PIN so you need to change that or your SIM card may get locked.
Bethory 0:6ad07c9019fd 78
Bethory 0:6ad07c9019fd 79 ## Unit tests
Bethory 0:6ad07c9019fd 80
Bethory 0:6ad07c9019fd 81 The `UNITTESTS` folder contains unit tests for cellular specific classes. Unit tests are based on the stubbing method.
Bethory 0:6ad07c9019fd 82
Bethory 0:6ad07c9019fd 83 You can run those tests locally by running `./run_tests` script under the `UNITTESTS/` folder.
Bethory 0:6ad07c9019fd 84
Bethory 0:6ad07c9019fd 85 You need the following applications: `cpputest`, `gcov` and `lcov` (genhtml) for running the tests.
Bethory 0:6ad07c9019fd 86
Bethory 0:6ad07c9019fd 87 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.