can't find other brand BLE module

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.

  • Hello,

    Sorry for the late reply. We are a bit short staffed, and doing our best to keep the waiting time as low as possible.

    I am a bit confused by your logs and screenshots.

    I assume E104-BT52 is some 3rd party device, or are you developing this as well? I didn't look it up now, but there is a list of 16bit UUIDs, and these are UUIDs that are registered with Bluetooth SIG (The Bluetooth company). Some are public/standard, like the Battery Service, Device Information Service, Heart Rate service, etc., while some are vendor specific, that some companies have bought. 

    From the screenshot from your phone, it looks like the device uses a UUID 0xFFF2. But from your log, it seems like you are trying to discover a service with UUID 0x4499? Is that correct?

    OldXiao said:
    The reason found: The E104-BT52 allowed 2 up links at the same time.so, after 1st connection built,it still send adv, central will try to connect it again, but duplication connection should not permited.

    Yes, that is a known bug, unfortunately. If you allow more than one concurrent connection, you should maintain a list of connected device addresses, to prevent duplicate connections. 

    Best regards,

    Edvin

  • The service UUID is 0x4499,

    character UUID include FFF1,FFF2,FFF3.

    I have added the management for peripheral address, add if connected and del if disconnected, stop further procedure if the address has been recorded in report event.

    It looks better now.

    Thank you for your help.

Related