cmbahadir / opcua-esp32

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

it not work in ESP32-WROVER? #27

Closed acer1204 closed 4 years ago

acer1204 commented 4 years ago

i download this project and compile it success and download it in ESP32-WROVER-B.

it show emac_esp32_init rest timeout and init_mac failed.

is this problem is ESP32-WROVER just have wi-fi without eth?

putty result

cmbahadir commented 4 years ago

Is there any ethernet module on the board, and do you want to use it?

If there is no physical ethernet configuration, the only choice is to use the WI-FI on ESP32, so you need to switch the config to use WiFi instead by changing the below line;

https://github.com/cmbahadir/opcua-esp32/blob/98c6ac288a431cfef1d5e374f283735d7d5076e2/components/ethernet/include/ethernet_connect.h#L19

to

#define CONFIG_EXAMPLE_CONNECT_WIFI 1

I will move these fields to sdkconfig in the future.

acer1204 commented 4 years ago

Is there any ethernet module on the board, and do you want to use it?

If there is no physical ethernet configuration, the only choice is to use the WI-FI on ESP32, so you need to switch the config to use WiFi instead by changing the below line;

https://github.com/cmbahadir/opcua-esp32/blob/98c6ac288a431cfef1d5e374f283735d7d5076e2/components/ethernet/include/ethernet_connect.h#L19

to

#define CONFIG_EXAMPLE_CONNECT_WIFI 1

I will move these fields to sdkconfig in the future.

just replace "CONFIG_EXAMPLE_CONNECT_ETHERNET 1" to "CONFIG_EXAMPLE_CONNECT_WIFI 1" and no other code needs to be changed in opcua-esp32 project?

cmbahadir commented 4 years ago

After setting your wi-fi SSID and Password from idf.py menuconfig, flash and run the idf.py monitor, the ip address after a succesful connection will appear on the log and you can connect from an OPC UA Client by using that IP address.

acer1204 commented 4 years ago

After setting your wi-fi SSID and Password from idf.py menuconfig, flash and run the idf.py monitor, the ip address after a succesful connection will appear on the log and you can connect from an OPC UA Client by using that IP address.

thank you very much! It work Now.

cmbahadir commented 4 years ago

Your welcome, that would be great if you leave a star to the project. :)