How to get the automatic AP back on lopy ?
-
Hi, I'm using a Lopy4. I managed to connect with a computer to the automatic AP named "lopy-wlan-xxx". Then I went on ftp://192.168.4.1 and everything worked fine.
I tried to change the AP name with the following command :
network.WLAN(mode=network.WLAN.AP, ssid="lopy_test", auth=(network.WLAN.WPA2,'lopy123456'))It worked (I could see the new network on the computer) but I couldn't get to ftp://192.168.4.1. I tried to change the mode (AP, STA, STA_AP) but I can't get on the ftp link anymore.
Does anyone know how to get back to the way it was (default configuration with the automatic access point) or get the FTP to work with a custom network ?
Thanks
-
Hi, have you try to set your IP with something like this
network.WLAN.ifconfig(config=('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8'))Documentation found here:
https://docs.pycom.io/firmwareapi/pycom/network/wlan.html#wlanifconfigid0-configdhcp-or-configtuple -
@Eric73 Hi, yes I did try. I did this exact line and then tried to get to ftp://192.168.0.4 (tell me if I'm wrong) but it didn't work.
-
@melkoutch Have you try to restart ftp server after changing AP name ?
import network server = network.Server() server.deinit() # disable the server # enable the server again with new settings server.init(login=('user', 'password'), timeout=600)(from pycom documentation)
Warning : if you use telnet to acces to the board you will lose the connexion after server.deinit()
Use serial cable to do this -
@Eric73 I hadn't tried that, and it worked ! Thanks !
-
@melkoutch You could set up the device to connect to you home router, along the instructions at https://docs.pycom.io/tutorials/all/wlan.html
That is usually much more convenient. -
@robert-hh Yes I saw that but when you say "more convenient" what do you mean ? Is it like faster ? I really just need one computer to get access to the ftp server so is it worth it to take a router raher than making the board an AP ?
-
@melkoutch If you just have a 1-to-1 connection, then you can do anything. If you have several devices already in a network with a router, then it may be more convenient to have the Lopy4 also connected to the router.
And not, it is not faster. -
@robert-hh Ok, thanks !
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