@@ -527,7 +527,7 @@ def __run(self, file_path=None, baudrate=921600, port=None, resume=False, load_f
527
527
time .sleep (.5 )
528
528
self .__serial .read (100 )
529
529
print ('Going into MIRROR mode... please close this terminal to resume the upgrade via UART' )
530
- self .uart_mirror (rgbled )
530
+ return self .uart_mirror (rgbled )
531
531
532
532
elif bootrom :
533
533
if verbose : print ('Starting STP' )
@@ -570,10 +570,10 @@ def __run(self, file_path=None, baudrate=921600, port=None, resume=False, load_f
570
570
time .sleep (.5 )
571
571
self .__serial .read (100 )
572
572
print ('Going into MIRROR mode... please close this terminal to resume the upgrade via UART' )
573
- self .uart_mirror (rgbled )
573
+ return self .uart_mirror (rgbled )
574
574
else :
575
575
self .__serial .write (b"AT+STP\n " )
576
- response = self .read_rsp (size = 6 )
576
+ response = self .read_rsp (size = 2 )
577
577
if not b'OK' in response :
578
578
print ('Failed to start STP mode!' )
579
579
reconnect_uart ()
@@ -584,7 +584,7 @@ def __run(self, file_path=None, baudrate=921600, port=None, resume=False, load_f
584
584
else :
585
585
if debug : print ('Starting STP mode...' )
586
586
self .__serial .write (b"AT+STP\n " )
587
- response = self .read_rsp (size = 6 )
587
+ response = self .read_rsp (size = 2 )
588
588
if not b'OK' in response :
589
589
print ('Failed to start STP mode!' )
590
590
reconnect_uart ()
@@ -871,6 +871,7 @@ def uart_mirror(self, color):
871
871
time .sleep (.5 )
872
872
pycom .rgbled (color )
873
873
LTE .modem_upgrade_mode ()
874
+ return True
874
875
875
876
def success_message (self , port = None , verbose = False , debug = False ):
876
877
print ("Your modem has been successfully updated." )
0 commit comments