Simple Windows installation
-
Hi @pmulvey, sorry you've having these problems!
Have you followed the specific settings required for FileZilla to work? If you do not set these, then the FTP clients will have issues with connecting to your device (SiPy).
Have a look here for instructions on how to do so - https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html?highlight=ftp#pycom-filesystem
You need to ensure the transfer mode is passive and that you limit the number of simultaneous connections, this is important!
Let me know how you get on!
Cheers,
Alex
-
@bucknall Alex,
I have FileZilla working. On the local site I just double click the file and it transfers to SiPy. However when I do a soft reboot (CTRL+D) in order to run main.py I lose the FTP connection. To get the FTP connection back I must press the reset button on SiPy and disconnect/reconnect sipy-wlan. I think that a disconnect/reconnect of sipy-wlan is required after a hard reset. Can FileZilla auto sync the local site with SiPy because if it did the file would get transferred over as soon as I save it in Notepad++. -
@pmulvey I made a test with NppFTP. That Plugin has the habit of disconnecting between every two actions. That seems to confuse the FTP server of my LoPy and most likely your SiPy too. Other servers are more stoic.
FileZilla Windows works with LoPy. You have to define it in the server manager (File->Server Manager). Use password, unencrypted session, and in the transfer settings set passive mode and limit the number of simultaneous connections to 1. -
@pmulvey I have re-configured my LoPy to use station mode. Doing this, I do not have to re-connect my PC every time. The script I use is:
import network import time # setup as a station wlan = network.WLAN(mode=network.WLAN.STA) wlan.connect(ssid="my_ssid", auth=(network.WLAN.WPA2, "my_password")) while not wlan.isconnected(): time.sleep_ms(50) wlan.ifconfig(config=("my_static_ip", "255.255.255.0", "my_gateway", "my_gateway"))I use a static IP address, because that is more convenient in testing.
print(wlan.ifconfig())
And as a hint: Before adding this change, be sure to have REPL on USB enabled, so you have a fall-back if that script fails, while you set it up, or use WLAN.STA_AP as mode, which keeps AP mode. -
Robert,
This is my boot.pyboot.py -- run on boot-up
test
import os
import network
import time
from machine import UART
uart = UART(0, 115200)
os.dupterm(uart)setup as a station
wlan = network.WLAN(mode=network.WLAN.STA)
wlan.connect(ssid="SKYFXXXX", auth=(network.WLAN.WPA2, "XXXXXXXX"))
while not wlan.isconnected():
time.sleep_ms(50)wlan.ifconfig(config=("192.168.0.29", "255.255.255.0", "192.168.0.1", "192.168.0.1"))
print ("Booted in STA mode")
When I do CTRL+D I get:
PYB: soft reboot
每
and no REPL. It works OK with the reset button.
How do I get the fancy code window in my post? -
@pmulvey You get code windows by inserting lines with three backticks before and after your code.
-
# test import os import network import time from machine import UART uart = UART(0, 115200) os.dupterm(uart) # setup as a station wlan = network.WLAN(mode=network.WLAN.STA) wlan.connect(ssid="SKYFXXXX", auth=(network.WLAN.WPA2, "XXXXXXXX")) while not wlan.isconnected(): time.sleep_ms(50) wlan.ifconfig(config=("192.168.0.29", "255.255.255.0", "192.168.0.1", "192.168.0.1")) print ("Booted in STA mode")``` -
@robert-hh On a soft reboot (CTRL-D) boot.py seems to hang on this line:
wlan = network.WLAN(mode=network.WLAN.STA)and I just get this response:
PYB: soft reboot
每But on the reset it works fine. Can I run main.py from REPL without a soft reboot? I have to explain here that I am new to both micropython and sipy but have done loads with arduino.
-
@pmulvey I do not see a reason for the difference, but I execute the piece of code for setting up the network interface from main.py. Actually it is in a separate file, let's call it "setup_wifi.py", and I have a statement
import setup_wifi
in main.py. It is usual practice to make main.py simple and to put you application code into separate files, which are then imported in main.py, eventually enclosed in a try/except clause. That way the device comes up in a stable state, even if you code flags errors. -
Help me create a bootable USB, I want to install Windows 10 on my system. From where should I download the iso file.
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