Project Description

1. Project Description

mbedtls-stack

img_20150802_211129269

 

The author implemented HTTPS client using STM32 Nucleo-F411RE board and W5100 Ethernet Shield. He wanted to use Nucleo-F103RB board but, mbedTLS and all sorts of codes applied to the implementation need about 50KB RAM. Because of this, he used STM32F411RE MCU mouting 128KB RAM and 512KB Flash Memory. As a result, he successfully implemented HTTPS client with SSL/TLS security.

 

 

2. Parts

The hardware is composed of:

  • Nucleo-F411RE
    • STM32F411RE microcontroller
    • SPI master to communicate with other chips
    • USART serial port with STLink USB connection for standard I/O
    • JTAG with STLink USB connection to flash program
  • Ethernet shield
    • Wiznet W5100 that implements the TCP/IP and UDP/IP stacks.
    • SPI connection to the board below.

The software that author uploaded on board is composed of:

  • Low-level drivers provided by libopencm3
  • W5100 SPI driver to expose the chip registers and memories.
  • Socket API: POSIX socket library developed by me on top of W5100 functionality.
  • USART minimal driver to write/read from serial port through the STLink USB connection on the Nucleo.
  • DNS: I developed a minimal implementation of getaddrinfo() to retrieve the IP address of a website from its name.
  • TLS: I used mbedTLS 2.2.0 for the Transport Layer Security 1.2
  • The certificate of the CA, that is embedded statically as a binary blob into the program (I used Chrome to download it beforehand).
  • The application is simply an HTTP GET request.

 

3. Steps and Source Code

Detailed guidance and source code can be found at the author’s website.
For more information, please refer to the following link.

https://balau82.wordpress.com/2016/02/04/https-client-on-stm32-nucleo-f411re/