New firmware release 1.10.1.b1



  • NEW UPDATER TOOL PATCH: Some users are experiencing Guru meditation errors on the 4MByte of RAM devices with this update. An intermediate solution for this while we release a new version of the updater is to patch the current one.

    Please follow these instructions:

    1. Find the location where the Pycom Firmware Update application is installed. Then enter the directory (on Mac OS you need to right click and select "Show Package Contents").

    2. Within the files of the app, locate the one named updater.py.

    3. Inside that file find the following 3 lines which appear twice:

       args.flash_size = '4MB'
       args.flash_mode = 'dio'
       args.flash_freq = '40m'
      
    4. Change the lines to read:

       args.flash_size = 'detect'
       args.flash_mode = 'dio'
       args.flash_freq = '80m'
      

    A new firmware release is out. The version is v1.10.1.b1. This release brings full external RAM support for the newer modules. With this the MicroPython heap is increased to 3 MBytes (1 Mbyte is reserved for internal use).

    The Github sources have been updated as well with the changes from this release.

    Here's the full change log:

    • esp32/frozen: Solve bug of calling non-existing .connect method in AWS libs.
    • esp32: Improve WiFi connect policy. Increase stack of some IDF tasks.
    • esp32: Store the entire LoRa MAC params structure dring NVRAM save.
    • esp32: Allocate the MicroPython stack size dinamically. Use a larger stack for the devices with pSRAM.
    • esp32/mods/modwlan.c: Fix DNS bug and WLAN disconnect instability.
    • esp32: Improve HW I2C deinit routine.
    • esp32: Solve issue with Sigfox modulation due to the new compiler options.
    • esp32: Enable pull-ups for output pins. Improve sendbreak timing.
    • esp32: Set the value of output pins before de-assigning them.
    • esp32: Correct pin deinit conditions and sequence.
    • esp32: Deassign pins when peripherals are disabled. Disabled pull-ups as well.
    • esp32: Allow the WiPy to use the 2 SPI devices. Add byte order support.
    • esp32: Make the file system 4MBytes for devices with 8Mbytes of flash.
    • esp32: Increase flash frequency to 80MHz. Keep pSRAM at 40MHz.
    • esp32 : Fix UART initialisation routine.
    • esp32: Fix machine.reset()
    • esp32: Update bootloader. Include code to init GPIOs and VDDSDIO voltage.

    As usual this new firmware can be applied using our firmware update tool: https://pycom.io/downloads/

    Cheers,
    Daniel



  • @bradnz Thank you for the info. I was pretty busy lately and didn't have much time for the lopy. Maybe this week i get a chance to test some more. I tested 2 lopys on usb and they both had the same problem. Even if it's just on batter for you, it still means there is a problem. Maybe they will have time to investigate this sooner or later, otherwise i will just stick to the 1.9 version for now.



  • @tudro Interestingly enough, after a lot of testing, I only ever get this error when I have connected to the device, with an expansion board and powering this ONLY through a Lipo battery. With the device connected via USB I dont get this error! I have upgraded to the latest firmware which hasnt fixed the issue so Im not sure where to go to from here.



  • @tudro There is a new firmware version out at 1.10.2.b1, but it does not mention deepsleep in the revision notes.



  • @bradnz Nope. I guess we have to wait for a new firmware.



  • @tudro Did you find a solution to this issue? Im experiencing the same issue



  • Espressif just pushed a new release 2.1.1 (https://github.com/espressif/esp-idf/releases) which is advertised to include bug fixes for two security vulnerabilites: KRACK and BlueBorne

    Are the mentioned fixes already included in this current firmware release?

    EDIT:
    Found the answer regarding Krack myself:
    http://espressif.com/en/media_overview/news/espressif-releases-patches-wifi-vulnerabilities-cert-vu228519
    Fix is in master since this commit:
    https://github.com/espressif/esp-idf/commit/904d6c8f2b01de52597b9e16dad19c78ade9e586

    This commit is in pycom's esp-idf as well (https://github.com/pycom/pycom-esp-idf/commit/904d6c8f2b01de52597b9e16dad19c78ade9e586).



  • @xykon said in New firmware release 1.10.1.b1:

    Any chance you can try without assigning a fixed IP?

    calling ifconfig() before connect() also solves the problem. I looked into the code, and there seems to be a condition mix-up between the local state of the wlan_obj.disconnected variable and the connection status in the wifi_event_group variable. ifconfig(), when called, disconnects first, which causes a SYSTEM_EVENT_STA_DISCONNECTED event, which attempts to reconnect, while the dhcp client is shut down and the new ip values are set, and the timing relations are not obvious. This might lead to trouble.


  • administrators

    @colateral On MacOS X (which we use internally) the script works fine with either the standard expansion board or the Pytrack / Pysense. This is an issue specifically with running the script on Windows. As I want to include this functionality with the firmware update tool, we'll obviously have to make the script compatible with Windows OS.



  • @xykon Thanks. We are using LoPy with pycom shield. We have also our own board based on L01. Both cases raise errors on that pypic serial connection . Can you enhance application.mk by adding some conditions in case that the pic is not present.?


  • administrators

    @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.



  • @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



  • 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



  • @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?



  • @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


  • @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



  • This post is deleted!


  • @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.


  • administrators

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



  • @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
    AAAAAAAAAAAAAAAAAAAA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/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.


 

Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter