Page 3 of 4

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 5:57 pm
by Roberthh
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.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 7:17 pm
by blckpstv
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?

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 7:20 pm
by mcauser
uos.uname is a function. Call it like this:

Code: Select all

>>> uos.uname()

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 7:21 pm
by blckpstv
A following question, a little bit of topic though.

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

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Jan 16, 2017 8:26 pm
by mcauser
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

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Tue Jan 17, 2017 10:52 am
by torkinp
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

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Wed Jan 18, 2017 6:19 am
by Roberthh
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.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Apr 24, 2017 1:38 pm
by SandMarq
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.

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Mon Apr 24, 2017 7:33 pm
by Roberthh
The change to esptool will not help you until the esp SDK has been changed. Did you use the changed SDK for the build?

Re: Flashing micropython on Wemos D1 Mini Pro

Posted: Wed May 03, 2017 6:52 am
by titimoby