In the ble_app_beacon example in nRF SDK 17.02, there are two defines namely APP_BEACON_INFO_LENGTH (0x17) and APP_ADV_DATA_LENGTH (0x15). The former defines length of the array namely m_beacon_info[] which is 23 bytes. And this array will be passed to the manuf_specific_data struct. My question is :
1. Will this 23 bytes be received at the scanner side after parsing 31 bytes of data frame which is actually received by the receiver's radio or even lesser than that?
2. I read somewhere that BLE GAP allows 26 bytes to be used as manufacturer specific data? Would it be alright to actually include the remaining bytes (3 bytes) into the m_beacon_info and then pass it to the manuf_specific_struct in the similar manner so that we retrieve these 26 bytes at the scanner's side?
3. Can we use these 26 bytes of data as we please like filling the m_beacon_info array with whatever information we want to like string, numbers, etc?
4. Am I right to guess that APP_ADV_DATA_LENGTH (0x15) indicates the number of data bytes that follows so that the BLE stack can parse through it exactly to the number of bytes of data (17 bytes) to access?
5. Beacon is by definition unconnectable, so the idea of scan response data shouldn't work with beacon, right? To make use of scan response data, we will have to advertise with normal advertising which uses gap_params_init() and gatt_init or is it still possible with beacon?
6. I checked a few of the scanner codes on the forum. The one I have checked doesn't use gap_params_init() which is understandable since no connection is made. But one of them uses gatt_init() and the other doesn't use gatt_init(). What exactly does gatt_init() do? Can GATT work independent of GAP (we don't initialize GAP yet we can initialize GATT)?
Thank you so much. I would highly appreciate the clarification.