Menu

Crash when using Station Mode

Cameron
2024-08-09
2024-08-11
  • Cameron

    Cameron - 2024-08-09

    I'm setting up a new myFP2ESP32 for a PRO2ESP32TMC2209 board.

    This is using a fresh download of myfp2esp32-firmware-311-02.

    The following error occurs during compile:

    driver_board.cpp:375:51: error: expected primary-expression before '||' token
         } else if (_boardnum == PRO2ESP32TMC2209LGTM) || (_boardnum == PRO2ESP32TMC2209XIAOC3) {
    

    It looks like there's a couple extra brackets. The following resolves it:

    } else if (_boardnum == PRO2ESP32TMC2209LGTM || _boardnum == PRO2ESP32TMC2209XIAOC3) {
    

    However once compiled/flashed, the following occurs during runtime with repeated crashes:

    assert failed: tcpip_send_msg_wait_sem IDF/components/lwip/lwip/src/api/tcpip.c:455 (Invalid mbox)
    
    Backtrace:0x4008401d:0x3ffb24a00x4008c045:0x3ffb24c0 0x40091391:0x3ffb24e0 0x40115a79:0x3ffb2610 0x40125c95:0x3ffb2640 0x40125cf5:0x3ffb2660 0x4011523d:0x3ffb26b0 0x400f742e:0x3ffb26d0 0x400f74a8:0x3ffb2720 0x400fa889:0x3ffb2740 0x400de7c7:0x3ffb2760 0x400ee05e:0x3ffb27c0 0x401001f6:0x3ffb2820 
    
    ELF file SHA256: 0000000000000000
    
    Rebooting...
    ets Jul 29 2019 12:21:46
    
    rst:0xc (SW_CPU_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:0x3fff0030,len:1324
    ho 0 tail 12 room 4
    load:0x40078000,len:13508
    load:0x40080400,len:3604
    entry 0x400805f0
    

    Other than changing the board selection to PRO2ESP32TMC2209 and revising mySSID/myPASSWORD, no other configuration changes are made from the defaults.

    When operating in ACCESSPOINT mode, the system appears to boot properly and create a AP.

    I've tried this with two different ESP-WROOM-32 dev modules to rule out hardware, but the same error occurs.

    Any suggestions for what could be causing the error?

     
    • Eric Harant

      Eric Harant - 2024-08-09

      Hi Camero,

      How do you build the binaries and what is you ESP32

      You nead to use

      • Arduino IDE 1.8.19
      • in Boards Manager : ESP32 Espressif 2.0.16 or 2.0.17 (Not 3.x)
      • Select ESP32 Dev Module

      May be possible that some changes in myfp2esp32-firmware-311-02 are not
      correct ( I don't change anything since a long time)

      Best regards

      Eric H.

      Le 09/08/2024 à 15:47, Cameron a écrit :

      I'm setting up a new myFP2ESP32 for a PRO2ESP32TMC2209 board.

      This is using a fresh download of myfp2esp32-firmware-311-02.

      The following error occurs during compile:

      |driver_board.cpp:375:51: error: expected primary-expression before
      '||' token } else if (_boardnum == PRO2ESP32TMC2209LGTM) || (_boardnum
      == PRO2ESP32TMC2209XIAOC3) { |

      It looks like there's a couple extra brackets. The following resolves it:

      |} else if (_boardnum == PRO2ESP32TMC2209LGTM || _boardnum ==
      PRO2ESP32TMC2209XIAOC3) { |

      However once compiled/flashed, the following occurs during runtime
      with repeated crashes:

      |assertfailed:tcpip_send_msg_wait_semIDF/components/lwip/lwip/src/api/tcpip.c:455(Invalidmbox)
      Backtrace:0x4008401d:0x3ffb24a00x4008c045:0x3ffb24c00x40091391:0x3ffb24e00x40115a79:0x3ffb26100x40125c95:0x3ffb26400x40125cf5:0x3ffb26600x4011523d:0x3ffb26b00x400f742e:0x3ffb26d00x400f74a8:0x3ffb27200x400fa889:0x3ffb27400x400de7c7:0x3ffb27600x400ee05e:0x3ffb27c00x401001f6:0x3ffb2820ELFfileSHA256:0000000000000000
      Rebooting... etsJul29201912:21:46
      rst:0xc(SW_CPU_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,clockdiv:1 load:0x3fff0030,len:1324 ho0tail12room4
      load:0x40078000,len:13508 load:0x40080400,len:3604 entry0x400805f0 |

      Other than changing the board selection to PRO2ESP32TMC2209 and
      revising mySSID/myPASSWORD, no other configuration changes are made
      from the defaults.

      When operating in ACCESSPOINT mode, the system appears to boot
      properly and create a AP.

      I've tried this with two different ESP-WROOM-32 dev modules to rule
      out hardware, but the same error occurs.

      Any suggestions for what could be causing the error?


      Crash when using Station Mode
      https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/thread/0d7ac1c3b8/?limit=25#bf5e


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/myfocuserpro2-esp32/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
      www.avast.com

       
  • Eric Harant

    Eric Harant - 2024-08-10

    Hello Cameron.
    I just had a look at mi source code.
    Line 375 of
    should be (on one line)
    else if ((_boardnum == PRO2ESP32TMC2209LGTM) || (_boardnum == PRO2ESP32TMC2209XIAOC3)) {

    For compile option set Flash mode to QIO.

    Try a simple sketch like WifiScan.
    Erase Flash
    load Flash with your data.
    Then load MyFP2ESP32_311-02

    I'm doing that at the moment.

    Ok
    Everythings compiled and loaded . No Crash.
    Connected with MyFP2ESP32 3.0.0.5 Windows app.
    My Esp32 is connected in Wifi Station mode to my 2.4GHz Network

     
    • Cameron

      Cameron - 2024-08-10

      WifiScan functions properly with no issue.

      I revised Line 375 (and Line 353 in the same fashion)

      Enabled "Erase All Flash Before Sketch Upload" and tried MyFP2ESP32 again, but same result.

      Is there any kind of debug log that can be enabled to see how far it gets into the boot sequence before crashing?

       
  • brownrb

    brownrb - 2024-08-11

    1, You have to use Expressif ESP32 Core 2.0.16
    any higher and it will not work,
    2. Arduino IDE 1.8.19
    3. see attached for settings.

    However once compiled/flashed, the following occurs during runtime with repeated crashes:

    repeated crashed, in station mode, usually are caused by issues with logging into a wifi network.
    Possible causes
    1. forgot to upload the sketch data files are a reprogram
    2. Double check credentials.
    3. Create and enable wificonfig.h file
    4. Enable debugging - controller_defines.h, and enable #define BOOT_PRINT 1 then recompiler and upload (+ sketch files). Open serial monitor in IDE and set to speed 115200
    5. Press small reset button on esp32 chip.
    6. You can click in the serial monitor window. ctlr+a to select all, press cltr+c to copy, and open notepad then paste (ctlr+v)

    Regards
    Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.