Latest Sqnsupdate UART upgrade not working 1.20.2.r4
Hello upgrade via (PC) UART is not working on Linux.
As DOCS said, I downloaded last sqmsupgrade from https://github.com/pycom/pycom-libraries/tree/master/lib/sqnsupgrade
I upgraded the board with pycom tool to 1.20.2.r4
After fresh/power plug, I got the following...
On GPY (with ExpansionBoard 3.0)
Connecting to /dev/ttyACM1... ets Jun 8 2016 00:22:57 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff8020,len:8 load:0x3fff8028,len:2128 load:0x4009fa00,len:19760 entry 0x400a05bc Pycom MicroPython 1.20.2.r4 [v1.11-ffb0e1c] on 2021-01-12; GPy with ESP32 Type "help()" for more information. >>> import sqnsupgrade >>>> sqnsupgrade.uart(True,debug=True) ><<< Welcome to the SQN3330 firmware updater [1.2.6] >>> >>>> GPy with firmware version 1.20.2.r4 >The current delay is 1000 >Response (+++ #1): None >Response (AT #1) None >Response (AT #3) None >Response (AT #4) None >Response (AT #1 @ 115200) None >Response (AT #2 @ 115200) b'\xfe\xfd\xfe\xfe\xfe\xfe\xfe\xfe\xfe' >The current delay is 2000 >Response (+++ #1): None >Response (AT #1) b'\r\nERROR\r\n' >Response (AT #2) b'\r\nOK\r\n' >Response (AT+SMOD?) b'\r\n2\r\nOK\r\n' >Converting response: 2 to int... >Modem state: 2 >Preparing modem for upgrade... >Checking bootrom & application >Checking line >Checking line SYSTEM VERSION >Checking line ============== >Checking line FIRMWARE VERSION >Checking line Bootloader0 : 126.96.36.199  >old_br: False >Checking line Bootloader1* : 188.8.131.52  >Checking line Bootloader2 : 184.108.40.206  >Checking line NV Info : 1.1,0,0 >Checking line Software : 220.127.116.11  by robot-soft at 2018-12-13 21:41:15 >old_sw: False >Checking line UE : 18.104.22.168 >Checking line COMPONENTS >Checking line ZSP0 : 1.0.99-3171 >Checking line ZSP1 : 1.0.98-3170 >Checking line >Checking line OK >Checking line >Returning: False >FFH mode is not necessary... ignoring! >Do not specify updater.elf when updating! >mirror? True recover? False resume? True direct? False atneg_only? False bootrom? False load_fff? False >baudrate: 921600 target_baudrate: 921600 >Initial prepartion complete... >Attempting AT wakeup...  >b'\r\nOK\r\n' >Entering recovery mode >AT+SMOD? returned 2 >Going into MIRROR mode... please close this terminal to resume the upgrade via UARTakeup**
I closed the Atom them I continued in python3 terminal
>>> import sqnsupgrade >>> sqnsupgrade.run('/dev/ttyACM1','../NB1-41019/NB1-41019.dup',debug=True) <<< Welcome to the SQN3330 firmware updater [1.2.6] >>> File ../NB1-41019/NB1-41019.dup has size 5835531 mirror? False recover? False resume? False direct? False atneg_only? False bootrom? False load_fff? True baudrate: 921600 target_baudrate: 921600 Setting port /dev/ttyACM1 Setting baudrate to 921600 Initial prepartion complete... Loading ../NB1-41019/NB1-41019.dup Firmware file is too big to load via FFF method. Using ON_THE_FLY Attempting AT wakeup...  b'' count=1
Seems that is a Serial issue (read/write) from modem to UART1 (/tty/ACM1)
That AT 'OK' seems that is received tooo fast and not forwarded to UART1 (/tty/ACM1)
Any idea how to fix this?
Please note that is working update with SD card... but I need UART upgrade because we have our own G01 boards without SDCard
From what I could find in this time, it seems to be related to the CEREG setting of the LTE modem, which was changed in r2. If we use (temporarily)
from network import LTE lte = LTE() lte.send_at_cmd('AT+CEREG=2')
I can get the sqnsupgrade to work over UART.
Let me know if that works for you!
Im able to reproduce the issue. Haven't done a lot of updating with LTE over the last few weeks so didnt come across it yet. I'll try to track it down, but it appears to be broken on r2 and r3 as well. r1 works fine for me, so if it is possible for you to use that in the meantime? Sorry for the inconvenience