Skip to content

Commit 9d76c74

Browse files
author
Ari Parkkila
authored
Merge pull request #109 from ARMmbed/minor_fixes
Minor fixes, added disconnect and readme update.
2 parents 8599a4c + 3b14977 commit 9d76c74

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ This is an example based on `mbed-os` cellular APIs that demonstrates a TCP or U
66

77
This particular cellular application uses a cellular network and network-socket APIs that are part of [`mbed-os`](https://github.com/ARMmbed/mbed-os).
88

9-
The program uses a [generic cellular modem driver](https://github.com/ARMmbed/mbed-os/tree/master/features/netsocket/cellular/generic_modem_driver) using an external IP stack (LWIP) standard 3GPP AT 27.007 AT commands to setup the cellular modem and registers to the network.
9+
The program uses a [cellular modem driver](https://github.com/ARMmbed/mbed-os/tree/master/features/cellular/framework/API) using an external IP stack (LWIP) standard 3GPP AT 27.007 AT commands to setup the cellular modem and registers to the network.
1010

1111
After registration, the driver opens a point-to-point protocol (PPP) pipe using LWIP with the cellular modem and connects to internet. This driver currently supports UART data connection type only between your cellular modem and MCU.
1212

13-
For more information on Arm Mbed OS cellular APIs and porting guide, please visit the [Mbed OS cellular API](https://os.mbed.com/docs/latest/reference/cellular-api.html) and [contributing documentation](https://os.mbed.com/docs/latest/reference/contributing-connectivity.html#cellularinterface).
13+
For more information on Arm Mbed OS cellular APIs and porting guide, please visit the [Mbed OS cellular API](https://os.mbed.com/docs/latest/reference/cellular.html) and [contributing documentation](https://os.mbed.com/docs/latest/reference/contributing.html).
1414

1515
### Download the application
1616

@@ -88,11 +88,11 @@ After you have defined `mbed-trace.enable: true`, you can set trace levels by ch
8888

8989
### Board support
9090

91-
The [generic cellular modem driver](https://github.com/ARMmbed/mbed-os/tree/master/features/netsocket/cellular/generic_modem_driver) this application uses was written using only a standard AT command set. It uses PPP with an Mbed-supported external IP stack. These abilities make the driver essentially generic, or nonvendor specific. However, this particular driver is for onboard-modem types. In other words, the modem exists on the Mbed Enabled target as opposed to plug-in modules (shields). For more details, please see our [Mbed OS cellular documentation](https://os.mbed.com/docs/latest/reference/cellular-api.html).
91+
The [cellular modem driver](https://github.com/ARMmbed/mbed-os/tree/master/features/cellular/framework/API) in this example uses PPP with an Mbed-supported external IP stack. It supports targets when modem exists on the Mbed Enabled target as opposed to plug-in modules (shields). For more details, please see our [Mbed OS cellular documentation](https://os.mbed.com/docs/latest/reference/cellular-api.html).
9292

9393
Currently supported boards with onboard modem chips are:
9494

95-
[u-blox C027](https://os.mbed.com/platforms/u-blox-C027/)
95+
[u-blox C027](https://os.mbed.com/platforms/u-blox-C027/)
9696
[MultiTech MTS Dragonfly](https://os.mbed.com/platforms/MTS-Dragonfly/)
9797

9898

main.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void print_function(const char *format, ...)
105105
void dot_event()
106106
{
107107
while (true) {
108-
Thread::wait(4000);
108+
ThisThread::sleep_for(4000);
109109
if (iface && iface->is_connected()) {
110110
break;
111111
} else {
@@ -244,13 +244,20 @@ int main()
244244
retcode = test_send_recv();
245245
}
246246

247+
if (iface->disconnect() != NSAPI_ERROR_OK) {
248+
print_function("\n\n disconnect failed.\n\n");
249+
}
250+
247251
if (retcode == NSAPI_ERROR_OK) {
248252
print_function("\n\nSuccess. Exiting \n\n");
249253
} else {
250254
print_function("\n\nFailure. Exiting \n\n");
251255
}
256+
252257
#if MBED_CONF_MBED_TRACE_ENABLE
253258
trace_close();
259+
#else
260+
dot_thread.terminate();
254261
#endif // #if MBED_CONF_MBED_TRACE_ENABLE
255262

256263
return 0;

mbed_app.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
},
3434
"target_overrides": {
3535
"*": {
36-
"target.features_add": ["LWIP"],
3736
"mbed-trace.enable": false,
3837
"lwip.ipv4-enabled": true,
3938
"lwip.ethernet-enabled": false,

0 commit comments

Comments
 (0)