Is this ESP8266 module compatible with MicroPython

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Is this ESP8266 module compatible with MicroPython

Post by liudr » Tue Oct 17, 2017 5:19 pm

This is what I bought, thinking it was loaded with NODEMCU firmware but it's loaded with some AT firmware

https://www.banggood.com/3Pcs-NodeMcu-L ... ds=myorder

Unlike the Wemos D1 board that I got working with MicroPython effortlessly, this module reports error setting AP and with EREM etc.

Information on the module from AT command:

Farylink Technology Co., Ltd. v1.0.0.2
May 11 2017 22:23:58

The AT firmware works and I connected it to my router and made HTTP requests fine. Once I loaded MicroPython 1.9.2, the following appeared:

Performing initial setup
Traceback (most recent call last):
File "_boot.py", line 11, in <module>
File "inisetup.py", line 38, in setup
File "inisetup.py", line 9, in wifi
OSError: can't set AP config
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM

There is no AP. I flashed the same 1.9.2 MicroPython on a WeMos D1 board (looks like Arduino UNO) and that one works. It has showed an AP although I've never connected to it (what does it do?).

Apart from the AP issue, MicroPython seems to work fine. I loaded an LED blinker program and it worked.

I appreciate it if someone can point me in the right direction how to get AP working. My goal is to used this board's WiFi and GPIO features. Otherwise, an arduino will suffice.
Last edited by liudr on Wed Oct 18, 2017 12:51 am, edited 1 time in total.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: Is this ESP8266 module compatible with MicroPython

Post by mcauser » Tue Oct 17, 2017 10:39 pm

I can't see why it wouldn't be compatible. It looks like a typical "nodemcu" style ESP8266 dev board.
Do you have the CP2102 driver installed?
Try flashing it with a simple Arduino blink sketch to overwrite the AT firmware.
You can't brick these devices, so worst case just erase the flash and start again.

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Is this ESP8266 module compatible with MicroPython

Post by liudr » Wed Oct 18, 2017 1:07 am

mcauser wrote:
Tue Oct 17, 2017 10:39 pm
I can't see why it wouldn't be compatible. It looks like a typical "nodemcu" style ESP8266 dev board.
Do you have the CP2102 driver installed?
Try flashing it with a simple Arduino blink sketch to overwrite the AT firmware.
You can't brick these devices, so worst case just erase the flash and start again.
Thanks. I have Arduino IDE 1.6.12 and uploaded the blink successfully:

Board: NodeMCU 1.0 (ESP-12E)

Board info
BN: Unknown board
VID: 10C4
PID: EA60
SN: Upload any sketch to obtain it

Everything works. Then I flashed with MicroPython 1.9.2 and it didn't work:

esptool.py --port COM15 --baud 460800 write_flash --flash_size=detect 0 esp8266-20170823-v1.9.2.bin

Same error.

I then reduced the baud rate and flashed again:

esptool.py --port COM15 --baud 115200 write_flash --flash_size=detect 0 esp8266-20170823-v1.9.2.bin

Same errors as before:

$▒▒▒#4 ets_task(40100164, 3, 3fff837c, 4)
Performing initial setup
Traceback (most recent call last):
File "_boot.py", line 11, in <module>
File "inisetup.py", line 38, in setup
File "inisetup.py", line 9, in wifi
OSError: can't set AP config
OSError: [Errno 1] EPERM
OSError: [Errno 1] EPERM

MicroPython v1.9.2-8-gbf8f45cf on 2017-08-23; ESP module with ESP8266
Type "help()" for more information.

OK I also tried under Arduino IDE sample code that scans AP and a web server to toggle on and off the LED on the ESP8266 module. Both worked fine. So the hardware is working as I expected (tested with AT firmware anyway) but MicroPython 1.9.2 is not working on it.

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Is this ESP8266 module compatible with MicroPython

Post by liudr » Wed Oct 18, 2017 4:09 pm

I later loaded MicroPython 1.8.x and got a repeating error message saying my file system was corrupted. So I erased the flash and loaded 1.9.2. This time it works with only one error that reads ENOENT. I don't know what this error means.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Is this ESP8266 module compatible with MicroPython

Post by deshipu » Wed Oct 18, 2017 5:23 pm

That error means that there is no main.py

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Is this ESP8266 module compatible with MicroPython

Post by liudr » Wed Oct 18, 2017 5:39 pm

deshipu wrote:
Wed Oct 18, 2017 5:23 pm
That error means that there is no main.py
Thanks. Will upload main.py !
I am just getting started with MicroPython. Been learning Python for about 2 years on and off. It's a great programming language for beginners and those more serious ones like myself. MicroPython just adds hardware to the fold. Raspberry Pi helps on both too but it is burdened by a full OS to do simple things like blinking.

I don't know. If MicroPython came out around the same time Arduino did (would be hard w/o ESP8266 etc. platforms), it could have the same extend of effect as Arduino. Still awesome nevertheless.

BTW, you're a circuit designer, right? I saw your breakout board on another post. OSH purple, way to go! :D

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: Is this ESP8266 module compatible with MicroPython

Post by mcauser » Wed Oct 18, 2017 11:20 pm

The ENOENTs were a bit confusing for me too at first.
It means Error NO ENTry (or Error NO ENTity)

You can safely ignore it, or just create an empty main.py file to make the warning go away.

http://docs.micropython.org/en/latest/e ... ot-process

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Is this ESP8266 module compatible with MicroPython

Post by liudr » Thu Oct 19, 2017 12:01 am

mcauser wrote:
Wed Oct 18, 2017 11:20 pm
The ENOENTs were a bit confusing for me too at first.
It means Error NO ENTry (or Error NO ENTity)

You can safely ignore it, or just create an empty main.py file to make the warning go away.

http://docs.micropython.org/en/latest/e ... ot-process
Thanks. I just uploaded main.py using ampy. Works nicely now.

bhumbak1
Posts: 1
Joined: Thu Feb 01, 2018 3:50 pm

Re: Is this ESP8266 module compatible with MicroPython

Post by bhumbak1 » Thu Feb 01, 2018 4:00 pm

[quote=deshipu post_id=22580 time=1508347408 user_id=653]
That error means that there is no main.py
[/quote]

hi there
how can I solve this problem
I have no idea how can I send this file to my board
i'm using node mcu connecting it to pc through putty but putty terminal just stop responding

User avatar
liudr
Posts: 211
Joined: Tue Oct 17, 2017 5:18 am

Re: Is this ESP8266 module compatible with MicroPython

Post by liudr » Thu Feb 01, 2018 6:24 pm

This thread is not related to your problem. Why don't you post a new thread? In the new thread, state what processor/dev board you're using.

Post Reply