2025-09-12 10:19 AM - last edited on 2025-09-15 2:24 AM by TarikAb
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?
2025-10-02 8:50 AM - edited 2025-10-02 8:51 AM
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);