WIZnet Developer Forum

ioLibrary documentation

Hi all,

My apology if this topic has been discussed or brought up somewhere but I couldn’t seem to find it or a proper working link to their documentation. I am currently using the V3.1.1 from https://github.com/Wiznet/ioLibrary_Driver, and I couldn’t seem to find a working or updated documentation for this. Could someone point me to the right site? Thank you.

I’ve been using it for the past week and I’ve found it has pretty awful documentation. The best I’ve found is in the header files, which describe what the functions do and what errors they throw.

It’s a shame there’s only one example (loopback), because I’ve spent a long time in trial and error trying to get the library to do what I want it to do. If there were even just a bunch of client/server examples, that would help…

What is it that you want to do?

Hi Seands,

Yeah, I can’t agree more, even link to their previous version help .chm doesn’t work. sigh. If not for strong recommendation, I was wondering if I should look for an alternative chip. I am guessing they take awhile to translate their korean doc to english?

I got what I needed going, i.e. DHCP and TCP client. But I am rather new to TCP/IP chip, so I was trying to understand their error code and code structure to better design my application flow. At the same time, checking whether there’s API to do the following:

  1. “auto-scan” for a TCP server IP address. If there’s such function is not recommended or not available, I will just fix my server IP.
  2. Set the RCR and RTC to adjust the default timeout and retry count. The blocking wait is a little too long for my application.
  3. See if there’s any way to make the send function non-blocking.

If not for strong recommendation, I was wondering if I should look for an alternative chip. I am guessing they take awhile to translate their korean doc to english?

No opinion there - the W5500 is the first chip I’ve used, and I chose it because it was the updated version of the W5100 used in the Arduino ethernet shield - I figured if I couldn’t program it myself I could at least use their library. When I was researching how to provide internet capability to my microcontroller, it was suggested I use a microcontroller with a built-in physical layer, as the use of separate internet offload chips is “last century”.

I got what I needed going, i.e. DHCP and TCP client. But I am rather new to TCP/IP chip, so I was trying to understand their error code and code structure to better design my application flow.

That’s exactly what I made too! I am going to publish my code on GitHub once it’s finished, and write a blog about it, because the documentation is so rubbish.

At the same time, checking whether there’s API to do the following:

  1. “auto-scan” for a TCP server IP address. If there’s such function is not recommended or not available, I will just fix my server IP.
  2. Set the RCR and RTC to adjust the default timeout and retry count. The blocking wait is a little too long for my application.
  3. See if there’s any way to make the send function non-blocking.

For 1, have you considered using DNS to look up a host?

Afraid I can’t help with 2, but for 3 I believe the ioLibrary socket function has a flag parameter where you can set non-blocking operation for send/receive, but I haven’t tried to get it to work. Again, no examples.

I wouldn’t say it’s “last century”. I would just say it depends on your embedded application. In my case, my system MCU is critical and I don’t want an embedded ethernet with the TCP/IP middleware to affect it in any way. Hence, I have decided to use an offload ethernet chip. Furthermore, this chip is “hardwired” isn’t it? This makes it “unhackable”? Read it from their post. Post here

Very nice. Let me know when it’s published. I would definitely like to learn your implementation. :slight_smile:

It didn’t really cross my mind. I will look into that.

No problem. Thanks for your input though.

I hadn’t considered that - good point. In my case it’s not safety critical, nor does my code do any receiving of data from the outside world beyond what the TCP/IP chip needs - it’s just blindly sends sensor readings out, so I guess I could have gotten away with a SoC solution, but I also wanted the safety net of the Arduino library for my first project!

I’ll open up my GitHub project to the public (was going to do it anyway once I documented it), in case it helps. The code is here. The main code is in sensor.c. For DHCP, the main loop constantly calls DHCP_run() and handles the response code is returns. The send_data(...) function in there handles interaction with ioLibrary. For sending data, it simply creates the socket, connects to the server and sends it data. I originally put in a close(...) call after that, but it turns out that’s only for errors as far as I can tell (it sends the RST TCP flag to the server). From sniffing packets, it seems like the code works as intended, and at least my Python web server (using the Bottle library) can understand and handle the HTTP POST requests I send it.

while using the network_init(); function the mac, ip, subnet, gw, dns do not get set while using this library.

`void network_init(void)
{
uint8_t tmpstr[6];
ctlnetwork(CN_SET_NETINFO, (void*)&gWIZNETINFO);
ctlnetwork(CN_GET_NETINFO, (void*)&gWIZNETINFO);

// Display Network Information
ctlwizchip(CW_GET_ID,(void*)tmpstr);
printf("\r\n=== %s NET CONF ===\r\n",(char*)tmpstr);
printf(“MAC: %02X:%02X:%02X:%02X:%02X:%02X\r\n”,gWIZNETINFO.mac[0],gWIZNETINFO.mac[1],gWIZNETINFO.mac[2],
gWIZNETINFO.mac[3],gWIZNETINFO.mac[4],gWIZNETINFO.mac[5]);
printf(“SIP: %d.%d.%d.%d\r\n”, gWIZNETINFO.ip[0],gWIZNETINFO.ip[1],gWIZNETINFO.ip[2],gWIZNETINFO.ip[3]);
printf(“GAR: %d.%d.%d.%d\r\n”, gWIZNETINFO.gw[0],gWIZNETINFO.gw[1],gWIZNETINFO.gw[2],gWIZNETINFO.gw[3]);
printf(“SUB: %d.%d.%d.%d\r\n”, gWIZNETINFO.sn[0],gWIZNETINFO.sn[1],gWIZNETINFO.sn[2],gWIZNETINFO.sn[3]);
printf(“DNS: %d.%d.%d.%d\r\n”, gWIZNETINFO.dns[0],gWIZNETINFO.dns[1],gWIZNETINFO.dns[2],gWIZNETINFO.dns[3]);
printf("======================\r\n");

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.