SDK Examples
The Gecko OS SDK includes a growing list of examples demonstrating how to write applications that run on Gecko OS.
Example Apps are available through Gecko OS Studio (GSS) .
After you select a device in GSS, the available examples for the device platform are available through the Projects tab. Choose
Clone Example
.
You can also browse the following directory in the Gecko OS SDK on disk:
sdk-<platform>/<sdk_version>/applications/gecko_os
For example:
<user_dir>/gecko_os_sdk/sdk-wgm160p/4.0.17-1380/applications/gecko_os
.
The SDK is regularly updated, and new example Apps may appear with an update. Check for the latest SDK examples in GSS.
The following list outlines examples for the WGM160P platform.
Cloud
- coap_demo - Demonstration of CoAP (Constrained Application Protocol)
- mqtt_demo - Demo example showing how to use Gecko OS MQTT library to connect to different MQTT brokers, and subscribe to different queue and publish data
Demo
- uart_blaster - Demonstrates registering a custom command to blast data to the UART
DMS
- messages - Demonstrates how to send/receives messages from the DMS via secure websocket
- ota_update - Demonstrates how to update the device via OTA DFU
- telemetry - Demonstrates how to send device telemetry information to the DMS via secure websocket
File
- file_encrypt - Demonstrates how to read/write an encrypted file to the file system
- file_list - Demonstrates how to list files on the file system using paging
- log_file - Demonstrates how to read/write log files
- log_file_encrypted - Demonstrates how to read/write encrypted log files
Intro
- blinky - Simple app which blinks LEDs
- hello_world - The most basic app, simply prints 'Hello World' to the console
Network
- http_methods - Demonstrates how to use the HTTP client APIs
- http_server - Demonstrates how to use the HTTP server APIs
- softap_tcp_server - Demonstrates a echo TCP server on the SoftAP interface
- tcp_client - Demonstrates a TCP client connecting to a remote echo TCP server. Anything written to the client stream is echoed back
- tcp_echo_server - Demonstrates a TCP server that echoes back all data received from clients
- tcp_multiclient - Demonstrates how to forward data between the UART and multiple TCP server clients
- uart_tcp_client - Demonstrates a efficently streaming data between the UART and TCP server
- udp_client - Demonstrates a UDP client connecting to a remote echo UDP server. Anything written to the client stream is echoed back
- udp_hello_gpio - Demonstrates sampling a GPIO and forwarding the value to a remote server via UDP
- websocket_client - Demonstrates a websocket client connecting to a remote echo websocket server. Anything written to the client stream is echoed back
- websocket_server - Demonstrates running a websocket server with a webpage. A browser can open the webpage and send messages to the device's UART via websocket
Peripheral
- adc - Demonstrates the use of an ADC
- button - Demonstrates the gos_button_XXX APIs by printing to the console based on button presses
- gpio_irq - Demonstrates registering a GPIO IRQ handler and lighting LEDs
Security
- aes_ctr - Demonstrates how to encrypt/decrypt a buffer using AES128-CTR
System
- application_nvm - Demonstrates how to use the application NVM and settings APIs
- application_settings - Demonstrates how to load application settings
- custom_commands - Demonstrates how to register custom serial commands with Gecko OS. Also demonstrates have to save/load settings from NVM
- settings_file - Demonstrates how to save and load settings files.
- system_monitor - Demonstrates Gecko OS's system monitor feature
- uart - Demonstrates echoing data on the UART
Utility
- buffer_dump - Demonstrates how to print a HEX dump to the console using the gos_dump_buffer() API
- json_parser - Demonstrates how to use the JSON parsing APIs
- msgpack - Demonstrates how to use the msgpack utility
Wi-Fi
- device_setup - Demonstrates how to use the Web Setup webapp in both 'setup' and 'normal' modes
- web_setup - Demonstrates how to setup the device via web setup
- wifi_scan - Demonstrates scanning for available networks on the Wi-Fi interface