@@ -301,13 +301,10 @@ static bool lte_check_legacy_version(void) {
301301
302302static int lte_get_modem_version (void )
303303{
304- lte_task_cmd_data_t cmd = { .timeout = LTE_RX_TIMEOUT_MAX_MS };
305-
306304 /* Get modem version */
307- memcpy (cmd .data , "AT!=\"showver\"" , strlen ("AT!=\"showver\"" ));
308305 char * ver = NULL ;
309306
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\"" ) );
311308 ver = strstr (modlte_rsp .data , "Software :" );
312309
313310 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
649646 if (strstr (modlte_rsp .data , carrier )) {
650647 lte_obj .carrier = false;
651648 /* 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" ));
655650 /* Dummy command for command response > Uart buff size */
656- memcpy (cmd .data , "Pycom_Dummy" , strlen ("Pycom_Dummy" ));
657651 MP_THREAD_GIL_EXIT ();
658652 if (strstr (modlte_rsp .data , "17 bands" ) != NULL )
659653 {
@@ -667,7 +661,7 @@ STATIC mp_obj_t lte_attach(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t
667661 is_hw_new_band_support = true;
668662 }
669663 }
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" ) );
671665 }
672666 MP_THREAD_GIL_ENTER ();
673667 int version = lte_get_modem_version ();
0 commit comments