This week just goes by so quickly, and it is a week where i do not have a senior intern to help out with my project. My this week challenge is to implement SSL with PIC18F. I’ll be using the TCPIP source code provided by Microchip Technology for my project. I start with preparing a project folder that is able to enable SSL stack. The process of doing this is pretty straight forward, first is to include BigInt.h, RSA.h, ARCFOUR.h, Random.h, SSL.h, ServerClient.h and their respective .c file to the project. And must include BigInt_helper.lib into the library file of own project (can be foun in ‘…\Microchip\TCPIP Stack\BigInt_helper.lib’).

I also learn how to edit the linker script of microchip, because there might be compilation erorr occur stating the memory of certain code could not fit into the RAM of PIC18. By following a link provided by Ryan previously (http://www.xargs.com/pic/c18large.html), from there it teaches how to edit a linker script. All linker script of PIC can be found in (microchip/xc8/v1.31/dat/lkr) but it also depends on the type of compiler used to compile the C source of own project. PIC18 only have 4kbytes of RAM therefore adding SSL stack (SSL is a really huge source code file with additional encryption components) into it, error like limited memory allocation will occur.

There is a file call MPFSImg2.c which was created using MPFS Utility, that could convert personal webpage (.html, .css, .js and etc) into hex form as C source. I did some editing to the webpage to reduce the feature/functions so that PIC18 could store my webpage into its internal memory. (a friendly reminder MPFS Utility is a executable jar file, therefore type ‘java -jar <.jar>’ to execute MPFS Utility)

Going back to the main project objective, after successfully enabling SSL stack into project file, the source code/example code of Microchip Technology can be tested. In theory, by typing https://IP_Address/ there should be something; but both Mozilla and Chrome also gave a security error stating ssl error unsupported version. In other words both Mozilla and Chrome does not support/allow any devices that uses SSLV3 type of encryption.

After discussing with Dr Shawn, SSL implementation will be put on hold for the time being and my next task will be to do a very simple TCP server connection with CORS protocol and later HOTP implementation. Before the week end, i manage to create a simple TCP server connection but there are still many things i need to adjust to make sure it works properly.

Some additional stuff:

This week the Boss also gave us a lecture about microchip compilation process. How the C code that we write will go through several process and finally burn into the flash of microchip or made into an executable file. And of course another week of humiliation by the Boss, for being too stupid to understand simple things, but I do enjoy the process of learning under him, the stress and pressure he gives is something i never experience before and recently it makes me wonder where stupid people should go. Looking forward to next week because it will be really fun with more coding and scolding.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.