Skip to content

Commit 97106fb

Browse files
author
Hasnain Virk
committed
Facilitating Smoke test tracing
1 parent eae4ae3 commit 97106fb

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

main.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,14 @@ int do_ntp()
126126
return -1;
127127
}
128128

129+
#ifndef MODEM_DEBUG_TRACE
130+
#define MODEM_DEBUG_TRACE false
131+
#endif
132+
129133
#if MBED_CONF_APP_PLATFORM == UBLOX
130-
UbloxCellularInterface my_iface(false);
134+
UbloxCellularInterface my_iface(false, MODEM_DEBUG_TRACE);
131135
#elif MBED_CONF_APP_PLATFORM == MTS_DRAGONFLY
132-
DragonFlyCellularInterface my_iface(false);
136+
DragonFlyCellularInterface my_iface(false, MODEM_DEBUG_TRACE);
133137
#endif
134138

135139
nsapi_error_t connection()
@@ -141,7 +145,7 @@ nsapi_error_t connection()
141145

142146
retcode = iface->connect();
143147
if (retcode == NSAPI_ERROR_AUTH_FAILURE) {
144-
tr_error("Authentication Failure. Exiting application");
148+
printf("\n\nAuthentication Failure. Exiting application\n");
145149
return retcode;
146150
} else if (retcode != NSAPI_ERROR_OK) {
147151
tr_error("Couldn't connect: %d", retcode);
@@ -151,7 +155,7 @@ nsapi_error_t connection()
151155
break;
152156
}
153157

154-
tr_info("Connection Established.");
158+
printf("\n\nConnection Established.\n");
155159

156160
return NSAPI_ERROR_OK;
157161
}
@@ -204,7 +208,7 @@ int main()
204208
}
205209

206210
if (getTime() == 0) {
207-
tr_info("Done.");
211+
printf("\n\nDone.\n");
208212
}
209213

210214
return 0;

mbed_app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"config": {
33
"platform": "UBLOX"
44
},
5-
"macros": ["OS_MAINSTKSIZE=512"],
5+
"macros": ["OS_MAINSTKSIZE=512", "MODEM_DEBUG_TRACE=true"],
66
"target_overrides": {
77
"*": {
88
"lwip.ipv4-enabled": true,
@@ -15,7 +15,7 @@
1515
"platform.stdio-baud-rate": 115200,
1616
"platform.default-serial-baud-rate": 115200,
1717
"lwip.debug-enabled":false,
18-
"lwip.enable-ppp-trace": false,
18+
"lwip.enable-ppp-trace": true,
1919
"lwip.use-mbed-trace": true,
2020
"mbed-trace.enable": 1
2121
}

0 commit comments

Comments
 (0)