Funny charachters at reset



  • Hi all,
    I am using Lolin D1 mini pro along with NRF24L01 radio connected.
    I uploaded mysensors relay sketch and whenever the radio is connected, at reset time, I see funny charachters in serial consol preventing the device to come up.
    When I disconnect the radio +3v pin it starts then I have to re-connect the radio power to get it working otherwise it won't work and above problem happens!!!

    Do you guys have any idea why it's happening?

    For your info, the esp8266 library version 4.2.1 is used because as I read in a post, Mysensors won't work with version 4.2.2 and Lolin bored at the moment!



  • I always get a few funny characters when I re-initiate the serial monitor on my Arduino Nano's. But there it's not blocking anything.


  • Mod

    @sghazagh how did you connect the radio?
    An ESP8266 outputs some bootloader text at a nonstandard baud rate during startup (74880 iirr) which looks like nonsense characters in a terminal with a different baud rate; maybe that's what you're seeing.



  • @yveaux thanks for your reply,
    The radio connected as usual:

    1_1536888951062_2.png
    0_1536888951061_1.png
    0_1536889425869_3.png 0_1536889523085_4.png
    (All cables used with color coding for better understanding of connection pins)

    I also have changed the different baud rate...it's not that, because at 115200, with radio power disconnected, I can see all the MySensor messages, also when I reconnect the radio power, I can see that the radio can connect to controller and send.receive data!

    Only when radio connected at boot time, device does not boot and does not work properly!



  • All,
    I have changed the baud rate to "74880" as @yveaux mentioned and surprisingly I see this message which prevent the device to boot:

     ets Jan  8 2013,rst cause:2, boot mode:(7,7)
    
    waiting for host
    

    Do you know why it's going to this mode and how can I avoid that?


  • Mod

    @sghazagh gpio 0,2 and 15 are used to select boot mode on the esp8266. See https://zoetrope.io/tech-blog/esp8266-bootloader-modes-and-gpio-state-startup/ for details, especially this part:

    When choosing GPIO pins to use, it’s best to avoid GPIO 0, 2 and 15 unless absolutely necessary. If you do end up using them, you’ll need pullups / pulldowns to ensure the correct bootloader mode.

    Not sure why this becomes a problem in your setup though. The wiring instructions used for MySensors usually works.



  • @mfalkvidd

    I read this in forum:

    Ok, after debugging for a while: the problem is with the CSN pin on GPIO pin 15. Pin 15 is also used in the ESP8266 to define boot from SD card. Somehow, at least in my case, after a reset, the NRF chip sets the CSN pin to high (measured it with a multimeter), causing the ESP8266 to start the SD-card procedure, which fails of course. The solution for me is swapping the pins for inclusion with the CSN pin:

    So:
    CSN -> GPIO 5 -> D1
    Inclusion mode -> GPIO 15 -> D78

    One question though: I also seem to have SPI pins on the other side of the Devkit, why aren't those used?```

    That's the one you addressed in GIT.
    I tried to move the CE pin to something else but it seems that it's not working!

    // To use native I2C pins CE should be moved. Declare the new GPIO used here.
    // GPIO 3 is pin D9 (RX below D8)
    #define MY_RF24_CE_PIN D4
    

  • Mod

    @sghazagh did you add the #define before including MySensors.h? (common mistake is to add it after)

    I am not familiar with this particular board, but I think other esp8266-based boards use the other SPI for communicating with the flash memory.



  • @mfalkvidd Yes, I double checked and it is just before Mysensors.h line.
    I see the Mysensors message in console, however, the radio connection is failing....

    I see in another post , have mentioned that the Mysensors library 2.3.1 or 4.0.0 will be release to resolve the issue we have when compiling for "Lonin D1 Mini Pro" board. Do you know when that gonna happen?
    I afraid maybe the library is mismatching with older version of "Lolin D1 mini pro" which is "Wemos D1 mini pro".

    At the moment I see the name Wemos... in the list of devices in Arduino IDE as I am using esp8266 version 4.2.1.
    Version 4.2.2 of esp8266 is listing the devise as Lolin ... name. I thought maybe the library is not fully compatible with this device as if I use that library the compile won't be successful.
    Do you think that might cause the issue?



  • It seems that I could fix the issue by making the pin 15, LOW at boot time as it triggers the SD BOOT option in ESP8266:

    void setup() {
      pinMode(15, OUTPUT); 
      digitalWrite(15,LOW);
    }
    

 

361
Online

7.9k
Users

8.7k
Topics

93.6k
Posts