Skip to main content
Associate II
September 12, 2025
Solved

X-CUBE-ST67W61 interface

  • September 12, 2025
  • 1 reply
  • 1623 views

X-CUBE-ST67W61 architecture.jpg

I am planning to have my application interface with the service API of the X-CUBE-ST67W61 Software package.

How does the shell utility interface with the Service API?

Is the communication interface through a queue?

Best answer by YBOUV.1

Hi,

basically Shell can call any functions within your embedded SW. Most of the case Shell calls W6x APIS.

as an example, if you want to get the MAC address you may implement:

#include "shell.h"

int32_t W6X_Shell_WiFi_Station_MAC(int32_t argc, char **argv)
{
 uint8_t mac_addr[6] = {0};
 W6X_WiFi_Station_GetMACAddress(mac_addr) == W6X_STATUS_OK)
 SHELL_PRINTF("STA MAC : " MACSTR "\n", MAC2STR(mac_addr));
 return SHELL_STATUS_OK;
}


/** Shell command to get the STA MAC address
 * W6X_Shell_WiFi_Station_MAC: function to call
 * wifi_sta_mac: name of the command to run in the CLI
 * wifi_sta_mac: displayed helper
 */
SHELL_CMD_EXPORT_ALIAS(W6X_Shell_WiFi_Station_MAC, wifi_sta_mac, wifi_sta_mac);

 

1 reply

YBOUV.1
YBOUV.1Best answer
ST Employee
October 2, 2025

Hi,

basically Shell can call any functions within your embedded SW. Most of the case Shell calls W6x APIS.

as an example, if you want to get the MAC address you may implement:

#include "shell.h"

int32_t W6X_Shell_WiFi_Station_MAC(int32_t argc, char **argv)
{
 uint8_t mac_addr[6] = {0};
 W6X_WiFi_Station_GetMACAddress(mac_addr) == W6X_STATUS_OK)
 SHELL_PRINTF("STA MAC : " MACSTR "\n", MAC2STR(mac_addr));
 return SHELL_STATUS_OK;
}


/** Shell command to get the STA MAC address
 * W6X_Shell_WiFi_Station_MAC: function to call
 * wifi_sta_mac: name of the command to run in the CLI
 * wifi_sta_mac: displayed helper
 */
SHELL_CMD_EXPORT_ALIAS(W6X_Shell_WiFi_Station_MAC, wifi_sta_mac, wifi_sta_mac);