Browse Source

update

master
zhaohe 1 year ago
parent
commit
39b1906033
  1. 59
      ble_app_uart_c_pca10100_s122.uvguix.h_zha
  2. 1
      ble_app_uart_c_pca10100_s122.uvprojx
  3. 14
      main.c

59
ble_app_uart_c_pca10100_s122.uvguix.h_zha
File diff suppressed because it is too large
View File

1
ble_app_uart_c_pca10100_s122.uvprojx

@ -3486,6 +3486,7 @@
<TargetName>flash_s122_nrf52_8.0.0_softdevice</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>

14
main.c

@ -175,7 +175,7 @@ static void scan_evt_handler(scan_evt_t const * p_scan_evt)
/**@brief Function for initializing the scanning and setting the filters.
*/
static char m_target_periph_name[20] = "iflytop_test"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static char m_target_periph_name[20] = "M1002"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static void scan_init(void)
{
ret_code_t err_code;
@ -190,19 +190,17 @@ static void scan_init(void)
APP_ERROR_CHECK(err_code);
// err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &m_nus_uuid);
// APP_ERROR_CHECK(err_code);
err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name);
err_code = nrf_ble_scan_filter_set(&m_scan, SCAN_UUID_FILTER, &m_nus_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_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name);
APP_ERROR_CHECK(err_code);
// err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_UUID_FILTER|NRF_BLE_SCAN_NAME_FILTER, false);
// err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_NAME_FILTER, false);
// APP_ERROR_CHECK(err_code);
err_code = nrf_ble_scan_filters_enable(&m_scan, NRF_BLE_SCAN_UUID_FILTER|NRF_BLE_SCAN_NAME_FILTER, false);
APP_ERROR_CHECK(err_code);
}

Loading…
Cancel
Save