Local file system access while connected to the home router

  • Hello,
    will I have an access to a local file system on WiPy via FTP when WiPy will be connected to the home router?

  • @michalt38 to do this you need run Wipy in mode


    but for me it can connect to router but i can not connect to it as AP.
    But i do not tested this in the current firmware - maybe it work now

  • I do it in the same way like Robert. I have this section in my main.py--perhaps it is better in boot.py ?--to connect to the local WiFi

    # WiFi configuration 
    import machine
    from network import WLAN
    # configure the WLAN subsystem in station mode (the default is AP)
    wlan = WLAN(mode=WLAN.STA)
    # go for fixed IP settings (IP, Subnet, Gateway, DNS)
    #wlan.ifconfig(config=('', '', '', ''))
    wlan.scan()     # scan for available networks
    wlan.connect(ssid='your_ssid', auth=(WLAN.WPA2, 'your_password'))
    while not wlan.isconnected():

    I did not configure a static IP, but after the first connection to the WiFi network I specified "use always the same IP" in the DHCP configuraion of my Fritz box router.

  • That's right. Here is the little script snippet I run on startup:

    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-passwd'))
    while not wlan.isconnected():
    wlan.ifconfig(config=("", "", "", ""))

    That sets the IP to

  • How can I set the WiPy IP address? In this command: wlan.ifconfig(config=('', '', '', '')) the first address is a WiPy's IP?

  • That's how I configured my WiPy and LoPy. They run in STA mode, and either get their IP address from the router, or I set fixed addresses from the router's network. Using that IP address, I can access them with ftp. They act just as a server on your LAN.

Log in to reply

Pycom on Twitter