No Answer to a Seemingly Simple Issue
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.
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.
- 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.
- 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)
rskoniec last edited by rskoniec
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
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.
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.
@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.
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?
@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.
robert-hh 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.
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!
@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.