Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdvertisementData contains empty values on iOS #54

Closed
ryanhanks opened this issue Mar 19, 2018 · 17 comments
Closed

AdvertisementData contains empty values on iOS #54

ryanhanks opened this issue Mar 19, 2018 · 17 comments
Assignees

Comments

@ryanhanks
Copy link

Hi,

On iOS, I'm not seeing any data for the following properties on AdvertisementData in my ScanResult event stream handler:

  • localName
  • manufacturerData
  • serviceData

I observed this to be consistent over ScanResults for responses for 19 different devices.

localName returns an empty String, and manufacturerData and serviceData return an empty List<int>.

Let me know if I can provide more details or if I can help in troubleshooting, debugging, or verifying a fix.

Thanks.

@jack4git
Copy link

Confirming this behavior. The information is key, especially serviceData, otherwise you have to connect to devices to determine what services they support.

@pauldemarco pauldemarco self-assigned this Apr 2, 2018
@pauldemarco
Copy link
Owner

Looking into this now.

Not good news, as this is working on my end (using iPhone 8 plus and nrf52 dev board with nRF Connect for Desktop).

After setting up the advertisement data in nRF Connect, I'm seeing all of the values on Dart side.

Have you confirmed this information is showing up in other Bluetooth apps (nRF Connect for iOS)?

@jack4git
Copy link

jack4git commented Apr 3, 2018

Paul, I’m also seeing some devices with advertisement data. Guessing it’s showing up if it’s there, but haven’t got around to changing the settings on one of my BLE devices yet to confirm.

@jack4git
Copy link

Hey Paul,

I am now able to confirm that there's advertising packet data that I can't get to from flutter_blue.

My BLE device is include a Service UUID in its advertising packet, which will allow my app to know that a given service is available BEFORE connecting. I'm guessing this should be coming through in ScanResult.advertisementData.serviceData ...

I can see this data coming from my device using various apps such as Nordic's nRF Connect, where it looks like this:
img_0569
When I access this and various other properties of AdvertisementData for my device in flutter_blue, all are empty. When I look at the same info for "all devices in range" I see just one device out of ~20 that shows a non-empty value for serviceData. I am able to see localName for my device. (I don't see other values but those aren't being sent).
I can provide more info as needed.

@jack4git
Copy link

Paul, following up on this one --

@francisraj
Copy link

hi,
i'm trying to create an android and ios app in flutter for ble operations, i need to take all bytes of advertisement data while scanning time and i need to make a condition check based on the advertisement bytes.
i can get all byte using NRF CONNECT (advertisement packet 1 and 2 total is 62 byte data),
how to get from this?

nrf scan result

could you please help me,..

@hbsis-eduardo
Copy link

This error is also happening on Android. I'm using the example app to run on API 22.
I just downloaded the example and ran it.

@pauldemarco
Copy link
Owner

@jack4git Sorry for the delay. If you're still in need of a fix, please try out the latest version 0.4.0 on pub and let me know how it goes.

Thanks!

@francisraj
Copy link

francisraj commented Aug 20, 2018 via email

@pauldemarco
Copy link
Owner

@ryanhanks Just confirming, is this issue fixed for you?

@GauravPatni
Copy link

GauravPatni commented Feb 8, 2019

Paul,
I am also facing same issue . After scan Service data is null . ( flutter_blue , Master -
Latest commit 6f6fa30 )

Device : Mi Note 4 LTE , Android version 4.4.4

Thanks,
Gaurav

@robomike
Copy link

robomike commented Feb 25, 2020

Hi, I have the same issue. using the latest build. Any updates? Samsung galaxy s with andriod 9

@PeteSwad
Copy link

PeteSwad commented May 8, 2020

Hi

I have found that the ScanResult serviceData is overwritten by the devices scan response service data if it contains values.

Ideally ScanResult AdvertisingData would return both the ScanResult and ScanResponse service data in separate Lists. I guess this depends on how the OS's handle the Scan Response data though.

I hope this helps someone

Pete

@novas1r1
Copy link

Hi,
having the same issue but on Android. ServiceData and manufacturerData are empty for one of 3 different devices.
Using Pixel 2 with Android 10 and Flutter 1.17.1

@recvec
Copy link

recvec commented Jul 31, 2020

having the same issue but on Android 4.4.4, nRF Connect shows this data

@Yinten
Copy link

Yinten commented Jan 26, 2022

Anyone find anything out on thiis?

@AymenXD
Copy link

AymenXD commented Feb 24, 2023

any fix guys? this is an example:

Android (works fine) :
android

iOS:
ios
same here :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests