Basic UDP Hello GPIO Example
UDP Client sends GPIO values to a remote server
- SDK directory:
apps/basic/udp_hello_gpio
- Zentri App Store:
ZENTRI-BAUDPGPIO
API Features Demonstrated
Platforms
This app works on:
- AMW004 - Zentri Mackerel evaluation board
- AMW106 - Zentri Moray evaluation board
- NXP-SCCK - NXP Secure Cloud Connectivity Kit
Requirements and Prerequisites
This app requires a ZentriOS device.
Description
This is a basic UDP client application. The app:
- Connect as a UDP client to the remote UDP server
test.zentri.com
- Reads the current state of all GPIOs
- Writes the GPIO values into a buffer
- Sends the buffer to the remote server in a UDP packet
Usage Instructions
Open a ZentriOS serial terminal to the device. See Getting Started, Opening a ZentriOS Terminal.
This app assumes your ZentriOS device is set up with the credentials to join your local network. If you have not already set up network credentials, on the ZentriOS terminal, run the commands:
network_up -s
save
See the Wi-Fi Command API documentation for network_up and save.
After building, downloading and running the app, it joins the network and connects to the test server.
Output on the ZentriOS terminal is as follows:
> Connecting to remote UDP server test.zentri.com:50007
Sending data
Finished
Source
See: