Giter Club home page Giter Club logo

Comments (6)

jeroen1602 avatar jeroen1602 commented on August 20, 2024

Looking at the Bluetooth web specification there seems no way to change or even request the MTU size. So if I read it correctly there is no way currently to support this.

https://webbluetoothcg.github.io/web-bluetooth/#ref-for-exchange-mtu

from flutter_web_bluetooth.

lyricdon avatar lyricdon commented on August 20, 2024

Thanks for your reply!
Er..I have a problem, when using the web bluetooth, some data can write success, but some can not with the same character, seem like my device ignore that. The api told me write success, but device doesn't work
And I tried write the same data by my phone to the device, and It works
Did the web bluetooth have some unknown limit when write data to character?

The data success:
[2, 2, 242, 1, 0, 40, 55, 69, 68, 70, 53, 54, 67, 68, 65, 57, 57, 68, 69, 52, 49, 48, 55, 65, 52, 51, 51, 57, 67, 48, 53, 67, 69, 68, 65, 55, 55, 49, 52, 68, 70, 54, 55, 53, 51, 66, 48, 3]
The data failed:
[83, 75, 67, 70, 71, 123, 34, 109, 97, 99, 34, 58, 34, 54, 54, 55, 48, 67, 69, 66, 65, 34, 44, 34, 103, 114, 111, 117, 112, 34, 58, 56, 48, 48, 49, 44, 34, 114, 101, 115, 116, 97, 114, 116, 34, 58, 49, 125]

from flutter_web_bluetooth.

lyricdon avatar lyricdon commented on August 20, 2024

my code:
flutter_web_ble

from flutter_web_bluetooth.

lyricdon avatar lyricdon commented on August 20, 2024

Hi, do u have any suggestion?

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

It's difficult to see what your error is precisely, I did see this in the specification:

If bytes is more than 512 bytes long (the maximum length of an attribute value, per Long Attribute Values) return a promise rejected with an InvalidModificationError and abort these steps.

But your data doesn't seem to be longer than that limit.

What I can suggest you try is using writeValueWithoutResponse and seeing if that fixes it.

I'm also not sure if this line properly waits for the device to be connected, so you may just be sending data too early.

from flutter_web_bluetooth.

lyricdon avatar lyricdon commented on August 20, 2024

I tried, don't work, the result is still one success, the other fail with nothing happened
Thanks a lot.

from flutter_web_bluetooth.

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.