Flashing micropython on Wemos D1 Mini Pro

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
Roberthh
Posts: 1574
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing micropython on Wemos D1 Mini Pro

Post by Roberthh » Mon Jan 16, 2017 5:57 pm

I'm doing this with an normal usb cable,
For Wemos D1 mini and pro that's fine, because they have the usb/serial converter on-board. I made my tests with an ESP-01, which just have serial TX/RX.

blckpstv
Posts: 28
Joined: Thu Dec 15, 2016 9:11 pm
Location: Belgium

Re: Flashing micropython on Wemos D1 Mini Pro

Post by blckpstv » Mon Jan 16, 2017 7:17 pm

I've used mcauser's

Flash precompiled firmware:

Code: Select all

CODE: SELECT ALL
wget http://micropython.org/resources/firmware/esp8266-20170108-v1.8.7.bin
esptool.py -p /dev/tty.SLAB_USBtoUART write_flash -fm dio -fs 32m 0 esp8266-20170108-v1.8.7.bin

and when

Code: Select all

>>>uos.uname
<function>
Any idea?

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

Re: Flashing micropython on Wemos D1 Mini Pro

Post by mcauser » Mon Jan 16, 2017 7:20 pm

uos.uname is a function. Call it like this:

Code: Select all

>>> uos.uname()

blckpstv
Posts: 28
Joined: Thu Dec 15, 2016 9:11 pm
Location: Belgium

Re: Flashing micropython on Wemos D1 Mini Pro

Post by blckpstv » Mon Jan 16, 2017 7:21 pm

A following question, a little bit of topic though.

How can I add mqtt to the wemos so it supports mqtt?

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

Re: Flashing micropython on Wemos D1 Mini Pro

Post by mcauser » Mon Jan 16, 2017 8:26 pm

You'll need to copy these files to your board.
https://github.com/micropython/micropyt ... qtt.simple
or
https://github.com/micropython/micropyt ... qtt.robust

Code: Select all

>>> from umqtt.simple import MQTTClient
>>> c = MQTTClient("client", "10.1.1.3")
>>> c.connect()
More thorough example: https://github.com/phieber/uPython-ESP8266-01-umqtt

Soft launch of upip.
Not sure if it's working yet - I haven't used it.
viewtopic.php?t=2544

torkinp
Posts: 4
Joined: Tue Jan 17, 2017 9:57 am

Re: Flashing micropython on Wemos D1 Mini Pro

Post by torkinp » Tue Jan 17, 2017 10:52 am

Hi,

Like many people on this forum, I'd like to see micropython running on on a 16MB Wemos D1 Mini Pro. Having problems though. I can erase the flash with esptool using:

esptool.py -p /dev/ttyUSB0 erase_flash

and can get a working 4MB (32m) on the Mini Pro install using:

esptool.py -p /dev/ttyUSB0 --baud 460800 write_flash -fm dio -fs 32m 0 esp8266-20170108-v1.8.7.bin --verify

But, as mentioned above, this only results in a installation recognizing only 4MB, rather than the full 16MB.

Is my understanding correct that until esptool has been updated to support --flash_size=128m (or with "detect" identifying the board as having 128m), then there is no other solution?

Cheers,
Pete

User avatar
Roberthh
Posts: 1574
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing micropython on Wemos D1 Mini Pro

Post by Roberthh » Wed Jan 18, 2017 6:19 am

For what I've found, esptool is not the problem. It's Python code, and can easily be extended to support 16MByte flash size. I did that for trial. The problem is the espressif library code, which is part of the firmware, and refuses to deal with the larger flash size & setting. Th esource it not available, at least to me. As a patch, it is possible to modify the MicroPython enabling read & write to the upper 12MByte. So one could think of creating a second flash disk there, or map existing one around the area at the top of the 4MByte space.

User avatar
SandMarq
Posts: 1
Joined: Fri Jul 22, 2016 11:35 am
Location: Montreal
Contact:

Re: Flashing micropython on Wemos D1 Mini Pro

Post by SandMarq » Mon Apr 24, 2017 1:38 pm

I just found out that they are testing a new version for esptool.py that support larger flash size for non sdk firmware :

https://github.com/espressif/esptool/is ... -292822717

The code can be found here :

https://github.com/espressif/esptool/tr ... largeflash

I was able to erase the flash memory on my wemos pro mini and flash a version of micropython with it using the autodetect option of the esptool.py but the firmware I compile didn't like it and I was getting garbage on the serial monitor and the build in led was flashing constantly.

User avatar
Roberthh
Posts: 1574
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Flashing micropython on Wemos D1 Mini Pro

Post by Roberthh » Mon Apr 24, 2017 7:33 pm

The change to esptool will not help you until the esp SDK has been changed. Did you use the changed SDK for the build?

User avatar
titimoby
Posts: 18
Joined: Thu Sep 29, 2016 6:54 am

Re: Flashing micropython on Wemos D1 Mini Pro

Post by titimoby » Wed May 03, 2017 6:52 am


Post Reply