Advanced
30 min

Enable secure device-to-cloud communication and remote management with XPE200100 and ATmega328

Secure Ethernet gateway for robust device-to-cloud communication and remote management

XPort EDGE Click with Arduino UNO Rev3

Published Jun 23, 2025

Click board™

XPort EDGE Click

Dev. board

Arduino UNO Rev3

Compiler

NECTO Studio

MCU

ATmega328

Enhance your smart infrastructure and any embedded system requiring reliable device-to-cloud communication

A

A

Hardware Overview

How does it work?

XPort EDGE Click is based on the XPE200100S module from Lantronix, offering a next-generation wired Ethernet gateway and embedded device server in the same compact form factor as the original XPort series. This board is designed to enable secure, reliable, and manageable Ethernet connectivity for industrial and IoT applications by integrating the capabilities of the XPort EDGE platform along with the Percepxion™ cloud-based IoT edge solution. The integrated RJ45 jack includes magnetics and supports 10/100 Mbps Ethernet through an IEEE 802.3-compliant MAC and PHY with HP Auto-MDIX and auto-negotiation for full or half-duplex operation, all within a standard Ethernet connector. The module supports advanced network protocols including IPv4/IPv6, TCP/IP, UDP/IP, DHCP, BOOTP, ARP, ICMP, Auto-IP, DNS, SNMP v1/v2, Telnet, and HTTP, making it suitable for diverse networking scenarios. With built-in support for Lantronix’s customer-proven TruPort® Serial and TruPort® Socket technologies, the XPort EDGE Click ensures secure data

communication through transparent pass-through of serial protocols or multi-session TCP, UDP, and HTTP(S) connections. It supports a maximum serial data rate of 4 Mbps, configurable via software, and it is pre-integrated with the Percepxion™ software platform for remote management, real-time monitoring, and application integration, streamlining deployment in both cloud-connected and on-premise environments. A standout feature is the robust security framework powered by Lantronix’s Infinishield™ Security, which includes secure boot, secure firmware updates (FOTA), secure network attachment via EAPOL, role-based access control, data-at-rest protection for encryption keys and configurations, and fine-grained policy control over network services. These built-in protections minimize the need for additional integration effort while ensuring compliance with modern cybersecurity standards. With its industrial-grade reliability, advanced networking capabilities, and comprehensive device-level security, XPort EDGE Click delivers a complete Ethernet connectivity and

device management solution for modern embedded applications. Communication with the host device is achieved via UART interface and three configurable general-purpose I/O pins (CP1, CP2, and CP3), which can function as flow/modem control lines or general-purpose signals. In addition, the XPort includes 8MB of flash memory for storing firmware and web content, enabling full customization and remote management of connected devices. As mentioned, the module connects directly to an Ethernet network through the RJ45 port. Two bi-color LEDs integrated into the front of the connector provide real-time status indication. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. It also comes equipped with a library containing functions and example code that can be used as a reference for further development.

XPort EDGE Click hardware overview image

Features overview

Development board

Arduino UNO is a versatile microcontroller board built around the ATmega328P chip. It offers extensive connectivity options for various projects, featuring 14 digital input/output pins, six of which are PWM-capable, along with six analog inputs. Its core components include a 16MHz ceramic resonator, a USB connection, a power jack, an

ICSP header, and a reset button, providing everything necessary to power and program the board. The Uno is ready to go, whether connected to a computer via USB or powered by an AC-to-DC adapter or battery. As the first USB Arduino board, it serves as the benchmark for the Arduino platform, with "Uno" symbolizing its status as the

first in a series. This name choice, meaning "one" in Italian, commemorates the launch of Arduino Software (IDE) 1.0. Initially introduced alongside version 1.0 of the Arduino Software (IDE), the Uno has since become the foundational model for subsequent Arduino releases, embodying the platform's evolution.

Arduino UNO Rev3 double side image

Microcontroller Overview

MCU Card / MCU

default

Architecture

AVR

MCU Memory (KB)

32

Silicon Vendor

Microchip

Pin count

32

RAM (Bytes)

2048

You complete me!

Accessories

Click Shield for Arduino UNO has two proprietary mikroBUS™ sockets, allowing all the Click board™ devices to be interfaced with the Arduino UNO board without effort. The Arduino Uno, a microcontroller board based on the ATmega328P, provides an affordable and flexible way for users to try out new concepts and build prototypes with the ATmega328P microcontroller from various combinations of performance, power consumption, and features. The Arduino Uno has 14 digital input/output pins (of which six can be used as PWM outputs), six analog inputs, a 16 MHz ceramic resonator (CSTCE16M0V53-R0), a USB connection, a power jack, an ICSP header, and reset button. Most of the ATmega328P microcontroller pins are brought to the IO pins on the left and right edge of the board, which are then connected to two existing mikroBUS™ sockets. This Click Shield also has several switches that perform functions such as selecting the logic levels of analog signals on mikroBUS™ sockets and selecting logic voltage levels of the mikroBUS™ sockets themselves. Besides, the user is offered the possibility of using any Click board™ with the help of existing bidirectional level-shifting voltage translators, regardless of whether the Click board™ operates at a 3.3V or 5V logic voltage level. Once you connect the Arduino UNO board with our Click Shield for Arduino UNO, you can access hundreds of Click boards™, working with 3.3V or 5V logic voltage levels.

Click Shield for Arduino UNO accessories 1 image

RJ45 UTP (Unshielded Twisted Pair) cable is a widely used networking cable designed for Ethernet connections in both residential and commercial environments. It features an RJ45 connector at each end, allowing it to interface with routers, switches, computers, and other network devices. The UTP cable consists of four twisted pairs of copper wires, which help reduce electromagnetic interference without the need for additional shielding. These cables are categorized by performance levels, such as Cat5e, Cat6, and Cat6a, each supporting different speeds and bandwidths. Commonly used for wired internet access, data transfer, and VoIP systems, RJ45 UTP cables offer a reliable solution for high-speed network communication. Their plug-and-play design makes installation simple, while the twisted pair construction ensures signal integrity over medium distances. Ideal for structured cabling and LAN setups, RJ45 UTP cables remain a backbone component in modern networking infrastructure.

XPort EDGE Click accessories 1 image

Used MCU Pins

mikroBUS™ mapper

NC
NC
AN
ID SEL
PD2
RST
General-Purpose I/O / ID COMM
PB2
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
General-Purpose I/O
PD6
PWM
General-Purpose I/O
PC3
INT
UART TX
PD0
TX
UART RX
PD1
RX
NC
NC
SCL
NC
NC
SDA
NC
NC
5V
Ground
GND
GND
1

Take a closer look

Click board™ Schematic

XPort EDGE Click Schematic schematic

Step by step

Project assembly

Click Shield for Arduino UNO front image hardware assembly

Start by selecting your development board and Click board™. Begin with the Arduino UNO Rev3 as your development board.

Click Shield for Arduino UNO front image hardware assembly
Arduino UNO Rev3 front image hardware assembly
Charger 27 Click front image hardware assembly
Prog-cut hardware assembly
Charger 27 Click complete accessories setup image hardware assembly
Board mapper by product8 hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Arduino UNO MCU Step hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support

Library Description

XPort EDGE Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.

Example Description
This example demonstrates the functionality of the XPort EDGE Click board. It initializes the module, retrieves the device and interface information, performs diagnostic commands such as pinging a specific address, and allows the user to access the device via its web interface. Additionally, it provides a CLI (Command Line Interface) mode to UART terminal for further interaction with the device.

Key functions:

  • xportedge_cfg_setup - This function initializes Click configuration structure to initial values.

  • xportedge_init - This function initializes all necessary pins and peripherals used for this Click board.

  • xportedge_reset_device - This function resets device by toggling the RST pin state.

  • xportedge_send_cmd - This function sends a command string by using UART serial interface.

  • xportedge_list_commands - This function lists commands at current level by sending the question mark by using UART serial interface.

Application Init
Initializes the logger and the XPort EDGE Click driver, performs a device reset, retrieves device information, and pings the specific address in diagnostics. The application retrieves the device's IP address, enabling the user to connect via a web browser and access the web interface. Finally, it enters CLI mode for advanced command interactions.

Application Task
Continuously monitors UART communication, relaying commands and responses between the XPort EDGE Click board and the logger. This allows real-time interaction with the device through the UART Terminal for configuration and diagnostics.

Open Source

Code example

The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.

/*!
 * @file main.c
 * @brief XPort EDGE Click Example.
 *
 * # Description
 * This example demonstrates the functionality of the XPort EDGE Click board. It initializes the module, 
 * retrieves the device and interface information, performs diagnostic commands such as pinging a specific 
 * address, and allows the user to access the device via its web interface. Additionally, it provides a 
 * CLI (Command Line Interface) mode to UART terminal for further interaction with the device.
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes the logger and the XPort EDGE Click driver, performs a device reset, retrieves device 
 * information, and pings the specific address in diagnostics. The application retrieves the device's IP address, 
 * enabling the user to connect via a web browser and access the web interface. Finally, it enters CLI mode 
 * for advanced command interactions.
 *
 * ## Application Task
 * Continuously monitors UART communication, relaying commands and responses between the XPort EDGE Click 
 * board and the logger. This allows real-time interaction with the device through the UART Terminal for
 * configuration and diagnostics.
 *
 * ## Additional Function
 * - static void xportedge_clear_app_buf ( void )
 * - static void xportedge_log_app_buf ( void )
 * - static err_t xportedge_process ( xportedge_t *ctx )
 * - static err_t xportedge_read_response ( xportedge_t *ctx )
 *
 * @note
 * Ensure the XPort EDGE Click board is properly connected to the network.
 * The application uses a predefined address to test connectivity via the ping diagnostic command.
 *
 * @author Stefan Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "xportedge.h"

// Link or IP address for pinging
#define ADDRESS_TO_PING             "https://www.mikroe.com"

// Application buffer size
#define APP_BUFFER_SIZE             200
#define PROCESS_BUFFER_SIZE         100

static xportedge_t xportedge;
static log_t logger;

static uint8_t app_buf[ APP_BUFFER_SIZE ] = { 0 };
static int32_t app_buf_len = 0;

/**
 * @brief XPort EDGE clearing application buffer.
 * @details This function clears memory of application buffer and reset its length.
 * @note None.
 */
static void xportedge_clear_app_buf ( void );

/**
 * @brief XPort EDGE log application buffer.
 * @details This function logs data from application buffer to USB UART.
 * @note None.
 */
static void xportedge_log_app_buf ( void );

/**
 * @brief XPort EDGE data reading function.
 * @details This function reads data from device and concatenates data to application buffer. 
 * @param[in] ctx : Click context object.
 * See #xportedge_t object definition for detailed explanation.
 * @return @li @c  0 - Read some data.
 *         @li @c -1 - Nothing is read.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
static err_t xportedge_process ( xportedge_t *ctx );

/**
 * @brief XPort EDGE read response function.
 * @details This function waits for a response message, reads and displays it on the USB UART.
 * @param[in] ctx : Click context object.
 * See #xportedge_t object definition for detailed explanation.
 * @return @li @c  0 - OK response.
 *         @li @c -2 - Timeout error.
 * See #err_t definition for detailed explanation.
 * @note None.
 */
static err_t xportedge_read_response ( xportedge_t *ctx );

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    xportedge_cfg_t xportedge_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    xportedge_cfg_setup( &xportedge_cfg );
    XPORTEDGE_MAP_MIKROBUS( xportedge_cfg, MIKROBUS_1 );
    if ( UART_ERROR == xportedge_init( &xportedge, &xportedge_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_printf( &logger, "*** Reset Device ***" );
    xportedge_reset_device ( &xportedge );
    xportedge_read_response ( &xportedge );

    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Get Device Info ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS_DEVICE );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_SHOW );
    xportedge_read_response ( &xportedge );
    
    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Go Back to Status Level ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_EXIT );
    xportedge_read_response ( &xportedge );

    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Get Interface Status and IP Address ***\r\n" );
    log_printf( &logger, "*** Connect to Listed IP Address Through Web Browser to Access Web Interface ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS_INTERFACE_ETH0 );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_SHOW );
    xportedge_read_response ( &xportedge );
    
    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Go Back to Status Level ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_EXIT );
    xportedge_read_response ( &xportedge );
    
    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Ping %s ***", ( char * ) ADDRESS_TO_PING );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS_DIAGNOSTICS );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS_DIAGNOSTICS_PING );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_STATUS_DIAGNOSTICS_PING_HOST( ADDRESS_TO_PING ) );
    xportedge_read_response ( &xportedge );

    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** Go Back to ROOT Level ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_EXIT );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_EXIT );
    xportedge_read_response ( &xportedge );
    xportedge_send_cmd ( &xportedge, XPORTEDGE_CMD_EXIT );
    xportedge_read_response ( &xportedge );
    
    log_printf( &logger, "\r\n-----------------------------\r\n" );
    log_printf( &logger, "*** List ROOT Level Commands and Switch to CLI Terminal ***\r\n" );
    log_printf( &logger, "*** Now CLI Commands are Input from the UART Terminal ***" );
    xportedge_send_enter ( &xportedge );
    xportedge_read_response ( &xportedge );
    xportedge_list_commands ( &xportedge );
    xportedge_read_response ( &xportedge );
}

void application_task ( void ) 
{
    app_buf_len = uart_read( &logger.uart, app_buf, PROCESS_BUFFER_SIZE );
    if ( app_buf_len > 0 ) 
    {
        uart_write ( &xportedge.uart, app_buf, app_buf_len );
        xportedge_clear_app_buf ( );
    }
    app_buf_len = uart_read( &xportedge.uart, app_buf, PROCESS_BUFFER_SIZE );
    if ( app_buf_len > 0 ) 
    {
        uart_write ( &logger.uart, app_buf, app_buf_len );
        xportedge_clear_app_buf ( );
    }
}

int main ( void ) 
{
    /* Do not remove this line or clock might not be set correctly. */
    #ifdef PREINIT_SUPPORTED
    preinit();
    #endif
    
    application_init( );
    
    for ( ; ; ) 
    {
        application_task( );
    }

    return 0;
}

static void xportedge_clear_app_buf ( void ) 
{
    memset( app_buf, 0, app_buf_len );
    app_buf_len = 0;
}

static void xportedge_log_app_buf ( void )
{
    for ( int32_t buf_cnt = 0; buf_cnt < app_buf_len; buf_cnt++ )
    {
        log_printf( &logger, "%c", app_buf[ buf_cnt ] );
    }
}

static err_t xportedge_process ( xportedge_t *ctx ) 
{
    uint8_t rx_buf[ PROCESS_BUFFER_SIZE ] = { 0 };
    int32_t overflow_bytes = 0;
    int32_t rx_cnt = 0;
    int32_t rx_size = xportedge_generic_read( ctx, rx_buf, PROCESS_BUFFER_SIZE );
    if ( ( rx_size > 0 ) && ( rx_size <= APP_BUFFER_SIZE ) ) 
    {
        if ( ( app_buf_len + rx_size ) > APP_BUFFER_SIZE ) 
        {
            overflow_bytes = ( app_buf_len + rx_size ) - APP_BUFFER_SIZE;
            app_buf_len = APP_BUFFER_SIZE - rx_size;
            for ( int32_t buf_cnt = 0; buf_cnt < overflow_bytes; buf_cnt++ )
            {
                log_printf( &logger, "%c", app_buf[ buf_cnt ] );
            }
            memmove ( app_buf, &app_buf[ overflow_bytes ], app_buf_len );
            memset ( &app_buf[ app_buf_len ], 0, overflow_bytes );
        }
        for ( rx_cnt = 0; rx_cnt < rx_size; rx_cnt++ ) 
        {
            if ( rx_buf[ rx_cnt ] ) 
            {
                app_buf[ app_buf_len++ ] = rx_buf[ rx_cnt ];
            }
        }
        return XPORTEDGE_OK;
    }
    return XPORTEDGE_ERROR;
}

static err_t xportedge_read_response ( xportedge_t *ctx )
{
    uint32_t timeout_cnt = 0;
    uint32_t timeout = 30000;
    while ( 0 == strstr( app_buf, XPORTEDGE_CMD_TERMINAL ) )
    {
        xportedge_clear_app_buf ( );
        xportedge_process( ctx );
        xportedge_log_app_buf ( );
        if ( timeout_cnt++ > timeout )
        {
            return XPORTEDGE_ERROR_TIMEOUT;
        }
        Delay_ms ( 1 );
    }
    timeout_cnt = 0;
    timeout = 100;
    xportedge_clear_app_buf ( );
    while ( timeout_cnt++ < timeout )
    {
        if ( XPORTEDGE_OK == xportedge_process( ctx ) )
        {
            timeout_cnt = 0;
        }
        xportedge_log_app_buf ( );
        xportedge_clear_app_buf ( );
        Delay_ms ( 1 );
    }
    return XPORTEDGE_OK;
}

// ------------------------------------------------------------------------ END

Additional Support

Resources

Love this project?

'Buy This Kit' button takes you directly to the shopping cart where you can easily add or remove products.