Command Console Library
Loading...
Searching...
No Matches
Command console library - Interactive Wi-Fi, Ethernet, iPerf, Bluetooth® LE, and WebSocket command framework

Overview

The command console library provides a framework to add an interactive command console to your application over a serial terminal. Support for Wi-Fi, Ethernet, iPerf, Bluetooth® Low Energy (LE), and WebSocket commands is bundled with this library, so you can bring up connectivity, measure throughput, and exercise middleware interactively without writing custom test code.

The ModusToolbox™ AnyCloud Tester - Wi-Fi Bluetooth® Console application is built over this library for Wi-Fi kits.

Features

  • Wi-Fi commands to perform network operations such as scan and join
  • Ethernet commands to perform network operations such as bringing the Ethernet interface up and down
  • Integrated iPerf 2.0 commands for active measurement of the maximum achievable bandwidth on IP networks (TCP client/server and UDP client/server on IPv4)
  • Bluetooth® LE commands, including Tx/Rx for measuring Bluetooth® LE throughput
  • WebSocket commands for interactive client and server operations, including secure (WSS/TLS) connections

Note: While iPerf provides several other commands, only a subset relevant to embedded connectivity use cases is enabled in this library. See the iPerf commands section.

When to Use

Use this library when you need to:

  • Bring up and validate Wi-Fi or Ethernet connectivity interactively during development
  • Measure TCP/UDP throughput on a device using iPerf
  • Characterize Bluetooth® LE throughput with connection-oriented channel (CoC) commands
  • Exercise the websocket middleware (client and server, plain and TLS) from a serial terminal
  • Add your own application-specific commands to a device console with minimal boilerplate

Prerequisites

Hardware Requirements

This library is supported on the following device families with the corresponding connectivity capability:

  • PSOC™ 6 with CYW4343W / CYW43012 / CYW43439 / CYW43022 connectivity
  • PSOC™ Edge E84
  • CYW955913
  • XMC7200

For the specific validated evaluation kits for the current release, see the RELEASE.md.

Software Requirements

The current version of the library was validated for compatibility with the following software and tools:

Software and tools Version
ModusToolbox™ software 3.9
ModusToolbox™ Device Configurator 5.90
GCC Compiler 14.2.1
IAR Compiler (only for ModusToolbox™) 9.50.2
Arm® Compiler 6 6.22
LLVM compiler 22.1.0

Read Documentation First

Choose Starting Template

Create an Empty application (always prefer starting from the Empty template) for your target kit, then add the required libraries described below.

Add Required Libraries

Add the required middleware using the ModusToolbox™ Library Manager (available in the ModusToolbox™ for VS Code extension and the Eclipse IDE), or by creating the corresponding .mtb files in the application's deps folder and running make getlibs.

In the ModusToolbox™ environment, the command console library uses the abstraction-rtos library for the RTOS abstraction API and the secure-sockets library for socket functions. For the Bluetooth® LE functionality, it uses btstack-integration.

Depending on the connectivity you need, add the following:

Configure Makefile

  1. Review and make the required changes to the pre-defined configuration files and Makefile COMPONENTS in the application. The configuration files for the FreeRTOS, lwIP, and Mbed TLS combination are bundled in the Wi-Fi core freertos lwip mbedtls library for Wi-Fi kits and in the Ethernet core freertos lwip mbedtls library for Ethernet kits.

    If the application uses a bundle library, the configuration files are in that bundle library. For example, for the Wi-Fi core freertos lwip mbedtls bundle library, the configuration files are in the wifi-core-freertos-lwip-mbedtls/configs folder; for the Ethernet Core FreeRTOS lwIP mbedtls library, they are in the ethernet-core-freertos-lwip-mbedtls/configs folder.

  2. Define the required set of COMPONENTS in the application's Makefile:

    COMPONENTS=FREERTOS MBEDTLS LWIP

    Note: For CYW955913EVK-01, the above defines are not applicable.

  3. For Wi-Fi kits, enable the Wi-Fi functionality by adding WCM to the COMPONENTS section:

    COMPONENTS=WCM
  4. For Ethernet kits, enable the Ethernet functionality by adding ECM to the COMPONENTS section:

    COMPONENTS=ECM
  5. To enable the Bluetooth® LE functionality, add WICED_BLE to the COMPONENTS section:

    COMPONENTS=WICED_BLE
  6. Add the following compiler directive to the DEFINES section:

    DEFINES=HAVE_SNPRINTF
  7. Tune the lwIP configuration parameters listed in the application's lwipopts.h file, depending on the required Wi-Fi throughput and use case.

    Note: For CYW955913EVK-01, the above configuration is not applicable.

For WebSocket TLS (WSS) support, copy the websocket_certificates.h template file from the command console library's source/websocket_utility/ folder (or from the application's test folder) into your application's source directory and update it with valid PEM-encoded certificates and keys:

  • WS_ROOT_CA_CERTIFICATE - Root CA certificate
  • WS_CLIENT_CERTIFICATE - Client certificate (for mutual TLS)
  • WS_CLIENT_PRIVATE_KEY - Client private key (for mutual TLS)
  • WS_SERVER_CERTIFICATE - Server certificate (for WSS server)
  • WS_SERVER_PRIVATE_KEY - Server private key (for WSS server)

Ensure the header file is in the application include path so that the WebSocket utility can find it during compilation.

Add Headers

Include the library's public header in your application source:

#include "command_console.h"

Quick Start

This quick start demonstrates the most common use case: initializing the console framework and adding your own commands. Follow these steps to get from an Empty template to a working console.

Step 1: Create an Empty application for your target kit.

Step 2: Add the required libraries for your connectivity (see Add Required Libraries) and run make getlibs.

Step 3: Configure the Makefile COMPONENTS and DEFINES (see Configure Makefile).

Step 4: Add the console initialization and command-registration code to your main.c (see Sample Code).

Expected Outcome: After programming the device and opening a serial terminal, a console prompt (>) appears and accepts the registered commands.

Sample Code

Initialize the console framework and register your own command table as described in the Adding custom console commands section. A minimal flow is:

#include "command_console.h"
/* 1. Initialize the console framework. */
cy_command_console_init( &console_cfg );
/* 2. Add your command table. */
cy_command_console_add_table( my_command_table );
/* 3. Remove the table when it is no longer needed. */
cy_command_console_delete_table( my_command_table );
cy_rslt_t cy_command_console_delete_table(const cy_command_console_cmd_t *commands)
De-registers the cy_command_console_cmd_t table.
cy_rslt_t cy_command_console_add_table(const cy_command_console_cmd_t *commands)
Invoked to register a table of cy_command_console_cmd_t entries.
cy_rslt_t cy_command_console_init(cy_command_console_cfg_t *cfg)
Initializes the Command console framework and spawns a thread that listens on the console for command...

Expected Outcome

When you successfully run the Quick Start example, you should observe the following:

  • Hardware behavior: The device boots and the console module initializes on the configured UART.
  • Terminal output: A > prompt appears on the serial terminal and echoes the commands you type. Registered commands (for example, mycmd1 --help) print their usage or execute their handler.
  • Performance metrics: For throughput use cases, the iPerf and Bluetooth® LE commands report the measured throughput (see the iPerf commands and Bluetooth® LE commands sections).

Commands supported

This section lists the Wi-Fi, iPerf, WebSocket, Ethernet, and Bluetooth® LE commands that are natively supported by the command console library.

Wi-Fi commands

Basic Wi-Fi commands

Use the following Wi-Fi commands to perform network operations. Enter the following commands after the device boots up and the Wi-Fi module is initialized and ready.

  1. Scan for nearby networks:
    > wifi_scan
  2. Connect to a network AP:
    > wifi_join <ssid> <security type> [password] [channel]
  3. Disconnect from the network AP:
    > wifi_leave
  4. Get the signal strength/RSSI of the network:
    > wifi_get_rssi
  5. Ping another device on the network:
    > wifi_ping <ip address>

Note: Wi-Fi commands(scan/join/leave/get_rssi/ping) are retained for backward compatibility. These commands are deprecated and it will be removed in the future release.

iPerf commands

iPerf commands are used for measuring the Wi-Fi performance/throughput. The iperf sends TCP/UDP data between two peer devices to compute the Wi-Fi performance/throughput.

iPerf command options

The following options are supported by the iPerf software integrated into this library. On the console, type iperf --help for the list of options supported by the iperf command.

Note: The -w command is not supported through the command line option; it can be only configured by changing the network stack configuration. See the following notes to configure the TCP window size.

> iperf --help
Usage: iperf [-s|-c host] [options]
iperf [-h|--help] [-v|--version]
Client/Server:
-i, --interval # Seconds between periodic bandwidth reports
-l, --len #[kmKM] Length of buffer in bytes to read or write (Defaults: TCP=128K, v4 UDP=1470, v6 UDP=1450)
-p, --port # Server port to listen on/connect to
-u, --udp Use UDP rather than TCP
-b, --bandwidth #[kmgKMG | pps] Bandwidth to send at in bits/sec or packets per second for UDP client
Note:
-w, --window TCP window size is not supported through run time option; however, you can configure the TCP window size \n
at the build time using the following instructions. The values given for the macros/configurations in the following section\n
are just an example for reference, the actual values of the macros/configuration may vary with your *lwipopts.h* file.

TCP window size configuration

Update the following configurations in the application's config file

  • FreeRTOS application can make the following configurations in config files (For example, lwipopts.h)
    1. For the server, modify/add the following macros with a suitable value to change the TCP window size and pbuf pool size:
      #define TCP_WND (TCP_MSS * 20)
      #define PBUF_POOL_SIZE 20
    2. For the client, modify the following macros with a suitable value to change the TCP send buffer size: #define TCP_SND_BUF (TCP_MSS * 20) #define MEMP_NUM_TCP_SEG 127
  • Threadx application can modify/add the following DEFINES in Makefile.
    1. For the server, modify/add DEFAULT_TCP_WINDOW_SIZE with a suitable value to change the TCP window size:
      DEFINES+=DEFAULT_TCP_WINDOW_SIZE=16*1024
    2. For the client, modify the NX_TCP_MAXIMUM_TX_QUEUE with a suitable value to change the TCP send buffer queue size: DEFINES+=NX_TCP_MAXIMUM_TX_QUEUE=20 Note: NX_TCP_MAXIMUM_TX_QUEUE is not configurable in 55900 devices.
  • For an iperf server, DEFAULT_IPERF_SERVER_TIMEOUT_SEC can be used to configure following timeouts

    • Amount of time an iperf server waits for a client to connect
    • Socket receive timeout of the iperf server

    DEFAULT_IPERF_SERVER_TIMEOUT_SEC can be configured by adding the following DEFINES in Makefile. DEFINES+=DEFAULT_IPERF_SERVER_TIMEOUT_SEC=10

  • For an iperf UDP client, IPERF_UDP_CLIENT_NEVER_TIMEOUT can be used to configure the UDP client to never terminate when the device is unable to transmit the packets.

    IPERF_UDP_CLIENT_NEVER_TIMEOUT can be configured by adding the following DEFINES in Makefile.

    DEFINES+=IPERF_UDP_CLIENT_NEVER_TIMEOUT

    Server-specific:

    -s, --server run in server mode
    -t, --time # time in seconds to listen for new connections as well as to receive traffic (default not set)

    Client-specific:

    -c, --client <host> run in client mode, connecting to <host>
    -n, --num #[kmgKMG] number of bytes to transmit (instead of -t)
    -t, --time # time in seconds to transmit for (default 10 secs)

    Miscellaneous:

    -x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings) V(server) reports
    -y, --reportstyle C report as a Comma-Separated Values
    -h, --help print this message and quit
    -v, --version print version information and quit

iPerf setup

The following diagram shows the exact setup that should be used for measuring the Wi-Fi performance/throughput of a PSOC™ device using iperf.

iPerf setup - Wi-Fi throughput measurement

iPerf commands for Wi-Fi throughput measurement

Enter the following commands on the PSOC™ device (DUT) after the device boots up and connects to the Wi-Fi network. This section provides only the commands to be run on the DUT. When the 'client iperf command' runs on the DUT, the 'server iperf command' should run on the host PC (as shown in the iPerf Setup diagram), and vice versa.

  1. Start iPerf as a TCP server:
    > iperf -s
    Note: On the peer iPerf device (host PC), start iPerf as a TCP client to send the TCP data.
  2. Start iPerf as a TCP client:

    > iperf -c <server_ip_addr> -t <time in sec>

    Note: On the peer iPerf device (host PC), start iPerf as a TCP server.

    Sample command:

    > iperf -c 192.168.0.100 -t 60
  3. Start iPerf as a UDP server:
    > iperf -s -u
    Note: On the peer iPerf device (host PC), start iPerf as a UDP client to send the UDP data.
  4. Start iPerf as a UDP client:

    > iperf -c <server_ip_addr> -t <time in sec> -u -b <band width>

    Note: On the peer iPerf device (host PC), start iPerf as a UDP server.

    Sample command:

    > iperf -c 192.168.0.100 -t 60 -u -b 50M

Tuning for optimal Wi-Fi performance

The TCP and UDP Wi-Fi performance can be tuned using the iperf command options. The TCP window size option impacts the TCP throughput, and bandwidth option (-b) impacts the UDP throughput. You can tune the configurations either for TCP or UDP based on the details given in the following sections.

Tuning the TCP throughput

The TCP window size is configured with a default optimal value in the Wi-Fi Bluetooth® tester applications for PSOC™ 6 2M devices. If you are using a different PSOC™ device, see the iPerf command options section of this document to adjust the configuration for a better TCP throughput. The TCP window size of iperf can be configured only at compile time.

Tuning the UDP throughput

The iPerf command given in the iPerf commands for Wi-Fi throughput measurement section of this document is an ideal command for UDP throughput measurement on PSOC™ 6 2M devices. If you are using a different PSOC™ device, try different bandwidth values for the iperf -b option to measure the UDP throughput.

For example, when you run the command iperf -c 192.168.0.100 -t 60 -u -b 50M to measure the UDP Tx throughput on the device, if you see the resulting throughput closer to 50 Mbps, you should run the same command again with the -b 60M option and measure the throughput again. If the resulting throughput is different (56 Mbps, which is lesser than 60M, for example), the max UDP Tx throughput supported by the device is 56 Mbps. On the contrary, if the resulting throughput is 27 Mbps with the -b 50M option, you should run the same command again with the -b 30M option and measure the throughput again. If the resulting throughput in this case is 28 Mbps, this is the max UDP Tx throughput supported by the PSOC™ device. Use this as a guideline to identify the real max UDP throughput supported by your device.

WebSocket commands

The WebSocket utility provides a unified ws command to exercise the websocket middleware library interactively from a serial terminal. Both client and server roles are supported, including secure (WSS/TLS) connections.

Prerequisites:

  • The device must be connected to a Wi-Fi network before using WebSocket commands.
  • For TLS (WSS) connections, valid certificates and keys must be configured in websocket_certificates.h. Copy this file from the library's source/websocket_utility/ directory (or from the application template) into your application source and populate it with your PEM-encoded certificates before building.
  • Add the websocket library to your project's deps folder.
  • The TLS 1.3 handshake (mbedtls RSA operations) requires more stack than the default console thread provides. The default 6 KB is insufficient for WSS connections and will cause a stack overflow. Increase the console thread stack size in your application Makefile:
    DEFINES+=CONSOLE_THREAD_STACK_SIZE=(12*1024)
    Note: The architecture only supports one client and one server simultaneously.

Command options

Option Long form Description
-c --client Client mode
-s --server Server mode
-p --port Port number
-t --type Message type (text/binary/ping)
-m --message Message content
-cid --clientid Connected client ID (server mode)
tls Enable TLS/WSS (positional flag)

WebSocket client commands

  1. Connect to a WebSocket server (without TLS):
    > ws -c connect <host> -p <port>
    Sample command:
    > ws -c connect 192.168.31.37 -p 50007
  2. Connect to a WebSocket server (with TLS):
    > ws -c connect <host> -p <port> tls
    Sample command:
    > ws -c connect 192.168.31.37 -p 50007 tls
  3. Send a text message:
    > ws -c send -t text -m <message>
    Sample command:
    > ws -c send -t text -m "Hi from client"
  4. Send a binary frame (payload as hex string):
    > ws -c send -t binary -m <hex_string>
    Sample command:
    > ws -c send -t binary -m 48656c6c6f
  5. Send a ping frame:
    > ws -c send -t ping -m optional_payload
  6. Disconnect from the server:
    > ws -c disconnect

WebSocket server commands

  1. Start the server (without TLS):
    > ws -s start -p <port>
    Sample command:
    > ws -s start -p 50007
  2. Start the server (with TLS):
    > ws -s start -p <port> tls
    Sample command:
    > ws -s start -p 50007 tls
  3. Send a message to a specific client:
    > ws -s send -cid <client_id> -t <text|binary> -m <message>
    Sample command:
    > ws -s send -cid 0 -t text -m "Hi from server"
  4. Stop the server:
    > ws -s stop

Sample WebSocket client session (Non-TLS)

> ws -c connect 192.168.31.37 -p 50007
> ws -c send -t text -m "Hi from client"
> ws -c disconnect

Sample WebSocket client session (TLS)

> ws -c connect 192.168.31.37 -p 50007 tls
> ws -c send -t text -m "Hi from client"
> ws -c disconnect

Sample WebSocket server session (Non-TLS)

> ws -s start -p 50007
> ws -s send -cid 0 -t text -m "Hi from server"
> ws -s stop

Sample WebSocket server session (TLS)

> ws -s start -p 50007 tls
> ws -s send -cid 0 -t text -m "Hi from server"
> ws -s stop

Ethernet commands

Basic Ethernet commands

Use the following Ethernet commands to perform network operations. Enter the following commands after the device boots up and the Ethernet module is initialized and ready.

  1. Bring up the network:
    > eth_up <Speed type(MII/GMII/RGMII/RMII)> <Link speed(10M/100M/1000M/AUTO)> <Duplex mode(HALF/FULL/AUTO)> <ethernet interface ID(0/1)>
  2. Bring down the network:
    > eth_down
  3. Set the filters to the hardware:
    > eth_set_filter
  4. Enable MAC address filtering:
    > eth_set_filter_address <1-4 supported Filter numbers> <src/dest(Source/Destination)> <X:X:X:X:X:X(MAC address)> <X(Bytes)>
  5. Enable broadcast:
    > eth_broadcast <1/0(Enable=1,Disable=0)>
  6. Enable promiscuous mode:
    > eth_set_promiscuous_mode <1/0(Enable=1,Disable=0)>
  7. Ping another device on the network:
    > eth_ping <ip address>

Bluetooth® LE commands

As an example, use the LE connection-oriented channel (CoC) application on a CYW20719B2Q40EVB-01 kit as the Bluetooth® LE peer device to measure the Bluetooth® LE throughput. Ensure that the Bluetooth® LE connection-interval and LE-COC-MTU-size configurations are set to the same value in both the Bluetooth® LE devices that are used for throughput measurement. To modify the Bluetooth® LE connection-interval and MTU, see the Tuning for optimal Bluetooth® LE performance section.

The following Bluetooth® LE commands are supported in this library:

  1. Turn on Bluetooth®:
    > bt_on
  2. Turn off Bluetooth®:
    > bt_off
  3. Start Bluetooth® LE advertisement:
    > ble_start_adv
  4. Stop Bluetooth® LE advertisement:
    > ble_stop_adv
  5. Start Bluetooth® LE scan:
    > ble_start_scan
  6. Stop Bluetooth® LE scan:
    > ble_stop_scan
  7. Initialize LE connection-oriented channel (CoC):
    > ble_coc_init
    Note: LE CoC will be initialized with an MTU size of 100 and local Protocol Service Multiplexer (PSM) 0x19.
  8. Start LE CoC advertisement:
    > ble_coc_adv
  9. Scan and connect to a remote Bluetooth® LE device running the LE CoC app on the CYW20719B2Q40EVB-01 device:
    > ble_coc_scan_connect
  10. Disconnect an LE CoC connection: > ble_coc_disconnect
  11. Send LE CoC data: > ble_coc_send_start
  12. Stop sending LE CoC data: > ble_coc_send_stop
  13. Get the throughput: > ble_get_throughput
  14. Get the device address: > bt_get_device_address

Tuning for optimal Bluetooth® LE performance

Bluetooth® LE performance can be tuned using the Bluetooth® LE connection-interval and LE-COC-MTU-size configurations. Ensure that the Bluetooth® LE connection-interval and LE-COC-MTU-size configurations are set to the same value in both the Bluetooth® LE devices that are used for throughput measurement.

For a given MTU size, if the configured connection interval is low, the resulting throughput will be higher, and vice-versa.

Modifying Bluetooth® LE configurations on a PSOC™ device

ModusToolbox™: (Infineon Bluetooth® stack)

  1. The connection interval value is configured in multiples of 1.25 milliseconds based on the connection interval assigned in the Bluetooth® LE configuration structure.

    By default, the library sets the Bluetooth® LE connection interval configuration value to 40 which computes to a connection interval time of 50 msec (40 * 1.25 msec). The connection interval can be modified through a build macro.

    Add the BLE_CONNECTION_INTERVAL macro to the DEFINES in the application's Makefile. If the connection interval needs to be set to 24, the Makefile entry would look like as follows:

    DEFINES += BLE_CONNECTION_INTERVAL=24

    For the range of connection interval that can be configured, see Bluetooth® LE connection interval.

  2. By default, BLE_COC_MTU_SIZE is set to 100 bytes; the max value that can be configured is 512 bytes. To modify this to 200, do the following:

    Add the BLE_COC_MTU_SIZE macro to the DEFINES in the application's Makefile. The Makefile entry would look like as follows:

    DEFINES += BLE_COC_MTU_SIZE=200

Modifying Bluetooth® LE configurations on a peer device

Do the following to modify the connection interval and MTU on the peer LE COC application running on the CYW20719B2Q40EVB-01 device:

  1. The connection interval of LE COC application can be modified by changing the min and max connection interval values of BLE scan configuration structure in le_coc_cfg.c.By default, the connection interval of the PSOC™ device is set to 40. To set the same value, use the configuration given below:

    ble_scan_cfg =
    {
    ...
    /* Connection configuration */
    .conn_min_interval = 40,
    .conn_max_interval = 40,
    ...
    },
  2. Configure the MTU using the client control tool:
    1. Right-click the LE_Connection_Oriented_Channel project on the Eclipse IDE for ModusToolbox™. Navigate to ModusToolbox™ and then select ClientControl from the floating window menu.
    2. Select the appropriate WICED HCI UART from the drop-down list and then click Open Port.
    3. Select the LE COC tab to set the required MTU size.
    4. Click Close Port, reset the CYW20719B2Q40EVB-01 device, and then click Open Port for these settings to take effect.

Understanding the Bluetooth® LE throughput

This section explains the theoretical Bluetooth® LE throughput numbers achievable on a Bluetooth® LE platform based on the configuration.

The theoretical Bluetooth® LE throughput can be calculated using the following formula:

Throughput = (MTU size in bits) / (connection interval in seconds)

The following default values are used in this library:

- Default connection interval = 50 ms

- Default MTU size = 100 bytes

The theoretical Bluetooth® LE throughput achievable for these default values can be calculated as follows:

= (100 * 8) / (50 / 10^3) = (800 / 0.050) = 16,000 bps = 16 kbps

Adding custom console commands

  1. Initialize the command console framework:

    cy_command_console_init

    You should define the commands table and the handler along with the primary library. For example, the WHD library console commands may be placed in WHD_utils and located along with the WHD library. The test application will invoke the relevant function in WHD_utils for adding the commands.

  2. Define the commands as shown in the following example:
    #define MY_COMMANDS \
    { "mycmd1", my_command1, 0, NULL, NULL, (char *)"", (char *)"Run mycmd1 --help for usage."}, \
    { "mycmd2", my_command2, 0, NULL, NULL, (char *)"", (char *)"Run mycmd2 --help for usage."}, \
  3. Define the command table:
    const cy_command_console_cmd_t my_command_table[] =
    {
    MY_COMMANDS
    CMD_TABLE_END
    };
  4. Implement command handlers when the commands are executed on the console.

    In this example, implement my_command1 and my_command2 function handlers.

  5. Add the command table to the console:
    cy_command_console_add_table( my_command_table )
  6. De-register the command table:
    cy_command_console_delete_table( my_command_table )

Configuration Reference

By default, the Wi-Fi, Ethernet, Bluetooth, iPerf, and WebSocket utilities are enabled. To disable any of these utilities, add the corresponding define to the application's Makefile. For the COMPONENTS build flags used to enable Wi-Fi (WCM), Ethernet (ECM), and Bluetooth® LE (WICED_BLE) functionality, see Configure Makefile.

To disable Wi-Fi commands:

DEFINES+=DISABLE_COMMAND_CONSOLE_WIFI

To disable Ethernet commands:

DEFINES+=DISABLE_COMMAND_CONSOLE_ETH

To disable iperf command:

DEFINES+=DISABLE_COMMAND_CONSOLE_IPERF

To disable bluetooth commands:

DEFINES+=DISABLE_COMMAND_CONSOLE_BT

To disable WebSocket commands:

DEFINES+=DISABLE_COMMAND_CONSOLE_WEBSOCKET

Note: When using only the WebSocket utility, disable unused utilities to reduce code size. For example:

DEFINES+=DISABLE_COMMAND_CONSOLE_WIFI DISABLE_COMMAND_CONSOLE_BT DISABLE_COMMAND_CONSOLE_IPERF DISABLE_COMMAND_CONSOLE_ETH

Troubleshooting

  • iPerf UDP client reports lower throughput with -i 1: Run iPerf without the -i (interval) option, or use an interval value greater than 1 second.
  • IAR 9.40.2 build errors in Debug mode when the application explicitly includes iar_dlmalloc.h: Add --advanced_heap to LDFLAGS in the application Makefile.
  • Memory leak when running an iPerf command without a network connection: Ensure the network connection is up before issuing any iPerf commands. Running iPerf without a connection can lead to a memory leak and unpredictable behavior.
  • WSS (TLS) connection causes a stack overflow: Increase the console thread stack size using DEFINES+=CONSOLE_THREAD_STACK_SIZE=(12*1024); the default 6 KB is insufficient for the TLS 1.3 handshake.
  • Wi-Fi commands not recognized: Ensure WCM is added to COMPONENTS and the Wi-Fi core bundle library is pulled. On CYW955913EVK-01, the FreeRTOS/MBEDTLS/LWIP component defines are not applicable.

Related Code Examples

Release Notes and Changelog

  • RELEASE.md - Detailed release notes and changelog for all versions
  • version.xml - Current library version

License

This library is provided under Infineon software license terms. It depends on the abstraction-rtos and secure-sockets libraries and, depending on the enabled utilities, on btstack-integration (Bluetooth® LE) and the websocket middleware, which are governed by their respective license terms. You are responsible for reviewing and accepting all applicable third-party license terms.


Copyright

(c) 2026, Infineon Technologies AG, or an affiliate of Infineon

Technologies AG. All rights reserved.