Scan beacons active mode

Hello,

We are trying to read data from BLE (eye-sensor) sensors.
This beacon sends regular beacon data and sensor data when a device scans in active mode.

The result you are getting is just the beacon data:

complete raw data that we would like to obtain:

This is explained by the manufacturer:

2.Eddystone + EYE Sensors

For iBeacon + EYE Sensors and Eddystone + EYE Sensors protocols only iBeacon/Eddystone packet is broadcasted and will be seen by both active and passive scans, to see the EYE Sensors packet you need to use an active scan. In other words in an environment where no BLE devices are scanning with an active scan or in case when there are no scanning devices at all, only the iBeacon/Eddystone packet will be sent by the BTS device to conserve energy.

3. EYE Sensors

With EYE Sensors protocol, the EYE Sensor packet becomes broadcast. In other words, in an environment where no BLE devices are scanning with an active scan or in case when there are no scanning devices at all EYE Sensors packet will be sent by the BTS device.

Is there any option from the API to put the rak11722 in active mode to get full raw data.

best regards.

The scan should be in active mode already. But I have no beacons to test.

Going through the source codes of the Apollo3 BSP in Github
When using RAKBleScanner.cpp to start scanner

api.ble.scanner.start(timeout_sec);

it calls in udrv_ble.c

udrv_ble_scan_start(timeout_sec);

which calls in uhal_ble.c

uhal_ble_scan_start(uint16_t scan_sec);

which uses the structure scanner_conf which is preset to active mode

static appMasterCfg_t scanner_conf =
{
  SCAN_INTERVAL,                       /*! The scan interval, in 0.625 ms units */
  SCAN_WINDOW,                         /*! The scan window, in 0.625 ms units  */
  SCAN_DURATION,                       /*! The scan duration in ms */
  DM_DISC_MODE_GENERAL,                /*! The GAP discovery mode */
  DM_SCAN_TYPE_ACTIVE                 /*! The scan type (active or passive) */
};

Hi Bee Gee,

Verifying what is indicated, I see that you are right, it is already in active mode.

But I noticed something, I think it may be a limit of data that can be scanned, it only allows me to scan a maximum of 31 bytes, it is possible to increase the capacity so that its limit reaches 45 bytes.

line 304 RAK-APOLLO3-RUI/cores/apollo3/component/core/mcu/apollo3/uhal/uhal_ble.c at 2af4ff38da9835a70ffafbba736399560ac0c6d7 · RAKWireless/RAK-APOLLO3-RUI · GitHub

Tell me if I should only modify where it says 31 to 45 or if I should make the change somewhere else in this code.

greetings

I am not sure about this part.
The BLE part is from Ambiq and not open source (as far as I know). Same as for the Nordic nRF52 MCU’s with their Softdevice.

You can try to change the scan data size in the BSP and test it.

I have no BLE Beacons here so not much options to try it.

Hello Bee Gee,

I made the changes but it did not solve the beacon reading problem.

Could you consult with I+D if there is something I can modify to increase the maximum number of bytes.

since it can only read up to 31 bytes.

The beacon I am trying to read contains sensor data and it is the most necessary.

Currently it only brings me UUID, minor, major and RSSi, which is normal for a beacon without a sensor.

greetings.,

I will ask, but as I mentioned before, as far as I know, the BLE firmware is supplied by Ambiq and we include it as pre-compiled files, we cannot change anything in there.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.