Browse Source

更新自动连接设备白名单

master
zhaohe 1 year ago
parent
commit
2311fff289
  1. 5
      .vscode/settings.json
  2. 5
      app/main.c
  3. 19
      scripter/build_app.bat
  4. 2
      sdk

5
.vscode/settings.json

@ -188,7 +188,10 @@
"qrs_time_domain_zh.h": "c", "qrs_time_domain_zh.h": "c",
"board_eeprom_driver.h": "c", "board_eeprom_driver.h": "c",
"board_power_mgr.h": "c", "board_power_mgr.h": "c",
"heart_ware_sample_data_mgr.h": "c"
"heart_ware_sample_data_mgr.h": "c",
"bsp.h": "c",
"boards.h": "c",
"nrf_gpio.h": "c"
}, },
"files.encoding": "gbk" "files.encoding": "gbk"
} }

5
app/main.c

@ -147,6 +147,9 @@ static char m_target_periph_name0[20] = "M1002"; /**< Name of the device we tr
static char m_target_periph_name1[20] = "M1001"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/ static char m_target_periph_name1[20] = "M1001"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static char m_target_periph_name2[20] = "iflytop"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/ static char m_target_periph_name2[20] = "iflytop"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static char m_target_periph_name3[20] = "ADS1293"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/ static char m_target_periph_name3[20] = "ADS1293"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static char m_target_periph_name4[20] = "IFLYTOP"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static char m_target_periph_name5[20] = "M1003"; /**< Name of the device we try to connect to. This name is searched in the scan report data*/
static void scan_init(void) { static void scan_init(void) {
ret_code_t err_code; ret_code_t err_code;
nrf_ble_scan_init_t init_scan; nrf_ble_scan_init_t init_scan;
@ -166,6 +169,8 @@ static void scan_init(void) {
APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name1)); APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name1));
APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name2)); APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name2));
APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name3)); APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name3));
APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name4));
APP_ERROR_CHECK(nrf_ble_scan_filter_set(&m_scan, SCAN_NAME_FILTER, m_target_periph_name5));
// 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_NAME_FILTER, false);
// APP_ERROR_CHECK(err_code); // APP_ERROR_CHECK(err_code);

19
scripter/build_app.bat

@ -13,22 +13,3 @@ if not exist app\_build\app.hex (
echo EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE echo EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
exit /b 1 exit /b 1
) )
call scripter\keil_flash.bat app\app.uvprojx
@REM 댔관
@REM mergehex -f hex --merge ^
@REM res/s140_nrf52_7.2.0_softdevice.hex ^
@REM app\_build\app.hex ^
@REM --output output/app_whole.hex
@REM if %errorlevel% neq 0 (
@REM echo EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
@REM echo E 댔관呵겨
@REM echo EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
@REM exit /b 1
@REM )
@REM �쩌
@REM nrfjprog --eraseall -f NRF52 %홍꼰뇜%
@REM nrfjprog --program output/dynamic_electrocardiograph_ble_server.hex --verify -f NRF52 %�쩌%

2
sdk

@ -1 +1 @@
Subproject commit 85cbd26451dabe41150d375647ccd23b85c42b00
Subproject commit 9015b0ff6dd4e5783577b5d0f83cb2c207dc2c0b
Loading…
Cancel
Save