esp8266:uart wifi Unable to work together

Issue #472 resolved
maike maker created an issue

esp8266 TX connect pico RX,code only uart,pico can receive messages

add wifi ,pico unable to receive messages

Comments (8)

  1. John Maloney repo owner

    Sorry for the delay.

    I could not reproduce this problem on my NodeMCU ESP8266 board.

    To debug, try removing the "serial write" block from the receive loop. If that works, then it means that simply having the serial port open isn't the problem. If it fails, then it could be that there is an electrical issue. The 8266 serial TX pin is pin 4. If there is a low-resistance path from that pin to power or ground, then opening the serial port could be causing a power issue.

    If failures occur only when the "serial write" block is included in the loop, that could also be an electrical problem. On my board, pin 4 is connected to the user LED through a resistor. The LED blinks during serial write, but the WiFi continues to run. But I can imagine a similar circuit disrupting the power supply enough to disrupt WiFI reception or even cause a processor reset.

  2. maike maker reporter

    Thank you for your suggestion. I will provide feedback after testing according to your method.

  3. Turgut Guneysu

    Hi Everyone,

    Just to provide another point of view, I also tested the provided code on a WEMOS8266 and PICO-W.
    A few issues with the provided scripts:

    • It has no Serial Read and display; only WIFI Read and Serial Write
    • ESP8266 cannot read SERIAL. So, I don’t understand what the Serial write is used for ?
      Seems like it was meant to be a WIFI Send, to create a back and forth message loop to test.
    • The actual problem is with Serial Open: it needs to happen after WIFI Connection.

    >>> John: you may have to examine the Serial open after WIFI issue.

    Here is pair of scripts that demos back and forth message exchange using WIFI and SERIAL. Just load each to corresponding microcontroller and run:

    • ESP8266 can only write Serial; so it receives Radio WIFI messages and writes them to Serial
    • PICO-W does both; reads Serial and reads & writes Radio WIFI message

  4. John Maloney repo owner

    Thank you for testing, Turgut.

    I'm not seeing any issues with this on my Wemos D1 mini board. In my testing, it did not matter if the serial port was opened before or after connecting to WiFI.

    Here's my code on the Wemos:

    scriptImage1941660.png

    I also tried opening the serial port first:

    scriptImage2378579.png

    To test, I ran the following script on an ESP32:

    scriptImage1947458.png

    With the second scripting running on the ESP32, I see a constant stream of incoming wifi strings with different timestamps.

  5. Turgut Guneysu

    OK, I am puzzled! Now it works with Serial Open either before or after.

    Gremlins in my system again… Sorry!

  6. John Maloney repo owner

    No worries! There are so many variables, including the fact that WiFi connect is not totally reliable...

  7. John Maloney repo owner

    Since I cannot reproduce this issue I'm going to mark it as resolved. Feel free to mad additional comments here.

  8. Log in to comment