@@ -195,16 +195,17 @@ static void lte_callback_handler(void* arg)
195
195
static bool lte_push_at_command_ext (char * cmd_str , uint32_t timeout , const char * expected_rsp , size_t len ) {
196
196
lte_task_cmd_data_t cmd = { .timeout = timeout , .dataLen = len };
197
197
memcpy (cmd .data , cmd_str , len );
198
+ uint32_t start = mp_hal_ticks_ms ();
198
199
if (lte_debug )
199
- printf ("[AT] %s\n" , cmd_str );
200
+ printf ("[AT] %u % s\n" , start , cmd_str );
200
201
lteppp_send_at_command (& cmd , & modlte_rsp );
201
202
if ((expected_rsp == NULL ) || (strstr (modlte_rsp .data , expected_rsp ) != NULL )) {
202
203
if (lte_debug )
203
- printf ("[AT-OK] % s\n" , modlte_rsp .data );
204
+ printf ("[AT-OK] +%u % s\n" , mp_hal_ticks_ms () - start , modlte_rsp .data );
204
205
return true;
205
206
}
206
207
if (lte_debug )
207
- printf ("[AT-FAIL] % s\n" , modlte_rsp .data );
208
+ printf ("[AT-FAIL] +%u % s\n" , mp_hal_ticks_ms () - start , modlte_rsp .data );
208
209
return false;
209
210
}
210
211
@@ -1186,12 +1187,12 @@ STATIC mp_obj_t lte_disconnect(mp_obj_t self_in) {
1186
1187
lte_pause_ppp ();
1187
1188
}
1188
1189
lteppp_set_state (E_LTE_ATTACHED );
1189
- lte_push_at_command ("ATH" , LTE_RX_TIMEOUT_MIN_MS );
1190
+ lte_push_at_command ("ATH" , LTE_RX_TIMEOUT_MAX_MS );
1190
1191
while (true) {
1191
- mp_hal_delay_ms (LTE_RX_TIMEOUT_MIN_MS );
1192
1192
if (lte_push_at_command ("AT" , LTE_RX_TIMEOUT_MAX_MS )) {
1193
1193
break ;
1194
1194
}
1195
+ mp_hal_delay_ms (LTE_RX_TIMEOUT_MIN_MS );
1195
1196
}
1196
1197
lte_check_attached (lte_legacyattach_flag );
1197
1198
mod_network_deregister_nic (& lte_obj );
0 commit comments