Add scan function to ble_wifi_onboarding sample

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
hi118
Level 3
Level 3
10 replies posted 10 sign-ins 5 questions asked

Hi,

Since "STM32 Connectivity Expansion Pack 1.1.0" did not have an example of BLE scanning function, I am trying to implement scanning based on "ble_wifi_onbording".
The example I referenced to add the scan is "hello_client".

However, the result of p_scan_result, which stores the scan results, is NULL.

What are the possible causes?

I haven't changed the setting value of wiced_bt_cfg_settings from "ble_wifi_onbording", is that the reason?

<Device used>
・STM32H747I-DISCO

 STM32H747I-DISCO STMicroelectronics | Mouser
・LBEE0ZZ1WE-TEMP
 LBEE0ZZ1WE-TEMP Murata Electronics | Mouser
・Wi-Fi/BT module: 1DX M.2 Module
 1LV M.2 Module - Embedded Artists

0 Likes
1 Solution

It turned out that the cause was mixed paths of different modules in the optional include settings of IAR-EW.
Thank you for your cooporation.

View solution in original post

0 Likes
4 Replies
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

Hi @hi118 :

Which API do you call?

If possible, please your log information or code to me for checking.

Best Regards,

Colin

0 Likes
lock attach
Attachments are accessible only for community members.
hi118
Level 3
Level 3
10 replies posted 10 sign-ins 5 questions asked

Hi @Qi_Colin 

> Which API do you call?
Sorry for my lack of knowledge. what answer do you expect?

Code (app.c)
Functions and callback functions that call wiced_bt_ble_scan() from application_init() which is called after receiving BTM_ENABLED_EVT.

Log(log.txt)
It will be a log from the start until the scan result is found to be NULL.
The last line "Scan completed:" is the log output when the scan result is NULL for him.

Regards,
hi118

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I didn't see anything wrong from your code. Don't know why the scan result is empty.

Could you try the "Bluetooth LE CTS Server" demo which also demonstrates the BLE scan function?

0 Likes

It turned out that the cause was mixed paths of different modules in the optional include settings of IAR-EW.
Thank you for your cooporation.

0 Likes