Esp micropython connection problems


#1

I am using an ESP iot phat with the micropython firmware.

The problem comes when I use

wlan.connect('ssid','password')

and replace ‘ssid’ and ‘password’ and hit enter I just get

...

I can wait for hours nothing happens so I end up hitting Ctrl+C to get the prompt back

I think this is because my SSID has an apostrophe in it (to show possession) so is there a way round this in python or do I change my Wifi Networks Name? (preferably not)

Thanks
Will


#2

I say this because i can connect to wifi through the AT firmware


#3

have you tried to escape the quote character the usual way:

wlan.connect('pi2003\'s ssid','password')

#4

Thanks that worked a treat. I completely forgot that method.

On another note is there a way to save a python file. Instead of using the shell.


#5

sure, I sort of touch on the subject in the following article:
https://learn.pimoroni.com/tutorial/hal13/micropython-on-esp-iot-phat

main.py has a special meaning however, so make sure that whatever you save there is functionally sound. Alternatively, save under a different name and call when needed.


#6

… and yes, I should pick up that series where I left off, the plan was to cover file transfer next, but I think there was some teething problems when I last looked at it, which partly explains why I postpone the article.