unable to communicate with doit esp-12n developemebt board

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: 1959
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: unable to communicate with doit esp-12n developemebt board

Post by Roberthh » Mon Feb 17, 2020 6:41 am

The bootup message is sent at 76800 Baud. That's why you see garbled code. Picocom cannot be set to that baud rate, but Putty on Windows can do so. So we know know, that:
- the ESP12 can send and the PC can receive
- the ESP12 never leaves the bootloader, and MicroPython is not executed.

It would be interesting, what the bootloader message looks like. You should also crosscheck, if you uploaded the proper imgae with the proper command. Esptool.py has a setting for flash mode. There are four options. Maybe the default not right. You should try all four variants. so the four variants would be:

python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=dio 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=qio 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=qout 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=dout 0 <binary_image_file>

If you use the ESP8266 Makefile to flash the device, you can specify the FLASH_MODE as told in the esp8266 README.md.

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Mon Feb 17, 2020 11:09 am

Roberthh wrote:
Mon Feb 17, 2020 6:41 am
The bootup message is sent at 76800 Baud. That's why you see garbled code. Picocom cannot be set to that baud rate, but Putty on Windows can do so. So we know know, that:
- the ESP12 can send and the PC can receive
- the ESP12 never leaves the bootloader, and MicroPython is not executed.

It would be interesting, what the bootloader message looks like. You should also crosscheck, if you uploaded the proper imgae with the proper command. Esptool.py has a setting for flash mode. There are four options. Maybe the default not right. You should try all four variants. so the four variants would be:

python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=dio 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=qio 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=qout 0 <binary_image_file>
or
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=dout 0 <binary_image_file>

If you use the ESP8266 Makefile to flash the device, you can specify the FLASH_MODE as told in the esp8266 README.md.
I'll surely try sir thank you sir

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Mon Feb 17, 2020 5:55 pm

thank you for helping sir i used this command
python3 esptool.py --port /dev/ttyUSB0 --baud 230400 write_flash --verify --flash_size=4MB --flash_mode=dio 0 <binary_image_file>
and my problem was solved

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Mon Feb 17, 2020 6:57 pm

A new problem has arise my connection is not stable the terminal closes on its own every few sec

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

Re: unable to communicate with doit esp-12n developemebt board

Post by Roberthh » Mon Feb 17, 2020 7:50 pm

Is there any message when this happens? Like "FATAL: read zero bytes from port"
What you could try:
- use another USB cable. Surprisingly often they cause problems.
- check for other active services like a modemmanager. Try shell commands like:
systemctl | grep -i modem
to find it. if it is there, use:
systemctl disable ModemManager.service
or use apt to uninstall it.

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Tue Feb 18, 2020 12:52 pm

thank you sir the commands you asked to use are a little to advanced for me i'll learn the commands and then apply them

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Tue Feb 18, 2020 1:48 pm

FATAL: term closed
This is the error i get sir

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

Re: unable to communicate with doit esp-12n developemebt board

Post by Roberthh » Tue Feb 18, 2020 2:18 pm

Two questions:

- did you try to use a different USB cable?
- Is the device directly connected to the PC or via a USB hub? If by a hub, try the direct connection.

jay2026
Posts: 20
Joined: Sat Feb 15, 2020 6:10 pm

Re: unable to communicate with doit esp-12n developemebt board

Post by jay2026 » Tue Feb 18, 2020 3:57 pm

yes sir the problem is solved
the reason was the cable

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

Re: unable to communicate with doit esp-12n developemebt board

Post by Roberthh » Tue Feb 18, 2020 3:59 pm

You can set the pin value with either:

pin.value(1) resp. pin.value(0)

or shorthand:

pin(1) or pin(0)

For any question on usage, please refer the documentation: http://docs.micropython.org/en/latest/
There are quick examples for each module type, e.g. ESP8266 and Pin:
http://docs.micropython.org/en/latest/e ... s-and-gpio

Post Reply