Comments (16)
While the baseline is in place, there are several limitations:
- There doesn't seem to be an easy way to actually include service UUIDs in the advertisement packet.
- There doesn't seem to be an easy way to actually override the ReadValue/WriteValue behavior in order to provide values.
- The notification behavior doesn't presently work.
If these three points are addressed, the service mode should work properly.
from go-bluetooth.
I also discovered that including the entire advertisement packet doesn't always advertise correctly if not everything was filled out; including just Type, ServiceUUIDs, and LocalName worked properly.
from go-bluetooth.
Based on your PR I would say that 2 is done. Do you have any suggestion on the other points ?
- Maybe can be enabled via an hci command or related to #25?
- Will check it, probably a communication issue on go-bluetooth side..
Thanks!
from go-bluetooth.
2 and 3 are done in the PR, actually; if you use UpdateValue it properly does notification now.
1 can be fixed by #25, yes; adding the UUIDs to ServiceUUIDs would do the trick.
from go-bluetooth.
Will see to work on #25 soon to close that issue, if you are interested in working on that let me know
from go-bluetooth.
I do actually need it for a project, but I'm stuck in client meetings right now; if you haven't gotten to it later this week I might take a stab at it.
from go-bluetooth.
For what it's worth, I managed to get advertisement working entirely over dbus (no need to use the btmgmt command), but I'm not 100% happy with the API I put together while testing; I don't quite think it fits with the rest of the existing API properly.
I can throw what I have your way to look at later if you'd like, though.
from go-bluetooth.
Yup yup, cross posting here 🥇
Please share, I have no particular need to keep that API approach and can eventually forsee a v2
In the meanwhile, I added an inital implementation and next step is probably to be bind at the service initialization
from go-bluetooth.
Awesome! My implementation had it as part of Application; when you initialized a service I had a new 'Advertised' field in the config struct, and then Application had a StartAdvertising where it would build an LEAdvertisement1 based on the app.config.name (for LocalName) and what services were flagged as Advertised, and register the advertisement.
from go-bluetooth.
Great, let me check the implementation. Mine is in https://github.com/muka/go-bluetooth/tree/dev
from go-bluetooth.
Mine's in https://github.com/packetdancer/go-bluetooth/tree/service-advertisement — feel free to grab whatever helps from there. :)
from go-bluetooth.
Only caveat in mine is that after you've called StartAdvertising on the application, you want to grab an Adapter1 and set the Discoverable and Powered properties to true.
The Application implementation of StartAdvertising also needs the Call functionality pulled over into api.* most likely, if my approach was followed.
from go-bluetooth.
Your code looks good to me, would you like to PR?
Thanks!
from go-bluetooth.
Let me pull in your implementation and add my features atop it, I think your inclusion of LEAdvertisementManager is a better design in keeping with the framework.
from go-bluetooth.
Pull request in!
from go-bluetooth.
Merged, kudos to @Packetdancer for the great contribution!
Closing #7 and #25. Let's open new ones in case of bugs or further features request
from go-bluetooth.
Related Issues (20)
- Question about Discovering IBeacon HOT 1
- Device1.GetManufacturerData() fails HOT 4
- List paired devices HOT 1
- Example with authorization HOT 4
- Bluez 5.65 support HOT 2
- Ignore missing fields in MapToStruct HOT 1
- "org.bluez.Error.AlreadyExists" faulire when adding second GATT Server HOT 5
- Missing tags for version 5.64 and 5.65 HOT 5
- Regarding the Listeners HOT 1
- Error: Properties.GetAll org.bluez.GattManager1: No such interface 'org.bluez.GattManager1' HOT 1
- media.NewMediaPlayer1 panics HOT 1
- generate stubs for 5.66 HOT 2
- Cannot create device object without opening Discover channel
- how can i use this callback on branch bluez/5.54? HOT 1
- GetAll method does not exist HOT 1
- Please generate version bluez-5.66.json HOT 4
- Advertised Services Do Not Show In Packet 5.55
- How to set it up so that it can be connected directly without pairing? HOT 1
- CharWriteCallback sender address?
- Device Properties Class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-bluetooth.