This week my job scope was about the TCPIP. I need to use the PICDEM.net 2 as a TCP echo server that listen on a TCP/IP socket and transmits back exactly everything that it receives. There are some demos in the microchip application library, what I have to do was to study them and create a simple echo server.
This task was difficult since it require a lot of understanding on networking and strong mastering on C programming. The coding was confusing and complicated; I spent a long time on reading and to search related documentation. At first I cannot even analyze the general structure, but by google up myself it was getting clearer. Even though there are some parts that I was still blur, but at least the overall process was understood.
By referring on the generic TCP function in microchip library, I was able to receive and echo the data back. This was verified by using the linux terminal telnet command. By typing strings into the terminal, the data will send to the microcontroller and server and return them. The return strings was displayed in the terminal.
To test the performance, I need to use the iperf. I set the PC as a client and connect to the server, but they were unable to be connected. I tried to search for the reason but eventually failed due to limited understanding. Hence, I tried another approach, which was use the performance test library. For the TX transmission, the result seems correct and the speed will be affected by the coding length and telnet.
However, the RX, receive transmission does not works. I tried to search information but eventually failed. Therefore I check the error by testing it stage by stage. Eventually I found that is the problem of socket port, by changing it the function started to works. But there are some errors still need to be solved to real performance testing, hope it can be done next week.
0 Comments