I have Boron device with Particle Ethernet FeatherWing. The feather has WIZ550 chip. In general the ethernet works well, the device assign an IP address from DHCP server and can establish tcp connection to a server. Everything what is publushed in Ethernet object works well.
I am going to implement ICMP protoco, so I have found out that Boron OS firmware contains third party library for WIZ5500 (wiznet driver) and allows to open a socket in ip raw mode. But I realized that any of the published function of wiznet driver doesn’t work. I am unable to set any values like set IP, subnet mask or even read some values like assigned IP or mac address. I am also unable to open socket of any type (tcp, udp, ipraw) Functions like getSn_IR, getSn_CR, getSn_IMR returns always the same values and seems that they doesn’t change when I try to set them.
I have also updated the library to the latest version found on github, but still the same problem. I have found some other libraries that use WIZ5500, but all of them use the same function that doesn’t work with my application.
It seems that Particle device is unable to talk to the WIZ5500 chip that is attached to Particle Ethernet FeatherWing.
How to “talk” to WIZ550 chip on the feather? Should I set something special before I am going to use the wiznet driver?
How are you building your firmware?
Have you tried building a monolithic (device OS plus application) binary?
With modular builds you may only access function stubs where in monolithic you should gain access to the actual implementations.
SOCKET socket = 0;
byte sr = getSn_SR(socket);
byte cr = getSn_CR(socket);
byte ir = getSn_IR(socket);
// ....
getSHAR(mac); // get source hardware address
getGAR(gw); // get gateway IP address
getSUBR(sm); // get subnet mask address
getSIPR(ip); // get local ip address
But to have a better control over how the wiz5500 driver’s function are executed and how they works I have just copied part of the driver’s code to my main application code. Results are always the same. I got the same values and they seems that doesn’t change anything with the WIZ5500 chip.
The Wiznet is controlled from Device OS (system-part1) and is not accessible to user firmware, as there is an abstraction barrier between the system and user parts.
In order to access the functions directly you need to use monolithic firmware. In monolithic, system and user parts are linked into one large binary, and there is no abstraction barrier so you have access to everything the system does.
In Particle Workbench, creating a debug build also makes a monolithic build, and is the easiest way to build one.