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 v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support)

    Scheduled Pinned Locked Moved Announcements & News
    firmware
    40 Posts 16 Posters 11.8k Views 15 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.
    • robert-hhR Offline
      robert-hh @daniel
      last edited by

      @daniel Two notes about that Ctr-F "Feature":
      a) It's a breaking change and interferes with code, that expects a transparent interface from USB. Ctrl-C could be disabled via keyb_intr(), this one can not. Maybe we could agree in that key_intr() disables both modes, if e.g. called as keyb_intr(-1).
      b) After calling up Ctrl-F once, the succeeding Ctrl-D still are in safe boot mode. back to normal requires a power cycle or a physical hard reset.

      1 Reply Last reply Reply Quote 2
      • C Offline
        cruzer
        last edited by

        @daniel can you please send a link to the FW file? I have to downgrade to previous FW to make it work again. During the upgrade process, I was asked by the upgrade wizard and I chose LoPy4 (should be just LoPy) and I can't seem to get that screen back anymore.

        Can you please just send me the FW for LoPy? (are they just the same file?) At the current state when I have upgraded from 868, and tried AS923, it is not working (not even a JOIN request)

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

          @combaindeft said in New firmware release v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support):

          @daniel Hi,

          And where is the link to the firmware?

          https://software.pycom.io/downloads/LoPy_868-1.16.0.b1.tar.gz

          doesn't seem to work :-(

          Since there are no longer frequency specific versions, the download link for the LoPy1 would be https://software.pycom.io/downloads/LoPy-1.16.0.b1.tar.gz

          If you flash this firmware manually rather than using the GUI firmware updater, it will default to using EU 868MHz frequency unless the LoRa stack is initialised in code with the correct region.

          To set the default region manually, the cli version of the firmware updater has a special command for this.

          On MacOS, the cli version is installed in "/Applications/Pycom Firmware Update.app/Contents/Resources/" as pycom-fwtool-cli

          On Windows, this is installed either in "C:\Program Files\Pycom\Pycom Firmware Update" (32bit) or "C:\Program Files (x86)\Pycom\Pycom Firmware Update" (64bit) as pycom-fwtool-cli.exe

          For Unix/Linux, this is launched via python bin/updater.py from the pyupgrade folder.

          Example for MacOS:

          Check available serial ports: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" list

          Check current LPWAN settings: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --port /dev/tty.usbmodemPy343431 lpwan

          Set default LoRa region to US915: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --verbose --port /dev/tty.usbmodemPy343431 lpwan --region "US915"

          Note: If you omit the -v / --verbose option, you will not see any output for the command. To check if it was successful, you can check echo $? which should return 0 on success or any other number on failure.

          You can also use the command "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --port /dev/tty.usbmodemPy343431 lpwan again to check that your modification was successful.

          Example on Windows (64bit): see above explanations for MacOS which are identical for all OS

          "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" list

          "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" -p COM4 lpwan

          "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" --verbose -p COM4 lpwan --region "US915"

          Example on Windows (32bit): see above explanations for MacOS which are identical for all OS

          "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" list

          "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" -p COM4 lpwan

          "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" --verbose -p COM4 lpwan --region "US915"

          Example on Linux: see above explanations for MacOS which are identical for all OS

          python bin/updater.py list

          python bin/updater.py --port /dev/ttyACM0 lpwan

          python bin/updater.py --verbose --port /dev/ttyACM0 lpwan --region "US915"

          Christian Ehlers

          A S 2 Replies Last reply Reply Quote 2
          • X Offline
            Xykon administrators @cruzer
            last edited by

            @cruzer said in New firmware release v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support):

            @daniel can you please send a link to the FW file? I have to downgrade to previous FW to make it work again. During the upgrade process, I was asked by the upgrade wizard and I chose LoPy4 (should be just LoPy) and I can't seem to get that screen back anymore.

            Can you please just send me the FW for LoPy? (are they just the same file?) At the current state when I have upgraded from 868, and tried AS923, it is not working (not even a JOIN request)

            The firmware for LoPy4 will not work on the LoPy1 because they use different chips for LoRa connectivity.

            For security reasons it is currently not possible for users to change their board type after registering it with the firmware update tool.

            To get your board type changed from LoPy4 to LoPy, please run the following code on the module:

            import machine,binascii                                                     
            binascii.hexlify(machine.unique_id())
            

            Please email the output to support@pycom.io so we can reset your board.

            Christian Ehlers

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

              @xykon Awesome! Thanks. I have emailed the request to support, but you know what, as soon as I flash my LoPy using the FW you sent, it started to work.

              Thanks heaps and hopefully on the next FW release, it will be a lot of help to also include the link to the FW file.

              Regards,
              Adam

              X 1 Reply Last reply Reply Quote 0
              • R Offline
                rskoniec @combaindeft
                last edited by rskoniec

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • P Offline
                  p3pp3d0m
                  last edited by

                  @daniel i have WIFI and socket issue. If i create a socket but i haven't never connected the wifi object, the "socket.connect()" raise an exception.
                  instead if i do this step:

                  • create and connect with the wifi object
                  • shutdown the router
                  • create socket and socket.connect()
                    the call doesn't raise nothing despite the socket.settimeout(3). Furthermore the wlan.ifconfig() return True as i was still connected. I attach a simple code to test the issue.
                  import socket
                  import machine
                  import time
                  from network import WLAN
                  
                  ssid = "MY_SSID"
                  pwd = "MY_PWD"
                  sec = WLAN.WPA2
                  
                  def http_get(url):
                      _, _, host, path = url.split('/', 3)
                      addr = socket.getaddrinfo(host, 80)[0][-1]
                      s = socket.socket()
                      s.setblocking(True)
                      s.settimeout(3)
                      s.connect(addr)
                      s.send(bytes('GET /%s HTTP/1.0\r\nHost: %s\r\n\r\n' % (path, host), 'utf8'))
                      while True:
                          data = s.recv(100)
                          if data:
                              print(str(data, 'utf8'), end='')
                          else:
                              break
                      s.close()
                  
                  wlan = WLAN(mode = WLAN.STA, antenna = WLAN.INT_ANT)
                  wlan.connect(ssid=ssid, auth=(sec,pwd))
                  
                  print("Waiting for connection")
                  while not wlan.isconnected():
                      machine.idle()
                  
                  i = 0
                  while 1:
                  
                      if not wlan.isconnected():
                          print("Not connected to AP")
                      else:
                          print("Connected to AP")
                  
                      i+=1
                      
                      try:
                          http_get('http://micropython.org/ks/test.html')
                      except:
                          print("GET failed")
                  
                      time.sleep(3)
                      print("GET n: " + str(i))
                  
                  1 Reply Last reply Reply Quote 1
                  • X Offline
                    Xykon administrators @cruzer
                    last edited by Xykon

                    @cruzer said in New firmware release v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support):

                    @xykon Awesome! Thanks. I have emailed the request to support

                    I was travelling yesterday... I checked the support email inbox today but can't seem to find your email. If you can send me a personal message instead I will update your device as soon as possible so you can use the GUI firmware updater when the next update is released.

                    Christian Ehlers

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      aevraewrvaervea @Xykon
                      last edited by

                      @xykon I'm getting the following error with a Sipy which can happily be upgraded using the latest GUI tool but fails using the cli tool. When I type the following at a command prompt:

                      pycom-fwtool-cli.exe -p COM3 sigfox

                      I get:

                      Exception: Cannot configure port, something went wrong. Original message: Window
                      sError(87, 'The parameter is incorrect.'), on line 351

                      I have already confirmed with the "list" command that COM3 is correct. The GUI update works so I have G23 grounded OK. I have rebooted so nothing else is using the serial port. Any ideas?

                      A 1 Reply Last reply Reply Quote 0
                      • S Offline
                        ssmith @Xykon
                        last edited by

                        @xykon said in New firmware release v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support):

                        @combaindeft said in New firmware release v1.16.0.b1 (LoRaWAN 1.0.2 multi-region support):

                        @daniel Hi,

                        And where is the link to the firmware?

                        https://software.pycom.io/downloads/LoPy_868-1.16.0.b1.tar.gz

                        doesn't seem to work :-(

                        Since there are no longer frequency specific versions, the download link for the LoPy1 would be https://software.pycom.io/downloads/LoPy-1.16.0.b1.tar.gz

                        If you flash this firmware manually rather than using the GUI firmware updater, it will default to using EU 868MHz frequency unless the LoRa stack is initialised in code with the correct region.

                        To set the default region manually, the cli version of the firmware updater has a special command for this.

                        On MacOS, the cli version is installed in "/Applications/Pycom Firmware Update.app/Contents/Resources/" as pycom-fwtool-cli

                        On Windows, this is installed either in "C:\Program Files\Pycom\Pycom Firmware Update" (32bit) or "C:\Program Files (x86)\Pycom\Pycom Firmware Update" (64bit) as pycom-fwtool-cli.exe

                        For Unix/Linux, this is launched via python bin/updater.py from the pyupgrade folder.

                        Example for MacOS:

                        Check available serial ports: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" list

                        Check current LPWAN settings: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --port /dev/tty.usbmodemPy343431 lpwan

                        Set default LoRa region to US915: "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --verbose --port /dev/tty.usbmodemPy343431 lpwan --region "US915"

                        Note: If you omit the -v / --verbose option, you will not see any output for the command. To check if it was successful, you can check echo $? which should return 0 on success or any other number on failure.

                        You can also use the command "/Applications/Pycom Firmware Update.app/Contents/Resources/pycom-fwtool-cli" --port /dev/tty.usbmodemPy343431 lpwan again to check that your modification was successful.

                        Example on Windows (64bit): see above explanations for MacOS which are identical for all OS

                        "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" list

                        "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" -p COM4 lpwan

                        "C:\Program Files (x86)\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" --verbose -p COM4 lpwan --region "US915"

                        Example on Windows (32bit): see above explanations for MacOS which are identical for all OS

                        "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" list

                        "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" -p COM4 lpwan

                        "C:\Program Files\Pycom\Pycom Firmware Update\pycom-fwtool-cli.exe" --verbose -p COM4 lpwan --region "US915"

                        Example on Linux: see above explanations for MacOS which are identical for all OS

                        python bin/updater.py list

                        python bin/updater.py --port /dev/ttyACM0 lpwan

                        python bin/updater.py --verbose --port /dev/ttyACM0 lpwan --region "US915"

                        I run into lots of issues trying to follow these instructions on a Win64 machine. First issue is the com port needs to use lower case. A bigger issue is that the update program is looking for a file named lopy_915.bin in the archive. This doesn't exist in the archive. Had to rename the file lopy.bin to lopy_915.bin in order for it to work and actually update my device. Also, please put a print statement or something to know that it is actually working. A few times I thought it was locked up so I ctrl-c out of it.

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          aevraewrvaervea @aevraewrvaervea
                          last edited by

                          @aevraewrvaervea Thanks to the tip from @ssmith, using com3 instead of COM3 worked, despite the tool reporting the com port as being COM3 on Windows when the list command is used, and the erroneous example code, i.e.,

                          C:\Program Files (x86)\Pycom\Pycom Firmware Update>pycom-fwtool-cli.exe -v -p co
                          m3 -s 921600 flash -t SiPy.tar.gz

                          works where SiPy.tar.gz is the firmware file in the same folder.

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rskoniec @daniel
                            last edited by

                            @daniel I just wonder - if LoRaWAN in this release was updated to 1.0.2 why os.uname() shows lorawan='1.0.0' ?

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              this.wiederkehr
                              last edited by

                              @Xykon: how can I use the updater tool to flash custom firmware using the pycom-fwtool-cli? I think there used to be an -f option which was used to specify the file. However, when using the latest release of the firmware updater tool 1.10.1.b2 I was not able to flash custom fw. Would you mind providing an example on how to achieve this?

                              J 1 Reply Last reply Reply Quote 0
                              • J Offline
                                jcaron @this.wiederkehr
                                last edited by

                                @this-wiederkehr You can use the -t option, providing the .tar.gz archive as an argument.

                                With a Pysense or Pytrack (running a recent firmware) and the --pypic option this makes upgrades much easier than they used to be.

                                T 1 Reply Last reply Reply Quote 0
                                • T Offline
                                  this.wiederkehr
                                  last edited by

                                  @jcaron awesome, thanks.

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    danielm
                                    last edited by

                                    @this-wiederkehr
                                    I had troubles to flash custom firmware using latest version of CLI tool and found out that for me it only works with -t parameter after flash:

                                    pycom-fwtool-cli -v -p comXY -s 921600 flash -t custom_firmware.tar.gz
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      Tombee @jcaron
                                      last edited by

                                      @jcaron Where do I download the command line tool pycom-fwtool-cli ?
                                      I am using the Windows 10 environment with Atom and pymakr addon and cannot find it under Program files (x86) or elsewhere. My objective is to setup LoRa as US915
                                      I have flashed the the v1.16.0.b1 successfully using GUI and notice that with os.uname() it still shows lorawan='1.0.0'
                                      However, I can only get a LoPy OTAA connection at 868.1 despite using the optional region=LoRa.US915 in main.py or config.py.

                                      R 1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        MarcoBenini
                                        last edited by MarcoBenini

                                        In Linux the firmware upgrade for LoPy using the command line procedure "./update" (pycom_firmware_update_1.10.1.b2.tar.gz) fails.

                                        Error shown
                                        "... usage: updater.py [-h] [-v] [-p PORT] [-s SPEED] [-c] [-x]
                                        {list,chip_id,wmac,smac,sigfox,exit,flash,write,cb,nvs,ota,lpwan,erase_fs,erase_all}
                                        ...
                                        updater.py: error: argument command: invalid choice: '4190208' (choose from 'list', 'chip_id', 'wmac', 'smac', 'sigfox', 'exit', 'flash', 'write', 'cb', 'nvs', 'ota', 'lpwan', 'erase_fs', 'erase_all')
                                        ..."

                                        I tried downloading the firmware file for the LoPy (file LoPy-1.16.0.b1.tar.gz)
                                        and use, as in downgrade firmware thread, the command
                                        python bin/updater.py -t FIRMWARE_FILE_NAME.tar.gz -p SERIAL_PORT -s 921600 flash

                                        It doesn't work since in the new bin/updater.py the command arguments were split in groups, while before where all put together.
                                        So "flash" has to before "-t FIRMWARE_FILE_NAME.tar.gz".

                                        So the command has to be:
                                        python bin/updater.py -p SERIAL_PORT -s 921600 flash -t FIRMWARE_FILE_NAME.tar.gz

                                        note: -s 921600 can be omitted since it is the default value
                                        LoRa region Europe is default value.

                                        X 1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          rskoniec @Tombee
                                          last edited by rskoniec

                                          @tombee It should be under C:\Program Files (x86)\Pycom\Pycom Firmware Update

                                          0_1519396857535_cli.jpg

                                          T 2 Replies Last reply Reply Quote 0
                                          • T Offline
                                            Tombee @rskoniec
                                            last edited by

                                            @rskoniec Thanks
                                            It shows up on my Windows 7 computer in the Program Files(x86)
                                            but NOT in my Windows 10 computer! Any ideas?

                                            1 Reply Last reply Reply Quote 0

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

                                            Pycom on Twitter

                                            Pycom