cmbahadir / opcua-esp32

Embedded OPC UA Server on ESP32 based on open62541 stack
Mozilla Public License 2.0
113 stars 40 forks source link

Does not work on non-ethernet dev boards #52

Open aminhusni opened 1 year ago

aminhusni commented 1 year ago

It seems that when flashed to a standalone dev board such as the ESP32-WROOM Devkit v1, it will not work. Clues in the errors suggest that it has to do with the board not having an ethernet component.

I'm trying to fix this myself by removing any dependency or requirement on using the ethernet component and only relying on wifi but I can't seem to get anywhere.

I (379) app_start: Starting scheduler on CPU0
I (383) app_start: Starting scheduler on CPU1
I (383) main_task: Started on CPU0
I (393) main_task: Calling app_main()
E (1153) esp.emac: emac_esp32_init(369): reset timeout
E (1153) esp_eth: esp_eth_driver_install(228): init mac failed
ESP_ERROR_CHECK failed: esp_err_t 0x107 (ESP_ERR_TIMEOUT) at 0x400d7da5
0x400d7da5: start at L:/Downloads/esp-idf-master/esp-idf-master/examples/opcua-esp32/components/ethernet/ethernet_connect.c:111 (discriminator 1)

file: "./components/ethernet/ethernet_connect.c" line 111
func: start
expression: esp_eth_driver_install(&config, &eth_handle)

abort() was called at PC 0x400866bf on core 0
0x400866bf: _esp_error_check_failed at C:/Espressif/frameworks/esp-idf-v5.1/components/esp_system/esp_err.c:50

Backtrace: 0x40081986:0x3ffb6bb0 0x400866c9:0x3ffb6bd0 0x4008c0c6:0x3ffb6bf0 0x400866bf:0x3ffb6c60 0x400d7da5:0x3ffb6c90 0x400d7e00:0x3ffb6d20 0x400d780a:0x3ffb6d50 0x400d7bd5:0x3ffb6d70 0x4014249f:0x3ffb6d90 0x40089105:0x3ffb6dc0
0x40081986: panic_abort at C:/Espressif/frameworks/esp-idf-v5.1/components/esp_system/panic.c:452

0x400866c9: esp_system_abort at C:/Espressif/frameworks/esp-idf-v5.1/components/esp_system/port/esp_system_chip.c:84

0x4008c0c6: abort at C:/Espressif/frameworks/esp-idf-v5.1/components/newlib/abort.c:38

0x400866bf: _esp_error_check_failed at C:/Espressif/frameworks/esp-idf-v5.1/components/esp_system/esp_err.c:50

0x400d7da5: start at L:/Downloads/esp-idf-master/esp-idf-master/examples/opcua-esp32/components/ethernet/ethernet_connect.c:111 (discriminator 1)

0x400d7e00: example_connect at L:/Downloads/esp-idf-master/esp-idf-master/examples/opcua-esp32/components/ethernet/ethernet_connect.c:47

0x400d780a: connection_scan at L:/Downloads/esp-idf-master/esp-idf-master/examples/opcua-esp32/main/opcua_esp32.c:189 (discriminator 2)

0x400d7bd5: app_main at L:/Downloads/esp-idf-master/esp-idf-master/examples/opcua-esp32/main/opcua_esp32.c:209 (discriminator 2)

0x4014249f: main_task at C:/Espressif/frameworks/esp-idf-v5.1/components/freertos/app_startup.c:208 (discriminator 13)

0x40089105: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.1/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162
cmbahadir commented 11 months ago

Can you provide the sdkconfig file generated while building?