2019-08-04 02:48 AM
In hci_le_advertising_report_event I only see type 0x01,0x08,0x0A and 0x03 in the Advertising_Report_t. I don't see the 0xFF advertisement data.
2019-08-04 08:11 PM
The complete advertising data (or scan response) is supposed to be in *Data, in the followed format:
2019-08-04 08:34 PM
Thank you for your reply. The advertisement data I'm looking for was not found in the *Data segment of the advertising_report_t variable. When I use a mobile app like nRF Connect or ble scanner on Android to view the raw data it is before the name of the ble device. The data I circled in the attached image is in the *data but not the data above which I am trying to read. It consists of the major and minor values from a beacon.
Please help. Thank you
2019-08-04 09:28 PM
Hi Chong,
Please note that normally the advertising payload has length up to 37 bytes, including ADV address (6 bytes), which makes advertising data 31 byte maximum.
The advertising data can be partitioned into two, located in an ADV_IND and in a Scan response.
In your case, AD data type 0x01 and 0xff consist 31 bytes, and there shall be one more following report (event) containing the AD data type 0x08, 0x0a, and 0x03.
I replicated the advertising more than 31 bytes with "nRF Connect", the follow screenshots show data separately in two events:
Best Regards,
Winfred
2019-08-04 09:39 PM
Hi Winfred
Thank you for your prompt reply. Do you mean that the hci_le_advertising_report_event will be triggered twice since the data length exceeds 37 bytes And the contents will be different ?
Thank you
Best regards,
Chong
2019-08-04 11:21 PM
Hi Chong,
Yes. The second advertising report will have Event_Type equal to 4 (Scan Rsp), which is actually the response to the active scanning.
The primary advertising report may have Event_Type from 0 to 3 according to advertiser settings.
It is the beacon (advertising data) sent periodically every advertising interval.
Best Regards,
Winfred
2019-08-06 07:26 PM
Hi Wilfred,
Thank you for your reply. Is there a limit of the number of BLE messages received during scanning ?
I seem to be scanning max 12 BLE devices and misses the rest that I want to get.
Thank you
Best regards,
Chong Chieh Tseng
Willowmore Pte Ltd
2019-08-07 07:00 PM
Hi Chong,
There is no such limit.
Possibly you configured the scanning window too short, so only 12 advertising packets can be scanned in that tiny period.
Please configure scanning interval and window properly.
It will be fine to set the scanning window the same as interval.
Best Regards,
Winfred
2019-08-07 10:25 PM
Hi Winfred,
Thank you for your reply. I am able to scan for the device but still unable to receive the beacon advertising data. I noticed that the address is the same for both advertising report and have tried in my code to look for the specific address but there is still only one report for that beacon.
I also tried using
ret = aci_gap_start_general_discovery_proc(0x4000,0x4000,0x01,0x01);
and
ret = aci_gap_start_general_discovery_proc(0x4000,0x4000,0x01,0x00);
for finding duplicates but it still doesn't appear. I assume for duplicates is only for duplicate message sent during the scan window ?
Thank you
Best regards,
Chong
2019-08-13 11:22 PM
> I am able to scan for the device but still unable to receive the beacon advertising data.
There is contradiction. Being able to scan for the device means being able to receive the advertising data.
> I noticed that the address is the same for both advertising report
It is correct that the address is the same.