Copyright ©

Mongoose OS Forum


TX,Rx using UART0 of ESP8266


I am usimg ESP8266 and transmitting using UART0. Is pin swapping that is required to use the UART0 (MTDO/MTCK ) already been done in source code (I assume it is)?
I can see the tx buffer size decrease after transmitting to it, but I am not able to receive anything on the second esp, where my receiver is connected. (I am using RF modules for the transmission and reception). Following is the code for the transmitter side:

static void transmission(void *arg)
const bool msg[]={true};

size_t write_av= mgos_uart_write_avail(UART_NO); //Returns space avilable for writing

LOG(LL_INFO, ("Space available for writing: %d", (int) write_av));

size_t val = mgos_uart_write(UART_NO, &msg, sizeof(msg));

LOG(LL_INFO, ("written data: %d", (int) val));

size_t value= mgos_uart_write_avail(UART_NO); //Returns space available for writing

LOG(LL_INFO, ("Space after: %d", (int) value));


Is there a way to know the values in the transmission buffer? I don not see any data on receiver side.
Any suggestions on this?

Sign In or Register to comment.