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