Giter Club home page Giter Club logo

Comments (7)

werediver avatar werediver commented on May 27, 2024

@ealanhill I see you didn't tick the tried-doing-this-with-a-generic-BLE-scanner-app checkbox. Could you please confirm that a generic BLE scanner app (like nRF Connect mentioned in the template) reads out a long device name in full on the same device?

from flutter_reactive_ble.

ealanhill avatar ealanhill commented on May 27, 2024

@werediver Thank you for getting back to me! When I scan with nRF Connect, it gives me the version that is cutoff as well (using my Samsung Galaxy Note8). But, they label it as "Shortened Local Name".

Not having used nRF Connect is that a report?

It also seems like this is an Android specific limitation then?

from flutter_reactive_ble.

werediver avatar werediver commented on May 27, 2024

Not having used nRF Connect is that a report?

It sure is, but in many cases—as this one—that provides useful insights.

It also seems like this is an Android specific limitation then?

It looks like this, but it still may be worth checking whether there is an API or otherwise a way to get the full name.

@remonh87 Would you have a moment to check on this?

from flutter_reactive_ble.

ealanhill avatar ealanhill commented on May 27, 2024

@werediver @remonh87 Any more info I can provide to help look into this? Any steps I can take to check?

from flutter_reactive_ble.

remonh87 avatar remonh87 commented on May 27, 2024

@ealanhill this is an interesting question and it took me a bit of studying to find an answer to clarify the behaviour on Android.

The max size of a field in an advertisement packet for BLE is 31bytes. 2 of those are used for the header so this leaves you with 29bytes for the device name. The size of your device name 11111111-2222-3333-4444-123456789012 is 36 bytes which is too long. The size of the string 11111111-2222-3333-4444-12345 is exactly 29 bytes and this fits within the spec. For more details see for example: source1 and source2 .

I have really no clue why on iOS the name is not cut off that is a mystery to me. I did study the Android specs and also the implementation of the Android library we use and we do not cut off the name. So my guess is that it is limited by the chip of the phone.

from flutter_reactive_ble.

ealanhill avatar ealanhill commented on May 27, 2024

@remonh87 Thank you so much for your research and answer! That helps quite a bit

from flutter_reactive_ble.

remonh87 avatar remonh87 commented on May 27, 2024

You are welcome. For now I close this issue. Feel free to open it in case you found some other insights.

from flutter_reactive_ble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.