Advanced
30 min

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

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

XPort EDGE Click with Nucleo 64 with STM32G474RE MCU

Published Jun 23, 2025

Click board™

XPort EDGE Click

Dev. board

Nucleo 64 with STM32G474RE MCU

Compiler

NECTO Studio

MCU

STM32G474RE

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

Nucleo-64 with STM32G474R MCU offers a cost-effective and adaptable platform for developers to explore new ideas and prototype their designs. This board harnesses the versatility of the STM32 microcontroller, enabling users to select the optimal balance of performance and power consumption for their projects. It accommodates the STM32 microcontroller in the LQFP64 package and includes essential components such as a user LED, which doubles as an ARDUINO® signal, alongside user and reset push-buttons, and a 32.768kHz crystal oscillator for precise timing operations. Designed with expansion and flexibility in mind, the Nucleo-64 board features an ARDUINO® Uno V3 expansion connector and ST morpho extension pin

headers, granting complete access to the STM32's I/Os for comprehensive project integration. Power supply options are adaptable, supporting ST-LINK USB VBUS or external power sources, ensuring adaptability in various development environments. The board also has an on-board ST-LINK debugger/programmer with USB re-enumeration capability, simplifying the programming and debugging process. Moreover, the board is designed to simplify advanced development with its external SMPS for efficient Vcore logic supply, support for USB Device full speed or USB SNK/UFP full speed, and built-in cryptographic features, enhancing both the power efficiency and security of projects. Additional connectivity is

provided through dedicated connectors for external SMPS experimentation, a USB connector for the ST-LINK, and a MIPI® debug connector, expanding the possibilities for hardware interfacing and experimentation. Developers will find extensive support through comprehensive free software libraries and examples, courtesy of the STM32Cube MCU Package. This, combined with compatibility with a wide array of Integrated Development Environments (IDEs), including IAR Embedded Workbench®, MDK-ARM, and STM32CubeIDE, ensures a smooth and efficient development experience, allowing users to fully leverage the capabilities of the Nucleo-64 board in their projects.

Nucleo 64 with STM32G474RE MCU double side image

Microcontroller Overview

MCU Card / MCU

STM32G474RE front image

Architecture

ARM Cortex-M4

MCU Memory (KB)

512

Silicon Vendor

STMicroelectronics

Pin count

64

RAM (Bytes)

128k

You complete me!

Accessories

Click Shield for Nucleo-64 comes equipped with two proprietary mikroBUS™ sockets, allowing all the Click board™ devices to be interfaced with the STM32 Nucleo-64 board with no effort. This way, Mikroe allows its users to add any functionality from our ever-growing range of Click boards™, such as WiFi, GSM, GPS, Bluetooth, ZigBee, environmental sensors, LEDs, speech recognition, motor control, movement sensors, and many more. More than 1537 Click boards™, which can be stacked and integrated, are at your disposal. The STM32 Nucleo-64 boards are based on the microcontrollers in 64-pin packages, a 32-bit MCU with an ARM Cortex M4 processor operating at 84MHz, 512Kb Flash, and 96KB SRAM, divided into two regions where the top section represents the ST-Link/V2 debugger and programmer while the bottom section of the board is an actual development board. These boards are controlled and powered conveniently through a USB connection to program and efficiently debug the Nucleo-64 board out of the box, with an additional USB cable connected to the USB mini port on the board. Most of the STM32 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 STM32 Nucleo-64 board with our Click Shield for Nucleo-64, you can access hundreds of Click boards™, working with 3.3V or 5V logic voltage levels.

Click Shield for Nucleo-64 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
PC12
RST
General-Purpose I/O / ID COMM
PB12
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
Power Supply
3.3V
3.3V
Ground
GND
GND
General-Purpose I/O
PC8
PWM
General-Purpose I/O
PC14
INT
UART TX
PA3
TX
UART RX
PA2
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 Nucleo-64 accessories 1 image hardware assembly

Start by selecting your development board and Click board™. Begin with the Nucleo 64 with STM32G474RE MCU as your development board.

Click Shield for Nucleo-64 accessories 1 image hardware assembly
Nucleo 64 with STM32G474RE MCU front image hardware assembly
LTE Cat.1 6 Click front image hardware assembly
Prog-cut hardware assembly
LTE Cat.1 6 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 Compiler Selection Step Image hardware assembly
Necto image step 6 hardware assembly
Clicker 4 for STM32F4 HA 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.