If you are asking a question, please follow this template:
- My goal is: [Have both UART and WiFi communicate in real time]
- My actions are:
[
- Using the ESP8266 platform.
- Using UART port to receive DATA packet and response with ACK packet
- A timer mgos_set_timer() is used to process the UART packets
- When 2000 bytes is received, it formats HTTP packet and send to server using mg_connect_http()
]
- The result I see is:
[
- Case #1 : when mg_connect_http() is not called (not sending to server), the response of the ACK packet is <100ms
- Case #2 : when mg_connect_http() is called, the response of the ACK packet is >500ms
]
- My expectation & question is:
[
Seems like the mg_connect_http() is blocking all others events during HTTP connection and sending data.
I would like UART port be highest priority.
Is there a way to lower the priority of the mg_connect_http() or adjust priority of both Timer and UART ??
]