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

    No Answer to a Seemingly Simple Issue

    Scheduled Pinned Locked Moved Comments & Feedback
    11 Posts 3 Posters 724 Views 3 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.
    • G Offline
      groger57
      last edited by

      I have discovered many others with the issue of not being able to upload a file/folder to flash the WiPy board. There seems to be no resolution to this. I am using a version 3.1 expansion board. I can "run" my code - in fact using an example from pymakr for VS Code (bluetooth) and followed everything as described in the "Pycom WiPy 3.0 user guide.pdf" to set up the folder. I'm using COM21.

      The messages:
      Uploading project (uload)...
      Safe booting device... (see settings for more info)
      Safe boot failed, uploading anyway.

      Failed to connect (Error: Port is not open). Click here to try again.
      Uploading to /flash...
      Upload failed.: timeout Please reboot your device manually.

      What gives. I cannot find one consistent answer anywhere for this problem. Really, really annoying. Maybe pycom should provide "paid support"? This is not good if one needs to get some development done.

      Thanks for any morsel or allotment of help anyone can provide.

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

        @groger57 The only advice I can give is: do not use pymakr for that purpose. Use FileZilla (or plain ftp) to upload files to you device. If you do not want to use ftp, but USB, you can use simple and less comfortable tools like Adafruit ampy of Dave Hylands rshell.py or pyboard.py from the microypthon.org repository. But Filezilla is the most convenient one. It leaves no doubt which files are where.

        1 Reply Last reply Reply Quote 0
        • G Offline
          groger57
          last edited by

          thanks robert-hh,

          my board is presently connected as a usb driven serial port that shows up as COM21 under com ports. to use ftp, is there a tutorial or steps on how to set up and accomplish this? I'm all for self-help, if there is info out there read. thanks!

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @groger57
            last edited by robert-hh

            @groger57 It's in the documentation: https://docs.pycom.io/gettingstarted/programming/ftp/
            If you changed the IP address of your device for a connection to you local network, you must use that address.

            1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @groger57
              last edited by

              @groger57 by the way: Windows only allows one application to use a com port. Please check, that no other software is using the com port.

              1 Reply Last reply Reply Quote 0
              • G Offline
                groger57
                last edited by

                hi, thanks again, I have been reading that. but still the question - device manager is showing the board connected under COM PORTS, as "Expansion 3" COM21. Will Filezilla connect to it in filezilla at address 192.168.4.1, when windows has it set up as a com port?

                robert-hhR 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @groger57
                  last edited by

                  @groger57 The com port and ftp port are completely independent. You can use them in parallel. FTP is connected directly to the LoPy module via WiFi. Obviously, your PC and the LoPy have to be connected to the same WiFi network to be able to communicate.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    groger57
                    last edited by

                    sorry, dumb question it was.
                    I checked my router and it does not show 192.168.1.4 on the network. Maybe that's why the ftp won't connect. should the device boot with wifi enabled, or do i need to enable it? also, I just updated the board firmware to the latest version.

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      groger57
                      last edited by

                      weird. my samsung phone show wipy, but my asus router does not. I have a 3.4dB gain antenna attached and I am about 6m away from the router.

                      R robert-hhR 2 Replies Last reply Reply Quote 0
                      • R Offline
                        rskoniec @groger57
                        last edited by rskoniec

                        @groger57

                        I checked my router and it does not show 192.168.1.4 on the network.

                        192.168.1.4? Maybe 192.168.4.1 which is the default IP address of WiPy in the AP (access point) mode. You won't see this IP with WiPy MAC on any router, because your WiPy in that mode isn't connecting to any. It can connect in STA (station) mode. So in AP mode your PC is connecting directly to WiPy without any router.

                        Also be aware that Filezilla connection:

                        • needs to be normal type (w/o any encryption)
                        • in passive mode
                        • limit of simultaneous connections set to 1
                        from network import WLAN
                        from network import Server
                        
                        wlan = WLAN() # start the WiFi in AP mode with default password (PSK) www.pycom.io
                        wlan.mode() # check the WiFi mode
                        server = Server() # start FTP and Telnet services with default credentials - l: micro p: python
                        server.isrunning() # check whether the server is running or not
                        

                        Sources: Server class and WLAN class

                        The machine is working as good as it's code.

                        1 Reply Last reply Reply Quote 0
                        • robert-hhR Offline
                          robert-hh @groger57
                          last edited by

                          @groger57 The antenna is not the problem. The sensitivity of the ESP32 WiFi is very good. It's the configuration, like @rskoniec said. For WiFi, you have two options:

                          1. Keep the WiPy in AP mode, which is the default. In that mode, the WiPy is the access point, like your router now. In oder to connect to it, you have to re-configure our PC and connect the PC to it. Then, the PC looses the comnnection to the internet, unless it has two interfaces, e.g. wired and wireless.
                          2. Configure the WiPy to Station mode and let it connect to your router. That is usually more convenient. A sample script is here: https://docs.pycom.io/tutorials/all/wlan/ The essential statements , to be entered manually are:
                          import network
                          wlan = network.WLAN(mode=network.WLAN.STA) # create station interface
                          wlan.connect(ssid=WIFI_SSID, auth=(network.WLAN.WPA2, WIFI_PASSWD))
                          print(wlan.ifconfig())
                          

                          After wlan.connect(), you have to wait a few seconds to allow the Wipy to connect. You would usually put that connect code above into main.py.

                          Finally, you can still continue with attempts to use the serial interface. Options:

                          • Pymakr (which fails)
                          • The command line tool ampy by adafruit (https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy)
                          • the command line tool rshell (https://github.com/dhylands/rshell)
                          • the command line tool pyboard.py (https://github.com/micropython/micropython/blob/master/tools/pyboard.py)
                          • some other people tools like
                            -- uPyLoader (https://github.com/BetaRavener/uPyLoader/releases)
                            -- Thonny

                          Although as fallback tools I prefer the command line tools. They are robust, and especially rshell.py and pyboard.py need only Python with the serial and usb libs to work.

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

                          Pycom on Twitter

                          Pycom