ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

johan.morin
Posts: 3
Joined: Sun Nov 20, 2022 8:10 pm

ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby johan.morin » Sun Nov 20, 2022 8:41 pm

Hi there fellow coders,

For a work-related project, I developed a program using the ESP32 DevKitC V2 to scan for smart-beacons with specific MAC-Addresses. Everything was working fine until I decided to buy some DevKit V4. On the DevKit V4, it still scans some BLE signals but somehow not anymore from the smart-beacons I need to track. The smart-beacons are the "Smart Beacon Go Mini" from blukii (https://blukiishop.com/blukii-SmartBeacon-Go-Mini/en). The smart-beacons only act as BLE advertisers and advertise every second. I'm not trying to connect to them.

My questions are:
- Do the DevKit V4 have different BLE capabilities than the V2? (somehow it seems but couldn't find anything googling)
- Any idea to solve this problem?

I develop using Platformio on VSCode.
platform.ini:

Code: Select all

[env:esp32dev]
framework = arduino
platform = espressif32
board = az-delivery-devkit-v4
board_build.partitions = huge_app.csv
monitor_speed = 115200
lib_deps =
	h2zero/NimBLE-Arduino@^1.4.0
main.cpp:

Code: Select all

#include <Arduino.h>
#include "NimBLEDevice.h"

const int NUMBER_SCAN = 40; // number of scans to perform
const int SCAN_DURATION = 1.1; // duration of a scan in seconds

NimBLEScan *pBLEScan;

void collectAdvertisingPackets()
{
    // scan NUMBER_SCAN times
    for (int i = 0; i < NUMBER_SCAN; i++)
    {
        NimBLEScanResults result = pBLEScan->start(SCAN_DURATION);
        // number of advertising devices found
        int count = result.getCount();

        Serial.printf("Total devices found: %d\n", count);

        // for each device found
        for (int j = 0; j < count; j++)
        {
            NimBLEAdvertisedDevice device = result.getDevice(j);
            std::string macAddress = device.getAddress().toString();

            Serial.println(macAddress.c_str());
        }

        pBLEScan->clearResults(); // delete results from BLEScan buffer to release memory
    }
}

void setup()
{
    // baudrate for serial communication
    Serial.begin(115200);    

    // BLE scan
    NimBLEDevice::init(""); // initialize the ESP32 microcontroller as a BLE device
    pBLEScan = NimBLEDevice::getScan();
}

void loop()
{
    collectAdvertisingPackets();
}
Any advice is greatly appreciated :)

ESP_Minatel
Posts: 364
Joined: Mon Jan 04, 2021 2:06 pm

Re: ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby ESP_Minatel » Tue Nov 22, 2022 12:18 pm

Hi,

Can you confirm the module present on your DevKitC V4? Is the ESP32-WROVER-E?

johan.morin
Posts: 3
Joined: Sun Nov 20, 2022 8:10 pm

Re: ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby johan.morin » Tue Nov 22, 2022 3:03 pm

Hi ESP_Minatel,

on the module itself it is written ESP32-WROOM-32.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby chegewara » Wed Nov 23, 2022 5:58 pm

Can you post images/pictures of the board?

johan.morin
Posts: 3
Joined: Sun Nov 20, 2022 8:10 pm

Re: ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby johan.morin » Wed Nov 23, 2022 7:10 pm

Hi chegewara,
I could post some pictures tomorrow from work but I think a link to the model from the shop is even better :) (should have done it straight in the first post).
https://www.az-delivery.de/en/products/ ... v-kit-c-v4
The datasheet is at this link: https://cdn.shopify.com/s/files/1/1509/ ... 1615364587

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 DevKitC v4 not scanning **some** BLE Signals (but ESP32 DevKitC V2 does)

Postby chegewara » Thu Nov 24, 2022 3:46 am

Ok. I thought it may be board with external antenna (it happen earlier here, on forum).

Who is online

Users browsing this forum: Corand and 90 guests