question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unable to parse scan record when using startScan(filters, settings, callback)

See original GitHub issue

Hello everyone,

I am having some issue with Android BLE and I tried using the standard Android BLE API and this one as well but the results are the same.

We have some devices that we can only see in the nRF Connect android app when we enable the Offloaded scan batching. If I am not wrong, this can be achieved by applying some delay using the setReportDelay() method in setting builder. Without any settings and filters I can see Bluetooth devices but when I try to apply any settings or filters, it doesn’t show anything and I see the following error messages in logcat:

// some actual data is being replaced by x, y, z
unable to parse scan record: [x, y, z]
unable to parse scan record: [x, y, z]
unable to parse scan record: [x, y, z]
unable to parse scan record: [x, y, z]

Does anyone knows how to solve it or anyone have any idea how to achieve what nRF Connect app is doing when you enable Offloaded scan batching.

Thanks you very much. If anyone interested, I can provide you some example code that reproduce the problem. I would have shared it already but I don’t know if its a bug or related to something obvious that I am doing wrong.

Cheers. Waqar Rashid

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wickywakacommented, Oct 25, 2019

That means I shouldn’t include anything about useHardwareBatchingWhenSupported(false)? I tried using just the

        settings = new ScanSettings.Builder()
                .setReportDelay(1000)
                .build();

But had no success. It still drops the adverts.

0reactions
philips77commented, Jun 4, 2021

Hi, Sorry for 1.5 year delay. I hope you managed to solve the issue. I’m closing it due to inactivity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android "Error: unable to parse scan record" when using ...
What I want to know is that how do I make sure that the callback is called when scansettings are applied. I know...
Read more >
[4.3] BLE filtering in startLeScan(UUIDs, callback) doesn't ...
From my central device I set the ScanFilter to the same UUID on startScan(...), and it never works. To get it to work,...
Read more >
BluetoothLeScanner - Android Developers
Start Bluetooth LE scan with default parameters and no filters. ... 0 for success or an error code from ScanCallback if the scan...
Read more >
Scanning for BLE Devices - Developer Help
To scan BLE peripheral devices, the startScan() method is used by the app. void startScan(List<ScanFilter> filters, ScanSettings settings, ScanCallback callback).
Read more >
service/test/low_energy_scanner_unittest.cc - platform/system/bt
you may not use this file except in compliance with the License. ... EXPECT_FALSE(le_scanner_->StartScan(settings, filters));.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found