New firmware release 1.6.12.b1

  • Hello,

    A new firmware version (1.6.12.b1) has been released. Here's the change log:

    • General fixes and improvements to time.sleep(), time.sleep_ms() and time.sleep_us()
    • Improve pin interrupts timing.
    • Fix memory fragmentation issue caused by the timer alarms.
    • Fix bug caused by machine.reset(). Used a quick WDT reset instead which actually performs a full reset of the chip.
    • Fix bug on BLE advertisement. Prevent system hang when trying to advertise a BLE service with length != 16.
    • Solve race condition when reconfiguring the UART while an interrupt takes place.
    • Add support for the LoPy OEM and WiPy OEM.
    • Allow BLE characteristic read callbacks to return a value. This value will be the one received by the BLE client performing the read operation.
    • General improvements to the docs.


  • I have noticed since the previous firmware that ftp and telnet performance has dipped for the lopy. It is very slow especially while using the telnet REPL prompt. UART REPL prompt shows no issues at all though. Does anyone face a similar issue?

  • @robert-hh Thank you . Now it seems to work. I do a stupid mistake :( . Who knows why it worked with the old firmware version? :D

  • @daniel Thanks for uploading the recent code to the repository.

  • @Innocenzo What I see is that you use "str" both as built-in function and as local variable. That will cause confusion. Although it should not give the error message you show.

  • Something strange happens with my code that worked well with previous firmware!

    import usocket as socket
    from network import WLAN
    def connectWeb(server_websocket):
        webaddr = socket.getaddrinfo("", 80)[0][-1]
        print("Bind address info:", webaddr)
        print("Listening, connect your browser to http://<this_host>:80/")
        while True:
            res = server_websocket.accept()
            client_sock = res[0]
            client_addr = res[1]
            print("Client address:", client_addr)
            print("Client socket:", client_sock)
            req = str(client_sock.readline())
            while True:
                h = client_sock.readline()
                if h == b"" or h == b"\r\n":
            ib = req.find(':')
            if ib > 0:
                str = req.split(":")
                ssid = str[1]
                pwd = str[2]
                security = ["None","WEP","WPA","WPA2"]
                sec = security[int(str[3])]
                wlan.connect(ssid,  auth=(sec,  pwd),  timeout=5000
                if not wlan.isconnected()
                    f = open('connect.txt','w')
                    f = open('connect.txt', 'w')
                    f = open('ssid.txt', 'w')
                    f = open('pass.txt', 'w')
                    f = open('sec.txt', 'w')
                with open('index.html', 'r') as html:
    wlan = WLAN()
    wlan.init(mode=WLAN.AP, ssid = 'WiPy', auth=(WLAN.WPA2,'testwipy2'), channel=7, antenna=WLAN.INT_ANT)
    wlan.ifconfig(1, config=('', '', '', ''))
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)


    Client address: ('', 40725)
    Client socket: <socket>
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "", line 80, in <module>
      File "", line 23, in connectWeb
    NameError: local variable referenced before assignment

  • @brotherdust
    As far as I know (and I'm not Pycom employee) development is still ongoing on at but yes sources aren't in sync with the latest version, just slightly ahead of 1.6.9.b1

    This has happened a few times in the past, sometimes they're really good at it sometimes it takes a bit longer. Not to be a stalker or anything :-) but I saw Pycom recently tweet about hackaton in Shanghai and Daniel was there so that may be the reason.

    They have started some integration with the official MicroPython and there's been a few pull request, Daniel explained in another thread

  • @jmarcelino, can you confirm where development is actually happening these days? The source repos are out of date. Pycom used to be really good at keeping the sources in-sync with the current firmware release, but it seems to be a low priority now. I do remember an announcement that the sources will be merged with the official micropython tree, but I'm not seeing any commits or pull requests that would show this is actually happening. Any thoughts?


  • @jmarcelino: Thanks for your answer although that repo isn't very up to date either ( last commit 24 days ago).

  • @this.wiederkehr
    That's the old source tree, you should use now but it hasn't got the very latest updates yet

  • Where can I find the sources in order to rebuild myself? Where is the development actually happening?
    Last commit to was on 7th of march..

    Thanks for clarifying.

    Regards This

  • This update seems to be a good one, thanks Daniel.
    I no longer am running out of memory and so far have not experienced any mysterious application hanging. The sporadic and temporary halting/hiccupping of my application has also vanished. I suspect I must have been bumping my head against the "memory fragmentation issue caused by the timer alarms" and "General fixes and improvements to time.sleep(), time.sleep_ms() and time.sleep_us()"

  • @daniel This version does not run .mpy files from the files system any more. It looks like you have the wrong setting in, or the line:
    is missing.

  • @daniel Hello Daniel, pin interrupt response times did not really improve. I had still rare cases of about 1 ms resposne time, with most responses within 150 µs, and 50 µs fastest response. Multiple triggers on slow pulses got fewer. I assume these cannot be avoided by firmware.
    B.T.W.: When do you plan to update the github repository? I have the habit of putting some code into frozen bytecode.

  • Very Nice for BLE !

    I think that also bugs related to SSL Socket Server Side ( must be considered in the next firmware release.

    Good Works an Thanks.

  • Nice update! BLE should be simpler with that change, will try it now :-)

Log in to reply

Pycom on Twitter