D1 Mini how to get debug from computer?

  • Hi, I'm new to not only D1 min but also whole ESP8266 thing so I'm sorry if I lack the knowledge of terminology.

    I want to flash a custom firmware for esp12e, is it possible? I mean I know it's possible because I tried and it worked, but what I really want to know is if it may cause problems in the long term. I can also flash the build version for esp01, which is to me strange.

    My real problem is how can i get debug info from my computer? From serial COM port? How do I write to it, Serial1.write or Serial.write?

    The firmware I'm trying to modify has some debug functions but I couldn't really understood where it writes. (it uses Serial1.write)

    I used Putty but there is only just an empty screen, I know it's the right com port because when I press reset button some gibberish characters show up. (I don't think something wrong with that I guess it's pretty usual)

    Thanks in advance, I hope this product will be the one which ends my nightmare with my project.

  • It's really hard to say anything without knowing what is the software that you are using. Is that Arduino? Nodemcu? MicroPython? Something else?

  • It's something else. I inspected the code a bit more and saw that it uses Serial1.write(). I found something about Serial1 being TX only and uses GPIO02, though I couldn't figure out which port that name corresponds to on the board D1 mini.

    I also couldn't figure out the model number of the module on D1 mini. Is it ESP01? ESP07? ESP12? My guess is ESP12 but I wanna be sure.

  • @dodiyez

    The table on the WeMos Product Page shows how the NodeMCU/WeMos pins (D1, D2, etc.) map to the Arduino GPIO pins (GPIO5, GPIO4, etc.)

    They're the same for both the D1 Mini and the D1 Mini Pro.

  • @Roo-ster

    Thank you for the tip, I didn't notice it was written in that page. Do you know anything about the module on D1 Mini being the same as ESP12?

  • @dodiyez said in D1 Mini how to get debug from computer?:

    It's something else.

    Well, what is it then? Do you expect us to guess? How can we help you if you don't tell us?

  • Hello @dodiyez ,

    the modul used on D1 mini is a ESP12F.
    I suppose you use Arduino IDE, as you are talking about Serial1.write and Serial.write.

    The ESP8266 has two UARTs. One can be remapped from the standard GPIO1/GPIO3 to GPIO13/GPIO15. If you like to see some debug output, you can use the transmit-only UART1, which is mapped to GPIO2. According to this information you can access it with Serial1.write.
    I haven't tried it, but would be very much interested in your feedback.
    best regards
    7th Dwarf

  • @deshipu Sir, please calm down. I didn't give that information because I didn't think it was related to my question since I only asked about Serial1.

    To tell the truth there is another reason why I didn't write. I didn't want library/framework specific answer but rather a general answer about debugging as I plan to develop my own software using this board.

    The library/framework/software (whatever it is) I was trying to make it work was mavesp8266. But it didn't work so I gave up.

  • @Seventh-Dwarf will get back to you after I try, thank you very much

  • @dodiyez I am perfectly calm, I'm just trying to point out to you that in order for us to give you meaningful and specific answers we need to have some minimum information about what you are doing.

    The library/framework-independent answer is "use the UART to output debugging text". But that is not very helpful, as it doesn't really tell you how to do it -- and that is dependent on the library/framework.

Log in to reply

Looks like your connection to WEMOS Forum was lost, please wait while we try to reconnect.