Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    New firmware release 1.10.1.b1

    Scheduled Pinned Locked Moved Announcements & News
    firmware
    41 Posts 13 Posters 13.7k Views 13 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tudro
      last edited by

      Hello,

      After i upgraded the firmware my lopy seems bricked. The led is red and i can't do anything with it. I tried to erase the flash with the esptool like here https://forum.pycom.io/topic/1343/solved-lopy-bricked-red-led, but i get "A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" I run it with: python esptool.py --port COM3 --chip esp32 erase_flash

      In the console i get:
      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:0x3fff9028,len:8
      load:0x3fff9030,len:1076
      load:0x4009fa00,len:0
      ho 12 tail 0 room 4
      load:0x4009fa00,len:15344
      entry 0x400a070c

      I've also tried to connect G28 to 3v3 to do load the previous/factory firmware, but it doesn't do anything. I always get the red led, never the orange one. I've done this firmware 'reset' many times and it worked fine.

      I've had the lopy for about 8 months. I've upgraded it constantly and played with it a lot. Never had any problems until now.

      Any advice?

      Thank you

      X 1 Reply Last reply Reply Quote 0
      • X Offline
        Xykon administrators @tudro
        last edited by

        @tudro Please make sure you have a wire connected between G23 and GND and reset the board before trying the erase. You should see a message "Waiting for download" on the serial terminal. Also make sure that all serial terminal programs & Pymakr plugins are disconnected when running esptool or the firmware update tool.

        Christian Ehlers

        T 1 Reply Last reply Reply Quote 0
        • C Offline
          Colateral
          last edited by Colateral

          building from fresh pulled git raises errors. There is a param that shall be specified?

          $ make BOARD=LOPY TARGET=boot
          Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
          mkdir -p build/LOPY_868/release/bootloader/
          CC bootloader/bootloader.c
          xtensa-esp32-elf-gcc.exe: error: unrecognized command line option '-mfix-esp32-psram-cache-issue'
          make: *** [../py/mkrules.mk:47: build/LOPY_868/release/bootloader/bootloader.o] Error 1
          
          X 1 Reply Last reply Reply Quote 0
          • X Offline
            Xykon administrators @Colateral
            last edited by

            @colateral Please download the new xtensa compiler for your OS.

            The "esp32" port requires an xtensa gcc compiler, which can be downloaded from the Espressif website:

            for 64-bit Linux::

            https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz

            for 32-bit Linux::

            https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-73-ge28a011-5.2.0.tar.gz

            for Mac OS:

            https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-73-ge28a011-5.2.0.tar.gz

            Christian Ehlers

            C E 3 Replies Last reply Reply Quote 0
            • C Offline
              Colateral @Xykon
              last edited by

              @xykon thanks. we are using msys2. This has to be installed in msys to work?

              X 1 Reply Last reply Reply Quote 0
              • X Offline
                Xykon administrators @Colateral
                last edited by

                @colateral Please use the following within msys2 to update the toolchain:

                # Automatically download precompiled toolchain, unpack at /opt/xtensa-esp32-elf/
                TOOLCHAIN_ZIP=xtensa-esp32-elf-win32-1.22.0-73-ge28a011-5.2.0.zip
                echo "Downloading precompiled toolchain ${TOOLCHAIN_ZIP}..."
                cd ~
                curl -LO --retry 10 http://dl.espressif.com/dl/${TOOLCHAIN_ZIP}
                cd /opt
                rm -rf /opt/xtensa-esp32-elf  # for upgrades
                unzip ~/${TOOLCHAIN_ZIP}
                rm ~/${TOOLCHAIN_ZIP}
                

                Christian Ehlers

                C 1 Reply Last reply Reply Quote 1
                • C Offline
                  Colateral @Xykon
                  last edited by

                  @xykon said in New firmware release 1.10.1.b1:
                  For windows:
                  https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-73-ge28a011-5.2.0.zip

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Colateral @Xykon
                    last edited by Colateral

                    @xykon Thanks. It was working. The mpy-cross was built and also the binary .. but there are issues on serial writing.
                    COM7 is ON and 'waiting for download'

                    but

                                $ make V=1 BOARD=LOPY LORA_BAND=USE_BAND_868 flash ESPPORT=COM7
                                python ../py/makeversionhdr.py build/LOPY_868/release/genhdr/mpversion.h
                                Entering flash mode
                                python tools/pypic.py --port COM7 --enter
                                Traceback (most recent call last):
                                  File "tools/pypic.py", line 185, in <module>
                                    sys.exit(main(sys.argv[1:]))
                                  File "tools/pypic.py", line 173, in main
                                    pic = Pypic(args.port)
                                  File "tools/pypic.py", line 77, in __init__
                                    self.serial = serial.Serial(port, baudrate=115200, bytesize=serial.FIVEBITS, timeout=0.25)
                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 31, in __init__
                                    super(Serial, self).__init__(*args, **kwargs)
                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__
                                    self.open()
                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 78, in open
                                    self._reconfigure_port()
                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 222, in _reconfigure_port
                                    'Original message: {!r}'.format(ctypes.WinError()))
                                serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(87, 'The parameter is incorrect.')
                                make: *** [application.mk:398: flash] Error 1
                    

                    With pycom firmware update and updater.py (changed according with Daniel above guidelines) ... it is working.

                                >>> import gc
                                >>> uos.uname()
                                (sysname='LoPy', nodename='LoPy', release='1.10.1.b1', version='v1.8.6-839-g536c958c on 2017-11-15', machine='LoPy with ESP32', lorawan='1.0.0')
                                >>> 
                                >>> 
                                >>> 
                                >>> import gc
                                >>> gc.mem_free()
                                3070064
                    
                    X 1 Reply Last reply Reply Quote 0
                    • T Offline
                      tudro @Xykon
                      last edited by

                      @xykon Thank you for the quick answer and sorry for the late reply (2 small kids :) ). You were right, i didn't have G23 and GND connected. I was able to reset the flash and make the lopy work again. Thank you very much

                      1 Reply Last reply Reply Quote 1
                      • X Offline
                        Xykon administrators @Colateral
                        last edited by Xykon

                        @colateral This seems to be due to a new tool we added that puts the ESP32 into firmware update mode if a Pytrack or Pysense is being used. It seems this tool doesn't work on Windows...

                        Please edit application.mk in the esp32 directory, search for flash: and comment the 4 lines as shown below:

                        flash: $(APP_BIN) $(BOOT_BIN)
                        #       $(ECHO) "Entering flash mode"
                        #       $(Q) $(ENTER_FLASHING_MODE)
                                $(ECHO) "Flashing project"
                                $(Q) $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
                        #       $(ECHO) "Exiting flash mode"
                        #       $(Q) $(EXIT_FLASHING_MODE)
                        

                        This will prevent the tool from running until we can fix it.

                        Christian Ehlers

                        C 3 Replies Last reply Reply Quote 1
                        • robert-hhR Offline
                          robert-hh @daniel
                          last edited by robert-hh

                          @daniel I have a serious problem with the new release. Setup:
                          Plain vanilla pycom image on a LoPy, flash was erased. I have a little script that connects as a STA:

                          import network
                          import time
                          from uos import uname
                          # setup as a station
                          wlan = network.WLAN(mode=network.WLAN.STA)
                          wlan.connect(ssid="my_ap", auth=(network.WLAN.WPA2, "my_passwd"))
                          for _ in range (200):
                              if wlan.isconnected():
                                  wlan.ifconfig(config=("10.0.0.141", "255.255.255.0", "10.0.0.240",  "10.0.0.240"))
                                  print(wlan.ifconfig())
                                  break
                              else:
                                  time.sleep_ms(50)
                          else:
                              print("Could not connect")
                          

                          and add the line
                          import connect
                          to main.py. If I boot, then it may connect, after a few reboots, it somehow locks, in that it does not connect to the AP any more. In that state, if I press Ctrl-D a few times, if get a core dump & Reset. The core dump starts with:

                          PYB: soft reboot
                          Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
                          Register dump:
                          PC      : 0x40113db8  PS      : 0x00060a30  A0      : 0x8011fd1a  A1      : 0x3ffbd590  
                          A2      : 0x3ffc9a00  A3      : 0x3ffd609d  A4      : 0x3ffd60c7  A5      : 0x00000000  
                          A6      : 0x00000000  A7      : 0x00000000  A8      : 0x80113db8  A9      : 0x3ffbd580  
                          A10     : 0x3ffc9a4f  A11     : 0x00000000  A12     : 0x0000000f  A13     : 0x3ffc9a5e  
                          A14     : 0x02ac0f00  A15     : 0x00000000  SAR     : 0x00000010  EXCCAUSE: 0x0000001c  
                          EXCVADDR: 0x000000f1  LBEG    : 0x4009860c  LEND    : 0x40098617  LCOUNT  : 0xffffffff  
                          
                          Backtrace: 0x40113db8:0x3ffbd590 0x4011fd17:0x3ffbd5c0 0x4011c891:0x3ffbd610 0x4011d436:0x3ffbd690 0x4011dce1:0x3ffbd760 0x40127265:0x3ffbd780 0x40128e1b:0x3ffbd7d0
                          
                          ================= CORE DUMP START =================
                          QCsAAAsAAABsAQAA
                          gNj7P9DU+z942Ps/
                          0Nb7PxDY+z8ZaybO6EH8P+hB/D+A2Ps/4EH8PwIAAAAQwvs/EML7P4DY+z8AAAAA
                          FwAAAHzI+z93aWZpAJRVPYhIESdYiUIAAAAAAHjY+z8AAAAAIA4GABcAAAABAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAACAB/0/6Af9P1AI/T8AAAAAAAAAAAEAAAAAAAAA
                          qFFAPwAAAAAIjAlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHXmuw==
                          MCf7P7g9EUAwCgYAGv0RgJDV+z8Amvw/nWD9P8dg/T8AAAAAAAAAAAAAAAC4PRGA
                          gNX7P0+a/D8AAAAADwAAAF6a/D8AD6wCAAAAABAAAAAcAAAA8QAAAAyGCUAXhglA
                          /////w8AAABemvw/6CsIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAMxi+z+w1fs/AQAAAAAAAACUyBGAwNX7PwCa/D+g1vs/
                          nWD9PwAAAABAAAAAGAAAAADsEYDQ1fs/AJr8P/ij/D851BGAENb7PwCc/D8DAAAA
                          UBdCPxDW+z8Amvw/g5r8PzIAAABMAAAAANb7PwIAAACO5BGAAgAAANps/D+QqPw/
                          NF3HAAAAAABApPw/AJz8P+TcEYCQ1vs/VPn9P5Cq/T8zMzMDUBdCPwEAAAAAAAAA
                          QjgyAAoAAABgEv0/kGISgFAXQj9U+f0/4Kj8PwAAAAAi5RGAkNb7P/hs/D9kGfw/
                          LAAAAKBt/D+EYP0/AQAAAAEAAAAK+ghAAwAAACwAAAAAmvw/kKj8P3Rg/T8IAAAA
                          aHISgGDX+z+Qqv0/LAAAAAAAAAD8bPw//f///wAAAAB+YP0/CAgxBAABZAAAAAAA
                          mGD9P4wBAAAAAAAAjGD9PwAAAACYYP0/nWD9P8dg/T8AAAAASGH9P61g/T9kYf0/
                          zWD9PwVh/T8AAAAAiWH9PwAAAAAAAAAAJArEAAr6CIAkYv0/gBQAAP////8IQvw/
                          EQAAACwAAACQqv0/AAAAAFE8EoBw1/s/KIQJQBAAAAAc+/0/AAAAAAEAAAAAAAAA
                          AQAAAAUAAABQAAAAAQAAAB6OEoCA1/s/BQAAAAyv/D8AAAAAdGD9P3Rg/T8AAWAB
                          AAAAANDX+z8Ir/w/YHD8PwAAAACwfPw/CK/8P2Bw/D8AAAAAAAAAAAiv/D+vW8cA
                          /////9DX+z8Ir/w/YHD8P1hg/T/Q3BFA9QAAAAQAAAAAAAAAENj7PwAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAaAAAAG44SQIiHQT8AAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHNj7PwAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                          0HX9P2B0/T/Idf0/
                          

                          and finally and in a cold boot. Once in this state, the only way to recover and get WiFi again is erase flash and reload the firmware.

                          X 1 Reply Last reply Reply Quote 0
                          • X Offline
                            Xykon administrators @robert-hh
                            last edited by

                            @robert-hh Any chance you can try without assigning a fixed IP?

                            Christian Ehlers

                            robert-hhR 2 Replies Last reply Reply Quote 0
                            • robert-hhR Offline
                              robert-hh @Xykon
                              last edited by

                              @xykon I tried already a few variants:
                              a) Pycom image or homebrew image: not difference
                              b) starting from main.py or manually: no difference
                              c) starting from the file system or as frozen bytecode: no change
                              d) with or without manual ip setting: makes a difference

                              If with manual IP setting I add a delay of 2 seconds between the isconnected state and IP setting, it is more stable. So it could be something related to the state machine if the WiFi stack.

                              But I had that manual IP setting before with all versions including 1.10.0b1 w/o problems.

                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                Colateral @Xykon
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • E Offline
                                  Emmanuel Goudot @Xykon
                                  last edited by

                                  @xykon said in New firmware release 1.10.1.b1:

                                  https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz

                                  I use this compiler on linux, and still have
                                  ~/esp/pycom-micropython-sigfox/esp32$ make BOARD=SIPY TARGET=boot
                                  Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
                                  CC bootloader/bootloader.c
                                  xtensa-esp32-elf-gcc: error: unrecognized command line option '-mfix-esp32-psram-cache-issue'
                                  ../py/mkrules.mk:47 : la recette pour la cible « build/SIPY/release/bootloader/bootloader.o » a échouée
                                  make: *** [build/SIPY/release/bootloader/bootloader.o] Erreur 1

                                  C 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    Colateral @Xykon
                                    last edited by

                                    @xykon Thank you. Done. I did also 'make BOARD=LOPY clean' then make BOARD=LOPY TARGET=boot
                                    make BOARD=LOPY LORA_BAND=USE_BAND_868 TARGET=app

                                    and I have same result on flashing.

                                                $ make BOARD=LOPY LORA_BAND=USE_BAND_868  ESPPORT=COM7 flash
                                                Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
                                                warning: CRLF will be replaced by LF in esp32/application.mk.
                                                The file will have its original line endings in your working directory.
                                                Entering flash mode
                                                Traceback (most recent call last):
                                                  File "tools/pypic.py", line 185, in <module>
                                                    sys.exit(main(sys.argv[1:]))
                                                  File "tools/pypic.py", line 173, in main
                                                    pic = Pypic(args.port)
                                                  File "tools/pypic.py", line 77, in __init__
                                                    self.serial = serial.Serial(port, baudrate=115200, bytesize=serial.FIVEBITS, timeout=0.25)
                                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 31, in __init__
                                                    super(Serial, self).__init__(*args, **kwargs)
                                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialutil.py", line 240, in __init__
                                                    self.open()
                                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 78, in open
                                                    self._reconfigure_port()
                                                  File "D:/ProgramFiles/msys32/mingw32/lib/python2.7/site-packages/serial/serialwin32.py", line 222, in _reconfigure_port
                                                    'Original message: {!r}'.format(ctypes.WinError()))
                                                serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(87, 'The parameter is incorrect.')
                                                make: *** [application.mk:398: flash] Error 1
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      Colateral @Xykon
                                      last edited by Colateral

                                      @xykon I commented this in application.mk

                                      #PIC_TOOL = $(PYTHON) tools/pypic.py --port $(ESPPORT)
                                      #ENTER_FLASHING_MODE = $(PIC_TOOL) --enter
                                      #EXIT_FLASHING_MODE = $(PIC_TOOL) --exit
                                      

                                      and flashing was working.

                                      I don't know if everything goes fine with those lines commented. Seems that those lines are targeting flashing a pic microcontroller ... do we have this kind of microcontroller on our LopY and L01?

                                      X 1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        tudro
                                        last edited by

                                        Hello, with this firmware i'm having a problem with the deepsleep lib:
                                        Traceback (most recent call last):
                                        File "/flash/lib/deepsleep.py", line 151, in get_wake_status
                                        File "/flash/lib/deepsleep.py", line 79, in peek
                                        IndexError: bytes index out of range

                                        I downgraded the firmware to 1.9.2.b2 and the deepsleep started working fine again, so i assume it's something with the new firmware. Anybody had this problem?

                                        Thank you

                                        B D 2 Replies Last reply Reply Quote 1
                                        • C Offline
                                          Colateral @Emmanuel Goudot
                                          last edited by

                                          @emmanuel-goudot I had the same problem. After I upgraded xtensa tool to last version everything is working. You need to download and replace xtensa folder with the new software. Be sure the software that you install is inline with your OS: linux / windows and 32/64bit

                                          1 Reply Last reply Reply Quote 0
                                          • X Offline
                                            Xykon administrators @Colateral
                                            last edited by

                                            @colateral The pypic.py tool puts the esp32 into firmware update mode when using a Pytrack or Pysense which is controlled by a PIC microcontroller. This way you no longer need a jumper wire to do firmware upgrades.

                                            Christian Ehlers

                                            C 1 Reply Last reply Reply Quote 1

                                            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
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom