This week I integrate my previous TLS TCP Server code onto ‘the board’ – PIC32MZ.
DHCP enabled & Fixed IP adress test
First I experiment with having DHCP enabled on MHC. Using ‘tcpip_discoverer’ from Harmony to fetch the assign IP address.
java -jar tcpip_discoverer.jar
The discoverer tool is very useful to fetch the IP address. Next is to disabled DHCP, to have a fixed IP address test. Both test passes.
*Harmony > tcpip examples project was used
Reusing the certificate that I previously created, inserting it onto my project. Running similar test that I am familiar and successfully ping ‘the board’ with curl ‘-cacert’
Running the Wt code that I previously created that uses JQuery Ajax method and applying CORS protocol. To ping ‘the board’, all test pass and it works like magic~
Trying to transfer huge data/file to PIC32
With all the above test pass. Next is to use JQuery to transfer a huge file/data to PIC32. But because I don’t really understand how this particular huge data transfer mechanism works, I first experiment with curl.
curl -i -x PUT -data--binary @some.txt http://IPaddress
Unfortunately PIC32 reads nothing, curl responds with ‘expect 100-continue’ and gives a ‘Content-Type: multipart/form-data; boundary=<some random ascii>’, using ‘Wireshark’ to confirm the TCP data, found out there is a boundary being send. Having PIC32 send a ‘HTTP/1.1 100 Continue’, nothing happen. After some digging/research I realize there is a lot of things I don’t quite understand, however I know the problem lies in the TCP server I set up, for it is incapable of filtering the multiform-data that was send from CLIENT side (curl or ajax).