Download presentation
Presentation is loading. Please wait.
1
Class 3: Implementing Network Connectivity 2
Implementing Advanced IoT Enabled Designs with the Renesas Synergy Platform- a Hands on Course Class 3: Implementing Network Connectivity 2 7/27/2016 Warren Miller
2
This Week’s Agenda 7/25/16 IoT Designs Using High Level Constructs 7/26/16 Implementing Network Connectivity 1 7/27/16 Implementing Network Connectivity 2 7/28/16 Advanced GUI Designs 1 7/29/16 Advanced GUI Designs 2
3
Course Description The Renesas Synergy Platform provides an integrated approach to designing RTOS-based systems using MCUs. The Synergy Platform seamlessly integrates the Express Logic Thread-X based RTOS and Express Logic supporting elements such as GUIX, USBX, FILEX and NETX within the Integrated System Development Environment (ISDE). This course is an extension of my previous introductory course and will use a hands-on approach using a Low Cost Synergy Kit, the free to download Renesas e2 studio and Synergy Software Package (SSP) ISDE. This course extends the previous Embedded Design course, (which students are strongly encouraged to view as a pre-requisite), using the Renesas Synergy Platform and the popular ThreadX RTOS. Leveraging the background from the previous course these classes will focus on practical implementations. Several example designs will be used to explore the tools and techniques available for creating IoT applications including advanced GUIs, networking connectivity and debug consoles. Students can use the free design software or optionally follow along using a starter kit available from Digi-Key to see actual hardware in action.
4
Today’s Topics Implementing Enet Connections with ThreadX and NetX Duo
Telnet in Communications Framework Webserver DHCP
5
Communications Framework
Simple API based framework for communicating over Kit ports Supports USB, UART or Telnet Used as part of the Console Framework Easy to configure and swap implementations API Example- common structure /* Console Thread entry function */ void toggle_thread_entry(void) { while (1) g_sf_console.p_api->prompt(g_sf_console.p_ctrl, NULL, TX_WAIT_FOREVER); }
6
Communications Framework Use
Configuration Required Example APIs
7
Communications Framework APIs
API Functions Parameter Definitions Function Call Definition
8
Overview of the Webserver Design
A simple webserver is a common embedded design that illustrates how easy networking designs can be with SSP Webserver provides view of embedded design activity Demonstration design uses the SK-S7G2 kit
9
Demonstration Description
Initialize Web Server Initialize the webserver Create activity threads to generate data for web page reporting Create a callback function (my_get_notify) to respond to resource requests Client requests a resource Usually an html file or graphics file Data can be generated on the fly or read from a file system In this simple example graphics files are stored as an array of bytes and html code generated by the program Activity Threads CallBack for my_get_notify
10
Implementation Initialize Web Server
application.c creates the webserver: nx_system_initialize: Initialize NetX TCP/IP stack nx_packet_pool_create: Create packet pool nx_ip_create: Create IP instance nx_ip_fragment_enable: Enable fragmentation nx_arp_enable: Enable ARP nx_icmp_enable: Enable ‘ping’ nx_http_server_create: Create http server instance nx_http_server_start: Starts the server instance graphics.c holds the logo hex files htmlstrings.h holds the html string defines httpserver_query.c holds code to handle URL requests
11
Metrics Activity Threads
The simple webserver reports counter values from several activity threads Thread 0: Status flag to wake Thread 5, Sleep 10 Thread 1: Sends message to queue 0 Thread 2: Receive message from queue 0 Thread 3: Get semaphore, Sleep 2, Release Thread 4: Get semaphore, Sleep 2, Release Thread 5: Wait for event flag Thread 6: Get mutex, Sleep 2, Release Thread 7: Get mutex, Sleep 2, Release
12
Reporting CallBack for my_get_notify
httpserver_query.c serves up resource requests via my_get_notify Creates packet via packet_allocate() Write html into the packet via htmlwrite() Send packet via tcp_socket_send
13
Demonstration Set-up PC host Connect Ethernet Cable Ping
Enter server address Refresh web page See metrics change Compare metrics
14
Overview of the DHCP Design
Dynamic Host Configuration Protocol Distributes network configuration parameters Most commonly used for IP addresses Requests made to a DHCP server IPv4 and IPv6
15
Create DHCP application.c creates the webserver and DHCP service:
nx_system_initialize: Initialize NetX TCP/IP stack nx_packet_pool_create: Create packet pool nx_ip_create: Create IP instance nx_ip_fragment_enable: Enable fragmentation nx_arp_enable: Enable ARP nx_icmp_enable: Enable ‘ping’
16
Get and Report DHCP httpserver_query gets IPv6 address:
address_get: Gets address _ip_address: Holds address sprintf: Prints address to string htmlwrite: Writes html
17
Conclusion APIs and Frameworks Telnet Webserver DHCP
18
Course Resources Express Logic Web Site: www.rtos.com
Express Logic Articles and White papers Here Express Logic RTOS Book (Amazon) Here Renesas Synergy Platform Kits at Digi-Key Here Course Kit Resources Here Renesas Synergy Platform Here Renesas Synergy Gallery (
19
This Week’s Agenda 7/25/16 IoT Designs Using High Level Constructs 7/26/16 Implementing Network Connectivity 1 7/27/16 Implementing Network Connectivity 2 7/28/16 Advanced GUI Designs 1 7/29/16 Advanced GUI Designs 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.