@@ -301,13 +301,10 @@ static bool lte_check_legacy_version(void) {
301
301
302
302
static int lte_get_modem_version (void )
303
303
{
304
- lte_task_cmd_data_t cmd = { .timeout = LTE_RX_TIMEOUT_MAX_MS };
305
-
306
304
/* Get modem version */
307
- memcpy (cmd .data , "AT!=\"showver\"" , strlen ("AT!=\"showver\"" ));
308
305
char * ver = NULL ;
309
306
310
- lteppp_send_at_command ( & cmd , & modlte_rsp );
307
+ lte_push_at_command_ext ( "AT!=\"showver\"" , LTE_RX_TIMEOUT_MAX_MS , NULL , strlen ( "AT!=\"showver\"" ) );
311
308
ver = strstr (modlte_rsp .data , "Software :" );
312
309
313
310
if (ver != NULL )
@@ -649,11 +646,8 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t
649
646
if (strstr (modlte_rsp .data , carrier )) {
650
647
lte_obj .carrier = false;
651
648
/* Get configured bands in modem */
652
- lte_task_cmd_data_t cmd = { .timeout = LTE_RX_TIMEOUT_MAX_MS };
653
- memcpy (cmd .data , "AT+SMDD" , strlen ("AT+SMDD" ));
654
- lteppp_send_at_command (& cmd , & modlte_rsp );
649
+ lte_push_at_command_ext ("AT+SMDD" , LTE_RX_TIMEOUT_MAX_MS , NULL , strlen ("AT+SMDD" ));
655
650
/* Dummy command for command response > Uart buff size */
656
- memcpy (cmd .data , "Pycom_Dummy" , strlen ("Pycom_Dummy" ));
657
651
MP_THREAD_GIL_EXIT ();
658
652
if (strstr (modlte_rsp .data , "17 bands" ) != NULL )
659
653
{
@@ -667,7 +661,7 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t
667
661
is_hw_new_band_support = true;
668
662
}
669
663
}
670
- lteppp_send_at_command ( & cmd , & modlte_rsp );
664
+ lte_push_at_command_ext ( "Pycom_Dummy" , LTE_RX_TIMEOUT_MAX_MS , NULL , strlen ( "Pycom_Dummy" ) );
671
665
}
672
666
MP_THREAD_GIL_ENTER ();
673
667
int version = lte_get_modem_version ();
0 commit comments