NRF52840
S140
APP based on ble_app_multilink_central
1 PCA10056 as central, 1 PCA10056 as peripheral, the cantral can find the peripheral and buid connection.
But, failed to find the module from 3rd party, E104-BT52(DA14531 transparent COM module).
Have set with same UUID128,UUIDSVR and characters:
uint8_t uuid128[] = {0x57,0x49,0x4C,0x44,0x44,0x52,0x41,0x47,0x4F,0x4E,0x43,0x4C,0x99,0x44,0x50,0xFF};
uint8_t uuidsvr[] = {0x99,0x44};
And set the UUID filter:
void scan_init(void)
{
ret_code_t err_code;
nrf_ble_scan_init_t init_scan;
memset(&init_scan, 0, sizeof(init_scan));
//auto connect the found BLE client
init_scan.connect_if_match = true;
init_scan.conn_cfg_tag = APP_BLE_CONN_CFG_TAG;
err_code = nrf_ble_scan_init(&m_scan, &init_scan, scan_evt_handler);
APP_ERROR_CHECK(err_code);
//err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name);
ble_uuid_t uuid;
ble_uuid128_t gateway_base_uuid = {GATEWAY_UUID_BASE};
err_code = sd_ble_uuid_decode(16,(uint8_t*)&gateway_base_uuid,&uuid);
APP_ERROR_CHECK(err_code);
err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &uuid);
APP_ERROR_CHECK(err_code);
//err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER, false);
err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_UUID_FILTER, false);
APP_ERROR_CHECK(err_code);
UNUSED_VARIABLE(uuid);
UNUSED_VARIABLE(err_code);
//UNUSED_VARIABLE(gateway_base_uuid);
UNUSED_VARIABLE(init_scan);
}
I have check with mobile app, the very noticeable difference is : the UUID of PCA10056(peripheral) is 128bit format, but UUID for E104-BT52(peripheral) is 16bit.
But, it looks like I can do nothing for E104-BT52(according to their guidebook).
Can I do something in central to deal with this problem?
Thank you.