Метка: <span>espressif</span>

Simple Serial Monitor Script for Raspberry PI

Since we started prototyping with our ESP8266EX modules, we found that the simplest way to control/debug is using a Raspberry PI (IO Voltage compatible with ESP8266EX). Since the module outputs serial data (via ESP_DBG statement), you can monitor it using a simple python script (that logs the data too) #!/usr/bin/python2.7 …

Debugging ESP8266EX

One way of debugging what’s running on the ESP is using the UART console. But there is a trick — it might be locked at 74880 baudrate.

There’s a quick fix. Modify the user_main.c and add:

#include "driver/uart_register.h"

on top of it.

Also, in the main loop(user_init) change

void user_init(void){
os_printf("SDK version:%d.%d.%d\n" SDK_VERSION_MAJOR, SDK_VERSION_MINOR, SDK_VERSION_REVISION);

with:

void user_init(void){
uart_div_modify(0, 115200);
SET_PERI_REG_MASK(UART_CONF0(0), UART_RXFIFO_RST | UART_TXFIFO_RST);
CLEAR_PERI_REG_MASK(UART_CONF0(0), UART_RXFIFO_RST | UART_TXFIFO_RST);
os_printf("set baudrate to 115200\n\r");

Modify the 115200 with the value you want to use, but we suggest using some standard ones, like 38400, 57600 and 115200.