BLE central not connecting to ble device

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

cross mob
Anonymous
Not applicable

I have a device that I want to be a ble central. I am not able to get connected to a ble device.

In wiced_bt_cfg_settings, I am using security settings BTM_SEC_NONE .

I have called wiced_bt_stack_init()

My p_bt_management_cback callback receives BTM_ENABLED_EVT  with p_event_data->enabled.status == WICED_BT_SUCCESS

I call :

wiced_bt_gatt_register( gtwy_gatts_callback );

wiced_bt_ble_scan( BTM_BLE_SCAN_TYPE_HIGH_DUTY, WICED_FALSE, ble_gtwy_client_scan_results_callback );

In my scan_results callback, I identify the  bd_addr which matches my device (p_scan_result->remote_bd_addr) and save the address.

I make the following call, with the correct address.

result = wiced_bt_gatt_le_connect( matched_bd_addr, BLE_ADDR_PUBLIC, BLE_CONN_MODE_HIGH_DUTY, WICED_TRUE);

I was expecting that after this call, my central would connect to the device and that gtwy_gatts_callback() would get called with

event == GATT_CONNECTION_STATUS_EVT.

Instead, I never see gtwy_gatts_callback() called. If I watch with a ble sniffer, I never see CONNECT_REQ sent from the my central device.

Am I missing a step? or does anyone have any idea about what might be the problem?

thanks.

0 Likes
5 Replies
BoonT_56
Employee
Employee
500 likes received 250 likes received 100 likes received

aswanberg

Did you have a chance to try out the hello_client app in the SDK?

Anonymous
Not applicable

Thanks, I saw some old discussions referring to hello_client. What versions of the sdk contain hello_client and is there a link to  one of those sdks? Is it located under snip.bluetooth?

I installed SDK version 3.6.3 with WICED-SDK-3.6.3-IDE-Installer.exe.zip

snip.bluetooth contains:

ble_hello_sensor

ble_proximity_reporter

bt_dualmode_server

(the last two were somewhat helpful, but having the actual hello_client example would be cleaner)

I searched my whole hard drive for any files with a name containing hello_client and there were no matches 🙂

Anne

0 Likes

I see the confusion.  You posted this to the BLE forum, so boont​ recommended hello_client/hello_sensor, which are standard apps within the WICED-Smart-SDK-2.2.3-IDE-Installer (Windows)

However, only hello_sensor is included within the current WICED WiFi SDK (3.7.0-3)

There are plans to include a hello_client application with the next release of the WICED WiFi SDK, but for now, I believe BIG (Bluetooth Internet Gateway) may be the best bet for central BT functionality.

0 Likes
Anonymous
Not applicable

I have the same problem with SDK 3.7.0.But the program worked well with SDK 3.5.2 .I finally found that it can only connect to the devices whose address type is BLE_ADDR_RANDOM.if the address type is BLE_ADDR_PUBLIC,the central device will always connect failed.

Anonymous
Not applicable

I did download the WICED-SDK-4.0.1 and I couldn't found the Hello_client demo, where is it?

0 Likes