Embedded TCP/IP stack  3.9.0
FNET Shell mbedTLS Demo Quick Start

Requirements

Tools used during this quick start:

  • Supported IDE.
  • Terminal program (Tera Term Pro v4.63 http://ttssh2.sourceforge.jp).
  • WEB browser.
  • FNET project source code, coming with this document.

Step by step

Follow these steps to run the FNET Shell demo application:

  • Prepare your evaluation board according to your board User Manual.
  • Use USB or RS-232 male/female DB-9 serial cable to connect your PC (through COM port) to the evaluation board.
  • Connect the evaluation board to an Ethernet network.
  • Power the board up.
  • Invoke the terminal program on the PC to which the evaluation board is connected and configure it to:
    • Bits per second: 115200.
    • Data bits: 8.
    • Parity: none.
    • Stop bits: 1.
    • Flow control: None.

      fnet_serial_setup.jpg
      Serial port setup
  • Launch IDE.
  • Open the project:
    fnet\fnet_demos\boards\<board_name>\shell_mbedtls\<compiler_name>\
    
  • In the IDE, choose a project target you want to compile.
  • Compile, load (or flash) the application to the board and run the project.
  • In your terminal program window you should see the FNET application welcome message:
    Parameters loaded from Flash.
    
    Parameters loaded from Flash.
    
    ************************************************
     FNET Shell Application (mbedTLS)
    ************************************************
     FNET TCP/IP Stack for MK64FN1
     Version 3.8.0
     Built Jan  6 2017 at 12:19:47 by IAR
    ************************************************
     Interface        : eth0
     IPv4 Address     : 0.0.0.0 <manual>
     IPv6 Address     : fe80::211:22ff:fe33:4455 <autoconfigurable> ScopeID:1
     IPv4 Subnet mask : 255.0.0.0
     IPv4 Gateway     : 0.0.0.0
     IPv4 DNS         : 0.0.0.0
     MAC Address      : 00:11:22:33:44:55
     MTU              : 1500
     Link Status      : unconnected
     Free Heap        : 30272
     HTTP Server      : disabled
     HTTPS Server     : disabled
     DHCP Client      : disabled
     AUTOIP Service   : disabled
     TELNET Server    : disabled
     LLMNR Server     : disabled
     MDNS Server      : disabled
    
     Enter 'help' for command list.
    ************************************************
    
    SHELL>
    eth0: connected => Script: dhcp autoip; mdns; llmnr;
    ************************************************
     DHCPv4 Client started.
    ************************************************
    Press [Ctr+C] to cancel.
    DHCP: Discovering...
    
    ************************************************
     IPv4 parameters updated :
    ************************************************
     Interface        : eth0
     IPv4 Address     : 192.168.0.103 <dhcp>
     IPv6 Address     : fe80::211:22ff:fe33:4455 <autoconfigurable> ScopeID:1
     IPv4 Subnet mask : 255.255.255.0
     IPv4 Gateway     : 192.168.0.1
     IPv4 DNS         : 192.168.0.1
    ************************************************
     mDNS server started.
     Name             : fnet
    ************************************************
    ************************************************
     LLMNR server started.
     Host Name        : fnet
    ************************************************
    
  • This application has absolutely the same features and behavior as the Shell demo application. So before next steps, read about it in FNET Shell Demo Quick Start.
  • You can run the HTTPS Server on the board, by typing the command https into your terminal program window.
    In your terminal program window you should see:
    SHELL> https
    ************************************************
     HTTPS server started.
     IPv4 Address     : 192.168.0.103
     IPv6 Address     : fe80::211:22ff:fe33:4455
    ************************************************
    SHELL>
    
  • Then run your Web browser and navigate to the server address (the address you have assigned to the system or obtained from the DHCP server):
    https:// 192.168.0.103
    
    or
    https:// [fe80::211:22ff:fe33:4455]
    
  • Depending on the used Web browser, you may get a warning message about that there is a problem with the security certificate. It occurs because the demo HTTPS server uses the test security certificate which was not signed by a trusted certificate authority. But a real application should use a valid certificate acquire from one of trusted certificate authorities.
    So just ignore this warning and continue to the website.
  • You should see a Web page served by the FNET HTTPS server. The HTTPS server uses the same Web pages as the normal HTTP server but transfered over TLS protocol set.
Note
  • The application project includes mbedTLS library (https://tls.mbed.org/). Its source code is located in fnet/third_party/mbedtls-2.4.0/.
  • mbedTLS FNET application configuration parameter are in the fnet_mdedtls_user_config.h file.
  • The MBEDTLS_CONFIG_FILE definition is set to "fnet_mbedtls_user_config.h" in preprocessor project options.

© 2005-2017 by Andrey Butok. http://fnet.sourceforge.net