Giter Club home page Giter Club logo

Comments (12)

ihorkozar avatar ihorkozar commented on August 20, 2024

As far as I understand the problem is actual and not solved (

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

That is correct.

I don't have access to an iPhone or a Mac to debug this so it would be appreciated if someone could try and debug this

from flutter_web_bluetooth.

ihorkozar avatar ihorkozar commented on August 20, 2024

I can report that through this browser, the iPhone can work with bluetooth web.
In my case, I send data to the bluetooth device and everything works.
Perhaps this information will be useful to someone.

from flutter_web_bluetooth.

rohitsangwan01 avatar rohitsangwan01 commented on August 20, 2024

@jeroen1602 am working with flutterWebBluetooth on Bluefy browser , and after little debugging ,
when we call ,
service.getCharacteristic(characteristicId) or getCharacteristics list method , we get this error
Unsupported operation : JSObject does not have broadcast

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

Thanks for the help @rohitsangwan01
That error is probably being thrown at this line

throw UnsupportedError('JSObject does not have broadcast');

The Bluefy browser probably doesn't have the Bluetooth API as far implemented as this library expects. Can you try and remove this check on a local copy and see if it works then? I have a feeling that maybe some other features are also not implemented and will need additional exceptions.

from flutter_web_bluetooth.

rohitsangwan01 avatar rohitsangwan01 commented on August 20, 2024

@jeroen1602 i tried commenting one by one , upto half of the properties , and all were throwing errors , so assuming Bluefy does not have these APi's to get Characteristic Properties, but after commenting out this Part , all features worked perfectly on Bluefy

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

@rohitsangwan01 are none of the properties supported or just very few of them?

Because if it is none then the whole properties object should be made optional in the service. Otherwise all the properties that it doesn't support should be made optional as well as some hasPropertyX methods added.

Could you create a list of the properties it does support?

from flutter_web_bluetooth.

rohitsangwan01 avatar rohitsangwan01 commented on August 20, 2024

@jeroen1602 i tested all of them one by one , and none of them worked

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

@rohitsangwan01 then it's weird it doesn't just fail on this line

https://github.com/jeroen1602/flutter_web_bluetooth/blob/master/lib/web/web_bluetooth_remote_gatt_characteristic.dart#L496-L497

That would suggest that there is a properties object, but it is just completely empty.

My suggestion is to add a hasProperties method to the characteristic and try to detect if the characteristic has an empty properties object and make the properties field return a NativeAPINotImplementedError error if this is the case and the user still tries to retrieve it.

We should also figure out where the properties are being retrieved from because as far as I can see it shouldn't be parsed in the constructor. So it should only fail if the developer explicitly calls it.

from flutter_web_bluetooth.

rohitsangwan01 avatar rohitsangwan01 commented on August 20, 2024

A temporary fix for now
#29

from flutter_web_bluetooth.

jeroen1602 avatar jeroen1602 commented on August 20, 2024

I added a more permanent fix in #37.

So I believe it should not work for the Bluefy browser.

I also did some looking around and I believe the Bluefy browser is based on this Github project: https://github.com/daphtdazz/WebBLE this will be useful for future reference

from flutter_web_bluetooth.

rohitsangwan01 avatar rohitsangwan01 commented on August 20, 2024

I also did some looking around and I believe the Bluefy browser is based on this Github project: https://github.com/daphtdazz/WebBLE this will be useful for future reference

by using some references from WebBLE , i created something similar for flutter
https://pub.dev/packages/web_view_ble
so using my package , we can build a browser for IOS/android which can support ble

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.