Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Sqnsupgrade via UART fails on FiPy: object 'LTE' has no attribute 'modem_upgrade_mode' #72

Open
@pirate

Description

@pirate

I'm trying to get my FiPy to work with the Hologram SIM card in Canada. I've tested the SIM in my iPhone and it works fine, it hops around between networks for a few min but eventually successfully joins ROGERS and receives SMS and data over LTE. However, when I put the SIM in my FiPy and try connecting I just get the following on repeat, and it never manages to attach:

modem command: AT+CEREG?
response=['+CEREG: 2,0', 'OK']
tac=0
modem command: AT+CSQ
response=['+CSQ: 99,99', 'OK']
not attached: 5 secs

...many seconds later...

modem command: AT+CEREG?
response=['+CEREG: 2,4', 'OK']
tac=4
modem command: AT+CSQ
response=['+CSQ: 99,99', 'OK']
not attached: 465 secs

In the process of trying to get it to work I'm attempting an SQNS upgrade, but hit this error while following these instructions: https://docs.pycom.io/tutorials/lte/firmware
(fyi there's also a broken link in those docs: https://github.com/pycom/pycom-libraries/lib/sqnsupgrade​ should be /tree/...)

Uploading project (main folder)...
Not safe booting, disabled in settings
Reading file status
[1/5] Writing file lib/sqnsbr.py
[2/5] Writing file lib/sqnscodec.py
[3/5] Writing file lib/sqnscrc.py
[4/5] Writing file lib/sqnstp.py
[5/5] Writing file lib/test_sd.py
Upload done, resetting board...
OKets Jun  8 2016 00:22:57

rst:0x7 (TG0WDT_SYS_RESET),boot:0x17 (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:0x3fff8028,len:8
load:0x3fff8030,len:1728
load:0x4009fa00,len:0
load:0x4009fa00,len:14584
entry 0x400a059c
Pybytes library: v0.9.0
Preparing modem for upgrade...
Attempting AT wakeup...
Starting STP (DO NOT DISCONNECT POWER!!!)
Session opened: version 1, max transfer 8192 bytes
Sending 54854 bytes: [########################################] 100%
Bootrom updated successfully, switching to upgrade mode
Attempting AT auto-negotiation...
Going into MIRROR mode... please close this terminal to resume the upgrade via UART
Traceback (most recent call last):
  File "main.py", line 2, in <module>
  File "/flash/lib/sqnsupgrade.py", line 575, in uart
  File "/flash/lib/sqnsupgrade.py", line 503, in upgrade_uart
  File "/flash/lib/sqnsupgrade.py", line 309, in __run
  File "/flash/lib/sqnsupgrade.py", line 461, in uart_mirror
AttributeError: type object 'LTE' has no attribute 'modem_upgrade_mode'
Pycom MicroPython 1.18.0.r1 [v1.8.6-849-9569a73] on 2018-07-20; FiPy with ESP32
Type "help()" for more information.

After a power cycle it gets stuck here:

Your modem is in recovery mode. You will need to use updater.elf file to upgrade.
Preparing modem for upgrade...
Attempting AT auto-negotiation...

Attempting the computer side of the upgrade at this point fails as well:

>>> sqnsupgrade.run('/dev/tty.usbmodemPy1197bb', '/Users/squash/Downloads/CATM1-38638/CATM1-38638.dup', '/Users/squash/Downloads/CATM1-38638/updater.elf')
<<< Welcome to the SQN3330 firmware updater >>>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/squash/Documents/Code/pycom/pycom-libraries/lib/sqnsupgrade/sqnsupgrade.py", line 585, in run
    sqnup.upgrade_ext(port, ffile, mfile, resume, debug, False)
  File "/Users/squash/Documents/Code/pycom/pycom-libraries/lib/sqnsupgrade/sqnsupgrade.py", line 515, in upgrade_ext
    success = self.__run(file_path=mfile, load_ffh=True, port=port, debug=debug, pkgdebug=pkgdebug)
  File "/Users/squash/Documents/Code/pycom/pycom-libraries/lib/sqnsupgrade/sqnsupgrade.py", line 271, in __run
    response = self.return_pretty_response(self.read_rsp(size=7))
  File "/Users/squash/Documents/Code/pycom/pycom-libraries/lib/sqnsupgrade/sqnsupgrade.py", line 81, in return_pretty_response
    lines = rsp.decode('ascii').split('\r\n')
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    LTEbugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions