Skip to main content
Associate II
July 9, 2026
Question

ST67W611M1A6UTR with Mission T02 Binary, Fails to connect to Wifi

  • July 9, 2026
  • 2 replies
  • 69 views

I am using the ST67W611M1A6UTR Wi-Fi NCP with an STM32H563ZIT6 MCU on a custom board.

The ST67W611 is flashed with st67w611m_mission_t02_v2.0.89.bin, and I am running LwIP on the STM32H563ZIT6 host MCU. I am using the ST67W6X_CLI_LWIP example as a reference to implement a custom TCP stack for my board.

Below is my current initialization and Wi-Fi/TCP connection sequence:

void network_task(void *argument) {
W6X_Status_t ret = 0;
W6X_WiFi_Connect_t connectData = {0};
W6X_WiFi_StaStateType_e state = W6X_WIFI_STATE_STA_OFF;

wifi_init();
network_log_init();

W6X_App_Cb_t App_cb = {0};
App_cb.APP_wifi_cb = APP_wifi_cb;
App_cb.APP_net_cb = NULL;
App_cb.APP_ble_cb = NULL;
App_cb.APP_mqtt_cb = NULL;
App_cb.APP_error_cb = NULL;
W6X_RegisterAppCb(&App_cb);

app_evt_current = xEventGroupCreate();

/* Initialize the ST67W6X Driver */
ret = W6X_Init();
if (ret != W6X_STATUS_OK) {
// TODO: Handle this error appropriately, maybe log it or retry
// initialization
}

vTaskDelay(pdMS_TO_TICKS(500)); // Delay to ensure the driver is ready

ret = W6X_WiFi_Init();
if (ret != W6X_STATUS_OK) {
// TODO: Handle this error appropriately, maybe log it or retry
// initialization
}

int32_t lwip_success = MX_LWIP_Init();
if (lwip_success != 0) {
}

vTaskDelay(pdMS_TO_TICKS(500)); // Delay to ensure the driver is ready

W6X_WiFi_Connect_Opts_t wifi_connect_opts = {0};
strncpy((char *)wifi_connect_opts.SSID, TARGET_SSID, W6X_WIFI_MAX_SSID_SIZE);
strncpy((char *)wifi_connect_opts.Password, TARGET_SSID_PASSWD,
W6X_WIFI_MAX_PASSWORD_SIZE);
wifi_connect_opts.Reconnection_interval = 0;
wifi_connect_opts.Reconnection_nb_attempts = 0;
wifi_connect_opts.WPS = 0;
wifi_connect_opts.WEP = 0;
memset(wifi_connect_opts.MAC, 0, sizeof(wifi_connect_opts.MAC));
W6X_Status_t status = W6X_WiFi_Connect(&wifi_connect_opts);

while (1) {
vTaskDelay(pdMS_TO_TICKS(100));
}
}

The issue I am encountering is that both the Wi-Fi driver and the LwIP stack initialize successfully. However, when the application calls W6X_WiFi_Connect(), it crashes during an internal function call before the connection process completes.

The crash consistently occurs inside W6X_WiFi_Connect(), rather than returning an error status to the application.

  ret = W61_AT_Common_SetExecute(Obj, (uint8_t *)cmd, W61_WIFI_CONNECT_TIMEOUT);

 

Interestingly, if I comment out the call to net_if_init(), W6X_WiFi_Connect() completes successfully and the module connects to the Wi-Fi network.

So the crash appears to be related to the interaction between net_if_init() / LwIP network interface setup and the subsequent W6X_WiFi_Connect() call.

  if (net_if_init(&net_if_cb) != 0) {
LogError("Failed to init the LwIP network interface\n");
return -1;
}

which is present in MX_LWIP_Init(). 
 

W6X_Status_t W6X_Netif_Init(W6X_Net_if_cb_t *net_if_cb) {
/* Get the global W61 context pointer */
p_DrvObj = W61_ObjGet();
NULL_ASSERT(p_DrvObj, W6X_Obj_Null_str);

if (p_DrvObj->NetCtx.Supported != 0) {
NET_LOG_ERROR("Netif module not supported\n");
return W6X_STATUS_ERROR;
}

if (BusIo_SPI_Bind(SPI_MSG_CTRL_TRAFFIC_NETWORK_STA, 16,
net_if_cb->rxd_sta_notify_fn) != 0) {
SYS_LOG_ERROR("Bind Network Traffic Station failed\n");
return W6X_STATUS_ERROR;
}

if (BusIo_SPI_Bind(SPI_MSG_CTRL_TRAFFIC_NETWORK_AP, 8,
net_if_cb->rxd_ap_notify_fn) != 0) {
SYS_LOG_ERROR("Bind Network Traffic AP failed\n");
return W6X_STATUS_ERROR;
}

p_DrvObj->Callbacks.Netif_cb.link_sta_up_fn = net_if_cb->link_sta_up_fn;
p_DrvObj->Callbacks.Netif_cb.link_sta_down_fn = net_if_cb->link_sta_down_fn;
p_DrvObj->Callbacks.Netif_cb.link_ap_up_fn = net_if_cb->link_ap_up_fn;
p_DrvObj->Callbacks.Netif_cb.link_ap_down_fn = net_if_cb->link_ap_down_fn;

return W6X_STATUS_OK;
}

It looks like W6X_Netif_Init() is somehow conflicting with W6X_WiFi_Connect(). After W6X_Netif_Init() is called, the application gets stuck during AT command execution inside W6X_WiFi_Connect().

I have not been able to identify the root cause of this conflict between the LwIP network interface initialization and the Wi-Fi connection sequence.

Any guidance on the correct initialization order, required synchronization, or possible configuration issues would be greatly appreciated, as this is currently blocking my development.

2 replies

EPASZ.1
ST Employee
July 9, 2026

As a first point, I’d suggest moving to the SDK version 1.3 and updating the module binary - 2.0.106 is available instead of 2.0.89 (which is the originally published version in 1.0 SDK).

Then there is the Projects\NUCLEO-H563ZI\Demonstrations\ST67W6X\ST67W6X_MQTT_LWIP project which might be a better reference for simple connection than the CLI example - just to make sure you did not miss anything.

Finally, when you say “implement a custom TCP stack”, do you mean different LwIP implementation than what is in the SDK?

Associate II
July 9, 2026

Thanks a lot for your prompt reply!

I have now updated to the latest SDK (v1.3) and flashed the latest Mission T02 firmware (v2.0.106). I also compared my implementation against the ST67W6X_MQTT_LWIP example.

After debugging, I observed the following sequence:

  • W6X_WiFi_Station_cb() receives W61_WIFI_EVT_CONNECTING_ID.

  • APP_wifi_cb() is then called with W6X_WIFI_EVT_CONNECTING_ID.

  • W6X_WiFi_Station_cb() receives W61_WIFI_EVT_CONNECTED_ID.

  • netif_link_sta_up_cb() is called successfully.

  • APP_wifi_cb() is then called with W6X_WIFI_EVT_CONNECTED_ID.

  • Immediately afterwards, W6X_WiFi_Station_cb() receives W61_WIFI_EVT_DISCONNECTED_ID.

From the AP side, I can also see the ST67 associate successfully for a short time before it disconnects. Since the disconnect occurs immediately after the CONNECTED event, the link never remains up long enough for DHCP to complete, so no IP address is assigned.

Regarding the custom TCP stack, I am still using the SDK's LwIP implementation. By "custom TCP stack", I meant that I am integrating the ST67W6X driver and the provided LwIP example into my own STM32H563 application rather than using the complete example project as-is.

EPASZ.1
ST Employee
July 10, 2026

When the W61_WIFI_EVT_DISCONNECTED_ID event is received, it should be followed by W61_WIFI_EVT_REASON_ID (again in W6X_WiFi_Station_cb()) - this might clear up the reason for the quick disconnection.

Is it possible on your board to connect probes to the SPI lines (eg via some testpoints)? And record the whole SPI communcation.

Or if not, to run the FW on a Nucleo board (just maybe changing the dedicated NCP pins)? You might even share the Nucleo-version with me to try and debug directly.

With the above points, my idea is to determine if the disconnection is done by the Access point, the ST67 or raised by the STM32H5 host for some reason.