WIZnet-MbedEthernet/WIZnetInterface

Garbage when send (probably when receive too) with data packet > 2048

Opened this issue · 0 comments

There is a bug in wiznetinterface.cpp. Change code in WIZnetInterface::socket_send line 574 (Tested in nucleo l476RG)
ret = _wiznet.send(SKT(handle)->fd, (char*)((uint32_t )data+writtenLen) , (int)_size);
with
ret = _wiznet.send(SKT(handle)->fd, (char
)((uint32_t *)data)+writtenLen, (int)_size);

and probably too in WIZnetInterface::socket_recv line 687 (this is not tested)
retsize = _wiznet.recv(SKT(handle)->fd, (char*)((uint32_t )data + recved_size), (int)_size);
with
retsize = _wiznet.recv(SKT(handle)->fd, (char
)((uint32_t *)data) + recved_size, (int)_size);
Best regards