B4R Question ESP32 strange behaviour? [solved]

Discussion in 'B4R Questions' started by KMatle, Mar 15, 2019 at 4:15 PM.

  1. KMatle

    KMatle Expert Licensed User

    My new ESP32 dev. board with USB arrived today. It behaves strange:

    - to connect to it, I have to press the "Boot" button (the ESP8266 just connected without pressing anything)
    - only every 2nd start (power off -> power on OR EN-Key pressed) the app starts. Any ideas why that happens? Very strange.
     
  2. thetahsk

    thetahsk Member Licensed User

    What ESP Board did you bought ?
     
    Last edited: Mar 15, 2019 at 5:50 PM
  3. KMatle

    KMatle Expert Licensed User

    Espressif ESP32 WLAN Dev Kit Board Development Bluetooth Wifi v1 WROOM32 NodeMCU

    Seems to be a known issue with floating pins. Will buy another one from another company.
     
  4. thetahsk

    thetahsk Member Licensed User

    Do you have more information. Some Photos and link where you bought it.
     
  5. KMatle

    KMatle Expert Licensed User

  6. KMatle

    KMatle Expert Licensed User

    Forget about the "does not start at reboot". It starts but every 2nd time WiFi doesn't connect at the first try which caused my code to exit.

    Logs:

    Code:
    Hard resetting via RTS pin...
    ********************* Programm startet ****************
    ets Jun  
    8 2016 00:22:57
    rst:
    0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 
    0, SPIWP:0xee
    clk_drv:
    0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:
    1
    load:
    0x3fff0018,len:4
    load:
    0x3fff001c,len:1100
    load:
    0x40078000,len:10312
    load:
    0x40080400,len:6460
    entry 
    0x400806a4
    *** B4R AppStart ***
    Connecting 
    to WiFi...
    1
    Failed 
    to connect. -> First try
    Connecting 
    to WiFi... -> 2nd
    2
    Connected 
    to wireless network.
    My ip: 
    192.168.178.73
    So I did a loop (max. 10 retries to connect) which works fine now (2nd try will work).

    Code

    Code:
    Private Sub AppStart
        
        Serial1.Initialize(
    115200)
        
        
    Log("*** B4R AppStart ***")
        
        
    For i=1 To 10
            
    Log("Connecting to WiFi...")
            
    Log(i)
            
    If wifi.Connect2("SSID","PW"Then 'change to your network SSID (use Connect2 if a password is required).
                Log("Connected to wireless network.")
                
    Log("My ip: ", wifi.LocalIp)
                pin16.Initialize(
    16, pin16.MODE_OUTPUT)
                pin16.DigitalWrite(
    True)
                pin2.Initialize(
    2, pin16.MODE_OUTPUT)
                pin2.DigitalWrite(
    True)
                
    Exit 'leave the FOR loop
            Else
                
    Log("Failed to connect."'try again after
            End If
        
    Next
       
        
    server.Initialize(51042"server_NewConnection")
        
    server.Listen
        
        
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice