Basic UDP Hello GPIO Example
UDP Client sends GPIO values to a remote server
- SDK directory:
- Zentri App Store:
API Features Demonstrated
- UDP Client/Server API
- Network Interface API
- Peripherals/GPIO API
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.
This is a basic UDP client application. The app:
- Connect as a UDP client to the remote UDP server
- 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
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