On LOCATION_SEARCH_TRIGGER, the backend publishes LOCATION_SEARCH_STARTED. It then reads the serving cell and scans for Wi-Fi access points, blocking the module thread while it waits for each AT response. A failed %BCINFO is retried once after CONFIG_APP_LOCATION_BCINFO_RETRY_DELAY_SECONDS, because the modem answers ERROR while another command is still running.
The measurements are published as LOCATION_SEARCH_WIFI_CELL_RESULT, unless there is no serving cell and fewer access points than nRF Cloud needs for a fix. The search always ends with LOCATION_SEARCH_DONE. A search has always finished by the time the next message is handled, so LOCATION_SEARCH_CANCEL is ignored.