2016-09-01 08:00 AM
How I can read adversising data after a scanning ?
I use this instruction for scanning: ///////////////////////////////////////////////////////////////////////////////// // // Fa partire l' advertising // static int BleStartScanning(void) { uint16_t service_handle, dev_name_char_handle, appearance_char_handle; int status = 0; // Reset BlueNRG_RST(); // Set Address if((status = aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET, CONFIG_DATA_PUBADDR_LEN, m_MacAddress_Client)) != 0){ return status; } uint8_t role[] = {0x01}; if((status = aci_hal_write_config_data(CONFIG_DATA_ROLE, 0x01, role)) != 0){ return status; } // Inizializza livello GATT if((status = aci_gatt_init()) != 0){ return status; } if (m_bnrg_expansion_board == IDB05A1) { status = aci_gap_init_IDB05A1(GAP_CENTRAL_ROLE_IDB05A1, 0, 0x07, &service_handle, &dev_name_char_handle, &appearance_char_handle); } else { status = aci_gap_init_IDB04A1(GAP_CENTRAL_ROLE_IDB05A1, &service_handle, &dev_name_char_handle, &appearance_char_handle); } if(status != 0){ return status; } if((status =aci_gap_start_general_discovery_proc(0x0800, 0x0036,PUBLIC_ADDR, 0x00)) != 0){ return status; } return status; } After scannig I receive the event : EVT_LE_ADVERTISING_REPORT but in this event there is only address data e not aadversting Data. How I can read this data before start connecting procedure ? Thanks