hello,
I’m trying to use W5500 with Mbed. have tried the examples from
and
The 2nd does not compile with W5500, event include path are wrong. After fixing, the init with MAC failed. The MAC is set and the a hardware reset is called. After fixing this, the IP is delivered by DHCP, but then init is called and a hardware reset is performed again.
It looks like this was never tested and is not maintained, the Issue button is also disabled for this repo.
I was able to fix this woes, but now the SPI communication is stopping after about 7-8 s. There are also a lot of polling loops that do not yield. Is there some better code for working with multitasking OS?
thanks, Johannes
Hello Teddy,
tanks for your fast reply and your support.
The recommended Wiznet Library contains the same problems, f.e. that init first sets the mac address and then calls reset. This deletes the mac and dhcp will fail:
In the meantime, I was able to fix a numer of problems by myself:
the easy_connect does a dhcp call when used init with mac, but then calls init and reset again, ip is lost
there is a WIZNET_ACCEPT_TIMEOUT, but why? In non blocking, it should never timeout. When it is running into timeout, in mbed5 it is hanging at an event in TCPSocket.
the socket callbacks are not thread safe, the callback can be set to 0 and then the system is running into hardfault
there are some functions deprecated, f.e. const char* get_ip_address(). The newer functions that make use of SocketAddress are not defined yet.
there is a Sock Status enumeration which interferes with a mbed definition, I have use a namespace to fix this.
I also don’t want to use easy_connect because it is deprecated with current Mbed mechanism to get default EthernetInterface. I’m checking how to integrate it to existing Mbed classes to use also Mbed dhcp and bring_up/down interface. The existing code works only when the ethernet is plugged in at system start.
I can publish this on github if you want to adopt or review my changes.
with WIZNET_ACCEPT_TIMEOUT=WIZNET_TIMEOUT_INFINITE is infinite waiting.
But I’ve checked the generic ioLibrary, maybe it is better to start from scratch with this library?
And instead of using polling, the interrupt and using Mbed Events sounds like a smarter solution?
I have checked also if I can use TCPsocket.set_blocking(false), but the blocking or timeout for reading is not used in the recv/send function.
your code is dangerous. if It is not connected, maybe Your program is stuck in an infinite loop and can do nothing.
If timeouts are frequent, it is recommended to increase the timeout time.
And I don’t understand this question.
I think the interrupt or Mbed Event method is more efficient.
TCPsocket.set_blocking(false) is not WIZNET Function.
now our send/recv Function is not used.
but I will check mbed-os internal Functions with WizInterface Function.
I’ll find a way to be compatible with MBED-OS internal functions and WIZInterface functions.
yes, you’re right. The code should handle events when the interface is coming up/down, f.e. when the network cable is pulled out and plugged in.
about ioLibrary: the mbed-os related code is a few years old, the ioLibrary is newer. So my question was if it is better to add mbed features to ioLibrary.
Hello wiznet Team. Another 3 month later? Many people running into the same big. Arguing about wiznet on Facebook. But I cant help them. I am stuck in the same support case. Can you tell us if this will be fixed? How many month longer do we have to wait? We just need support…