FiPy firmware upgrade failed - Cat M1
-
@rskoniec Thanks for your reply.
I get this when I make a os.uname() :
(sysname='FiPy', nodename='FiPy', release='1.10.0.b1', version='v1.8.6-834-g5677703c on 2017-11-13', machine='FiPy with ESP32', lorawan='1.0.0')Is that the information you were asking?
As forsqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf') # for CAT-M1The system tells me that it doesn't know a method by the name "run". Which is odd since it's in the code of sqnsupgrade.py
I've been issuing these commands from the Pycom Console. Is it ok or should it be in main.py ?Once again, thanks for your reply.
-
@arnaudp So you MUST update FiPy f/w first (you've got pretty one year old version 1.10.0.b1, now stable is 1.18.1.r4 with
sqnsupgradeclass integrated within f/w). Download Pycom Firmware Update for your platform (Windows, macOS, Linux) and make a FiPy f/w update to the newest stable version. After that you should be able to upgrade FiPy modem f/w with my procedure and be patient, because it'll take a while. -
@rskoniec Okay, I've done as instructed and upgraded the FiPy. I've put your code in main.py, copied the necesarry files on a SD card and began the update process. Maybe putting it in main rather than typing the commands myself was a bad idea because I have no idea if the update process is running. I guess something is happening since I can't connonect on the pycom console.
So I guess I'll wait and see if something is happening.Is the heartbeat suppose to resume once the update process is over? If not, how I'll know when I can remove the power?
-
@arnaudp Do not do this by main.py please - you should use USB UART REPL. Connect your PC to the FiPy through the microUSB of PyTrack module and use for example PuTTY to connect to VCP (Virtual COM Port) and execute my instructions one by one.
Be sure that your boot.py have these lines:
from machine import UART import os uart = UART(0, 115200) os.dupterm(uart)Your main.py for safety should be empty or renamed (main_off.py).
With heartbeat when pycom.heartbeat_on_boot(0) is set then it won't work after FiPy restarts.
-
@rskoniec Indeed, it seems it may have been a bad idea. I had uploaded this (and forgot a boot.py) and now I can't get a REPL console.
I hope I did not brick it....Do you know by any chance how I can reset the board so I can connect to it and upload the correct files ?
Sorry and thank you for helping me. -
@arnaudp Did you try anything after you start upgrade (reset button)? How long is it going now? Do you have WiFi connectivity in your boot.py/main.py files to try telnet connection? There is also something like Safe Boot.
-
@rskoniec Oh thank you ! I was able to safe boot into it. I was afraid I had bricked my device.
So now I'm trying your commands. And here what I giet for :>>> os.mount(sd, '/sd') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: the requested operation failedSorry for the delay between the messages, I'm allowed only one message every 10 minutes on thsi forum.
-
@arnaudp Did you verify your FiPy f/w version after the update?
import os os.uname()Btw, I've upvoted your posts so maybe your posts delay has gone - check it out.
-
@rskoniec Yup, I had checked it, here's the update :
(sysname='FiPy', nodename='FiPy', release='1.18.1.r4', version='v1.8.6-849-dfa1176 on 2018-11-12', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1')1.18.1.r4 seems on it.
Thank you, that's very kind of you. I you can read this message, it'll mean it succeeded to post ;).I'm going to try to format my sd card again. Could that be an issue with it or is it necessarily on the side of the fipy firmware itself?
-
@arnaudp OK, perfect. If you try:
from machine import SD sd = SD() os.mount(sd, '/sd') os.listdir('/sd')do you get your modem upgrade files listed?
-
@rskoniec Nope, here's what I get :
>>> from machine import SD >>> sd = SD() >>> os.mount(sd, '/sd') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: the requested operation failedI wonder if it could come from the card? I only have at hand a 128Gb card (maybe too high capacity) ?
-
-
@rskoniec Same issue :
>>> os.mkfs(sd) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: the requested operation failed -
@arnaudp So maybe you should try with 8/16 GB SD card. FYI,
os.mkfs(sd)is formatting your SD card to the right filesystem for Pycom devices. So after that you should remove SD card from PyTrack, put into your PC, copy files and then insert back again to the PyTrack, reset by button your FiPy and from fresh REPL:from machine import SD sd = SD() os.mount(sd, '/sd') os.listdir('/sd') # to check if the files exist on SD card import sqnsupgrade sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf') # for CAT-M1 sqnsupgrade.run('/sd/NB1-40343.dup', '/sd/updater.elf') # for CAT-NB1 -
@rskoniec Ok ! So I have formatted it again and now it works !
Now here's the new issue :
Attempting AT wakeup... Session opened: version 1, max transfer 8192 bytes Sending 55498 bytes: [########################################] 100% Received ERROR from AT+SMSWBOOT=0,1! Aborting! Unable to upgrade bootrom. Unable to load updater from /sd/updater.elf -
@arnaudp I think you've got incomplete file/files - 55498 bytes is too short (incomplete download from https://software.pycom.io/downloads/sequans2.html ?).
CATM1-39529.dupis almost 6MB big
updater.elfis over 400KB big -
@rskoniec Yup, that's the file I have on my disk, just checked the size with a freshly dowloaded version. It seems that it's the sending that didn't work.
And now it says it won't detect the modem (perhaps because of faulty upgrade).Ok not anymore
But my files are the right ones on the disk :/ -
@rskoniec
With some debug infos. We can see the files are listed with their right size :File /sd/updater.elf has size 429340 File /sd/CATM1-39529.dup has size 6059510Here is the complete log :
>>> sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf', debug=True) <<< Welcome to the SQN3330 firmware updater [1.2.0] >>> >>> FiPy with firmware version 1.18.1.r4 File /sd/updater.elf has size 429340 File /sd/CATM1-39529.dup has size 6059510 Modem state: 2 Checking bootrom & application Checking line Checking line SYSTEM VERSION Checking line ============== Checking line FIRMWARE VERSION Checking line Bootloader0* : 5.1.1.0 [33080] old_br: True Checking line Bootloader1 : NA Checking line Bootloader2 : NA Checking line NV Info : 1.1,0,0 Checking line Software : 5.1.1.0 [33080] by robot-soft at 2017-10-27 07:49:11 old_sw: True Checking line UE : Unknown Checking line COMPONENTS Checking line ZSP0 : 1.0.98-12323 Checking line ZSP1 : 1.0.98-12295 Checking line Checking line OK Checking line Returning: True mirror? False recover? False resume? False direct? False atneg_only? False bootrom? True load_fff? False Initial prepartion complete... Loading built-in recovery bootrom... Attempting AT wakeup... b'\r\nOK\r\n' Entering upgrade mode... AT+SMOD? returned 2 AT+SMSWBOOT=3,1 returned: b'\r\nOK\r\n' Response after reset: b'\r\nERROR\r\n' Starting STP <<<=== DO NOT DISCONNECT POWER ===>>> Sending AT+SMSTPU="ON_THE_FLY" Starting STP code upload magic=0x74736166, op=0x80, sid=0x0, plen=0x0, tid=0x0, hcrc=0x0, pcrc=0x18 Correct SRSP signature: 0x74736166 Session opened: version 1, max transfer 8192 bytes Sending 55498 bytes: [########################################] 100% Bootrom updated successfully, switching to recovery mode AT+SMSWBOOT=0,1 returned b'\r\nERROR\r\n' Received ERROR from AT+SMSWBOOT=0,1! Aborting! Success1? False Unable to upgrade bootrom. Success2? False Unable to load updater from /sd/updater.elf -
@arnaudp One more thing just came to my mind - do you have SIM card inserted in your FiPy? I don't know if this is an issue, but all of my FiPy modem f/w updates I've done with SIM card.
-
@rskoniec We haven't received our cat-M1 SIM card yet. Do you think I can try with a regular SIM ?
In this video tutorial : https://core-electronics.com.au/tutorials/pycom-gpy-fipy-cellular-lte-firmware-update.html
it seems he hasn't put a sim card in it. Weird. Or the video is a bit outdated maybe.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login