Skip to content

Commit 23037b9

Browse files
authored
Merge pull request #10921 from jeromecoutant/PR_STMOD
STMOD_CELLULAR: readme file additional information
2 parents 1cecfa4 + dc72c9b commit 23037b9

File tree

2 files changed

+65
-6
lines changed

2 files changed

+65
-6
lines changed

components/cellular/COMPONENT_STMOD_CELLULAR/README.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,69 @@ This library allows enabling the cellular module that is connected to the STMOD+
44

55
## Supported modems.
66

7-
Currently supported cellular modules are Quectel UG96 and BG96 expansion boards that are included in [p-l496g-cell01] (https://www.st.com/en/evaluation-tools/p-l496g-cell01.html) and [p-l496g-cell02.] (https://www.st.com/en/evaluation-tools/p-l496g-cell02.html) packs.
7+
Currently supported cellular modules are Quectel UG96 and BG96 expansion boards that are included in [p-l496g-cell01](https://www.st.com/en/evaluation-tools/p-l496g-cell01.html)
8+
and [p-l496g-cell02](https://www.st.com/en/evaluation-tools/p-l496g-cell02.html) packs.
89

910
## Specifications
1011

11-
The STMOD+ Connector specification can be found [here] (https://www.st.com/content/ccc/resource/technical/document/technical_note/group0/04/7f/90/c1/ad/54/46/1f/DM00323609/files/DM00323609.pdf/jcr:content/translations/en.DM00323609.pdf).
12+
The STMOD+ Connector specification can be found [here](https://www.st.com/content/ccc/resource/technical/document/technical_note/group0/04/7f/90/c1/ad/54/46/1f/DM00323609/files/DM00323609.pdf/jcr:content/translations/en.DM00323609.pdf).
1213

14+
## Cellular tests in mbed-os
1315

16+
- features-cellular-tests-api-cellular_device
17+
- features-cellular-tests-api-cellular_information
18+
- features-cellular-tests-api-cellular_network
19+
- features-cellular-tests-api-cellular_sms
20+
- features-cellular-tests-socket-udp
21+
22+
Here is the used mbed_app.json:
23+
24+
````
25+
{
26+
"config": {
27+
"cellular-sim-pin" : {
28+
"help": "PIN code",
29+
"value": "\"1234\""
30+
},
31+
"apn": {
32+
"help": "The APN string to use for this SIM/network, set to 0 if none",
33+
"value": "\"APN\""
34+
},
35+
"username": {
36+
"help": "The user name string to use for this APN, set to zero if none",
37+
"value": 0
38+
},
39+
"password": {
40+
"help": "The password string to use for this APN, set to 0 if none",
41+
"value": 0
42+
}
43+
},
44+
"target_overrides": {
45+
"DISCO_L496AG": {
46+
"target.macros_add": ["CELLULAR_DEVICE=STModCellular"],
47+
"target.components_add": ["STMOD_CELLULAR"],
48+
"stmod_cellular.provide-default": "true"
49+
}
50+
}
51+
}
52+
````
53+
54+
55+
````
56+
$ mbed test -t ARM -m DISCO_L496AG -v -n features-cellular-*
57+
````
58+
59+
## Cellular mbed-os example
60+
61+
https://github.com/ARMmbed/mbed-os-example-cellular
62+
63+
````
64+
mbed import mbed-os-example-cellular
65+
cd mbed-os-example-cellular
66+
67+
<edit mbed_app.json file as explained in the example: APN, PIN,... >
68+
69+
mbed compile -t GCC_ARM -m DISCO_L496AG --flash
70+
````
71+
72+
Then check the serial console (serial baudrate set to 115200 bit/s)

components/cellular/COMPONENT_STMOD_CELLULAR/STModCellular.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ nsapi_error_t STModCellular::soft_power_on()
107107
_at->restore_at_timeout();
108108
_at->unlock();
109109

110-
tr_debug("Modem %sready to receive AT commands", rdy ? "" : "NOT ");
110+
tr_debug("Modem %sready to receive AT commands\r\n", rdy ? "" : "NOT ");
111111

112112
#if DEVICE_SERIAL_FC
113113
if ((MBED_CONF_STMOD_CELLULAR_CTS != NC) && (MBED_CONF_STMOD_CELLULAR_RTS != NC)) {
@@ -126,9 +126,9 @@ nsapi_error_t STModCellular::soft_power_on()
126126
_at->unlock();
127127

128128
if (err == NSAPI_ERROR_OK) {
129-
tr_debug("Flow control turned ON");
129+
tr_debug("Flow control turned ON\r\n");
130130
} else {
131-
tr_error("Failed to enable hw flow control");
131+
tr_error("Failed to enable hw flow control\r\n");
132132
}
133133
}
134134
#endif
@@ -164,7 +164,7 @@ CellularDevice *CellularDevice::get_default_instance()
164164

165165
static UARTSerial serial(MBED_CONF_STMOD_CELLULAR_TX, MBED_CONF_STMOD_CELLULAR_RX, MBED_CONF_STMOD_CELLULAR_BAUDRATE);
166166
#if defined (MBED_CONF_STMOD_CELLULAR_RTS) && defined(MBED_CONF_STMOD_CELLULAR_CTS)
167-
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
167+
tr_debug("STMOD_CELLULAR flow control: RTS %d CTS %d\r\n", MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
168168
serial.set_flow_control(SerialBase::RTSCTS, MBED_CONF_STMOD_CELLULAR_RTS, MBED_CONF_STMOD_CELLULAR_CTS);
169169
#endif
170170
static STModCellular device(&serial);

0 commit comments

Comments
 (0)