I use the W5500 with mbed os. Unfortunately, I need a configuration and I have no idea how to set it. I just get the error message:
Ethernet/wizchip_conf.h: No such file or directory
There are also some examples, but they look a bit extensive for just configuration.
I just want to use the W5500 with mbed os. I need a posix socket API in order to use another library. Is there any other good libraries which fulfills the same purpose?
The projects references Ethernet - BSD style socket API for W5500. | Mbed as a ‘Dependent’, in which there is also the file you seem need, along with socket functionality.
Okay. So how can I use it in platformio?
Declaring lib_deps = W5500
in the platformio.ini
and copying the 4 files from the example code (zip) into the src/
folder should get it running. What’s your current platformio.ini
and code?
The same as in the other thread.
By copying the afformentioned Ethernet
example in the src/
folder of the project and adding it as an include path in the build_flags
(-I src
), and renaming close()
to wiznet_socket_close()
(because of a conflict with existing functions in the mbed-os stack), this compiles.
However, looking at the project at whole, that seems like the wrong way to integrate it. This library is extremely old and doesn’t integrate into mbed-os’ unified Ethernet stack interface.
Therefore you should use the latest GitHub - WIZnet-MbedEthernet/wiznet-eth-driver: arm Mbed-OS5 Ethernet Driver for WIZnet chipsets (W7xxx, W5/6xxx) - Need easyconnect lib as well driver as presented on WIZNet’s main page (WIZnet | Mbed).
Also you’re using https://github.com/oopsmonk/iota.c.git#pio_esp32
and not the right https://github.com/oopsmonk/iota.c.git#pio_mbed
so that won’t properly work.
I opened pull request Integrate W5500 driver, correct mbedtls usage by maxgerhardt · Pull Request #1 · Citrullin/iota_ethernet_platformio · GitHub with a compilable example that uses the correct driver, along with other fixes.