uNabto STM32 SDK
Description
This demo shows how to create a simple AppMyProduct application for a STM32 MCU using the STM32Cube embedded software libraries including FreeRTOS and the LwIP TCP/IP stack. The device can be controlled by the Heat Control Ionic starter app. Also check out the article about this demo on blog.nabto.com.
Directory contents
nabto-stm32-demo/
├── Inc/
│ ├── app_ethernet.h Header of Src/app_ethernet.c file
│ ├── demo_application.h Heat-pump demo header
│ ├── ethernetif.h Header of Src/ethernetif.c file
│ ├── fp_acl_flash.h Header of Src/fp_acld_flash.c
│ ├── FreeRTOSConfig.h FreeRTOS configuration
│ ├── lcd_log_conf.h LCD Log configuration
│ ├── lwipopts.h LwIP stack configuration
│ ├── main.h Header of Src/main.c file
│ ├── stm32f7xx_hal_conf.h HAL configuration
│ ├── stm32f7xx_it.h STM32 interrupt handlers header
│ ├── unabto_config.h uNabto configuration
│ ├── unabto_main.h Header of Src/unabto_main.c file
│ ├── unabto_platform.h Defines platform specific dependencies
│ └── unabto_platform_types.h Defines platform specific types needed by uNabto
│
├── Src/
│ ├── app_ethernet.c DHCP thread
│ ├── dns_adapter.c uNabto DNS adapter implementation
│ ├── ethernetif.c Interfacing LwIP to ETH driver
│ ├── fp_acl_flash.c Pairing config flash database
│ ├── log_adapter.c uNabto log adapter implementation
│ ├── main.c Main program
│ ├── network_adapter.c uNabto network adapter implementation
│ ├── random_adapter.c uNabto random adapter implementation
│ ├── stm32f7xx_hal_timebase_tim.c HAL time
│ ├── stm32f7xx_it.c STM32 interrupt handlers
│ ├── system_stm32f7xx.c STM32F7xx system clock configuration file
│ ├── time_adapter.c uNabto time adapter implementation
│ ├── unabto_application.c Heat-pump demo application
│ └── unabto_main.c uNabto main thread
│
├── STM32CubeF7/ Folder for STM32CubeF7
│ ├── Documentation
│ ├── Drivers
│ ├── [...]
│ └── README.md
│
├── SW4STM32/ System Workbench for STM32 (SW4STM32) project
└── unabto/ uNabto server
Hardware and Software environment
- This demo runs on STM32F746xx devices.
- The demo has been compiled with the System Workbench for STM32 (SW4STM32) (v1.13.1) and tested on a STM32746G‑DISCO board
How to use?
- Clone this repository with
git clone --recursive https://github.com/nabto/unabto-stm32-sdk.git
- Download the STM32CubeF7 (v1.6.0) package and place it in the
/STM32CubeF7
folder. - Import the project from
/SW4STM32/NABTO_STM32
into your System Workbench for STM32 (SW4STM32) workspace. - Insert your Device ID and the preshared key from portal.appmyproduct.com in
/Src/unabto_main.c
. - Build project and transfer the image to the device memory.
- Connect the device to the ethernet.
- Run the demo and connect from your Heat Control Ionic starter app. You should be able to turn the LCD display on and off using the Heatpump active switch and control the heat-pump parameters shown at the bottom of the display.
- If you want to reset the device config you can perform a factory reset by pressing the User button at startup until you see FACTORY RESET printed to the display.