Can anyone point me to a reference or provide help to get the uIP webclient demo to work? I examined the documentation for the uIP stack and examples and did not find something to explain the usage. I did see where there are 4 callback functions to be implemented. The issue I am having is getting the client to successfully initiate a GET. (I wish to integrate the client with server so that ultimately I can use an external browser to initiate a GET from the embedded client via the embedded web server.)
I am using FreeRTOS V5.2.0 CORTEX M3 IAR (IAR Workbench 5.4), and am using the webserver example with uIP_Task.c and emac.c. The server runs fine. I integrated the webclient code by making an init function that calls both the webclient init and the webserver init, and an appcall function that calls both the webclient appcall and the webserver appcall.
I have not found in the code where I can initiate a GET other than to call webclient_get function with host, port, and file parameters. When do this, I get a hardware fault at runtime. I isolated the fault to be a result of uip_buf being uninitialized (i.e. null).
I see that uip_appdata is filed in by senddata() in the web client, however there is no code that I could find that sets up uip_buf to point to it.
In addition to resolving the fault, at some point I imagine I will have to discriminate between received packets on port 80 for the server and another port (e.g. 84?) for the client, and call the appropriate processing.
I’m new to http clients and servers and uIP and FreeRTOS, so I feel I am missing something in the big picture.