This week I continue the work on the TCPIP. There are a many features in the TCPIP microchip allpication library demo, which are unnecessary. I had to remove these unnecessary features. Since many of these features were linked with each others, therefore I need to delete them one by one and compile to test whether there are errors.
After removing those unnecessary features, I continue to work on the performance improvement task. There is a built-in TCP buffer used to store the network data in the library, which use the Ethernet ram to allocate. By changing on the buffer size of each socket, the speed of transferring will change too. However, the value cannot be simply set since there were limitation of the Ethernet RAM.
I used the formula: TCP_*_RAM for each socket= 48+(TX FIFO size)+(RX FIFO size) to calculate the suitable size. By testing it, I found that the higher the value, the greater the speed. However, the improvement will be less significant if the as the buffer value set higher. Besides, since every socket will need to consume certain amount of TCP RAM. Hence, unnecessary socket should be disabled to enhance the speed performance.
By following the principle above, I was able to use the iperf to do the testing. The errors I faced before was because the low RX receiving speed, and made it seem like there was disconnection. After I set the buffer size to highest value, the iperf produced proper results.
Next, I needed to make the HTTP server. There are example in the library but the coding was complicated to me. There were protocols that I need to follow and understand. I spend a long time in reading and comprehend the process. I used the inspect element function of the browser to check the transmission of request method. By referring on it, I was able to use telnet to send GET request to the PICDEM.net2 and return proper result to the browser. However, for others operation I still have many things need absolute understanding. Hopefully it can be done next week.