Problem with WiFi connection
-
Hi Forum members,
I am new to use #LoPy which I bought recently. I was following the tutorials and while setting up the WiFi somehow I totally lost the connection to #LoPy and cannon even able to reset with button provided. What I have done was copying this piece of code to boot.py and restart thats it.
from network import WLAN
wlan = WLAN(mode=WLAN.STA)
nets = wlan.scan()
for net in nets:
if net.ssid == 'mywifi':
print('Network found!')
wlan.connect(net.ssid, auth=(net.sec, 'mywifikey'), timeout=5000)
while not wlan.isconnected():
machine.idle() # save power while waiting
print('WLAN connection succeeded!')
breakYes, of course, I have edited the file with my #WiFi credentials.
Let me know what I have done wrong and how I can get the #LoPy again working.
Thanks in advance.
Rahul.
-
@rahul You can boot in safe mode, or use Atom plugin for serial communication to still access it. Have you tried that?
-
@RobTuDelft Thanks for the quick reply. Safe boot seems quite tricky as I have lifted up the G20 pin while booting (correct me if I am wrong) and somehow either I cannot do it properly or is not working. About the Atom, how can I access the atom plugin if LoPy is not get connected? At plugin I am getting this error:
Connecting on 192.168.4.1....
Connection error: Error: Login time out -
@rahul
as you use G20 i assume you have expansion board
try connecting by UART
i do not work with Atom but i suppose there is possibility to change connection from TCP/IP to UART.Or use putty or Arduino IDE and there is Commport monitor
-
@rahul With the Atom plugin you can specifiy the com port to use in the settings. So you would change the ip-adress to a serial port. Username and password are not needed for serial coms. Under 'More' you can also find the option to 'Find Serial Ports'.
-
@RobTuDelft thx for the help.
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