Question
ST67W611M1 (T01) – AT+BLESCAN starts failing (ERROR / TIMEOUT) after ~20–70 min of repeated scan stop/start; only a module reset recovers
- Host MCU: STM32G491METx, FreeRTOS, SPI host interface (SPI_RDY on EXTI, CHIP_EN controlled by host)
- Module: ST67W611M1, T01 binary (LwIP offload profile)
- Host middleware: X-CUBE-ST67W61, ST67W6X Network Driver v1.3.0
- Clock:
W6X_CLOCK_MODE = 1(internal RC);W6X_POWER_SAVE_AUTO = 0(also tested with 1; the driver disables it inW6X_Ble_Initbecause of the RC clock) - BLE only, no Wi-Fi in use
Use case
The module is used only as a BLE observer. It continuously scans for manufacturer-data advertisements from 2 ble devices, among a crowded environment (40+ devices around).
W6X_Ble_Init(W6X_BLE_MODE_DUAL, …)W6X_Ble_SetScanParam(ACTIVE, PUBLIC_ADDR, FILTER_ALLOW_ALL, interval 105 (65.6 ms), window 104 (65 ms))W6X_Ble_StartScan(cb)W61_BLE_SCAN_TIMEOUTreduced from 5000 to 1000 ms, andW61_BLE_MAX_DETECTED_PERIPHERAL= 40- On every scan-done callback the application calls
W6X_Ble_StopScan()and thenW6X_Ble_StartScan()immediately. This gives one stop/start cycle every ~0.35–1 s, i.e. thousands of cycles per hour.
Problem
After ~2,700 to ~10,000 stop/start cycles (20–70 min), the module starts refusing scan commands. We have seen three variants:
AT+BLESCAN=0returns OK, the followingAT+BLESCAN=1returnsERROR, and every later stop/start returnsERROR.AT+BLESCAN=0returns OK, andAT+BLESCAN=1gets no response (timeout).- Every AT command returns
ERROR, including non-BLE ones (e.g. the NCP heap-state query).
In all cases:
- The SPI link is alive: replies are received,
SPI_RDYis behaving, and no SPI transport errors were seen. - The ST67 heap (
W61_GetNcpHeapState) is stable at ~36 KB before and during the failure, so it doesn't look like a memory leak. - The host heap and stack are stable.
- The state never clears by itself. Only a full power-cycle via CHIP_EN plus a complete re-init (
W6X_DeInit/W6X_Init/W6X_Ble_Init) recovers it.
Questions
- Is this a known issue in the T01 BLE scan handling? Is it fixed in a newer T01 release?
AT+BLESCAN=0returns OK right away. Is the scanner actually stopped at that point? Is there a minimum delay required beforeAT+BLESCAN=1, or an event that signals the stop is complete? The p2pClient example waits 2 s, but the API docs don't mention any requirement.- Is continuous scanning with frequent stop/start (to get periodic result delivery) a supported pattern? Or is there a recommended way to scan continuously and receive advertisements without restarting the scan?
