juullabs-oss / cbgo Goto Github PK
View Code? Open in Web Editor NEWGo bindings for CoreBluetooth
License: Apache License 2.0
Go bindings for CoreBluetooth
License: Apache License 2.0
I was trying to call the DiscoverServices()
in order to retrieve only a specific list of services based on the UUIDs. However, it was consistently refusing to return any results.
This is the code that I was attempting to use:
cbuuids := []cbgo.UUID{}
for _, u := range uuids {
uuid, _ := cbgo.ParseUUID(u.String())
cbuuids = append(cbuuids, uuid)
}
d.prph.DiscoverServices(cbuuids)
If I pass an empty slice it returns all services as expected. However, when I try to use a slice of UUID strings, it does not return any results.
Please see tinygo-org/bluetooth#50
Hey,
I'm trying to connect to a device using the example program. Connection works good but I don't retrieve any services nor characteristic. I'll get the correct list of services and characteristics with for example https://github.com/jnross/Bluetility
Any idea on what can be the problem?
/Erik
Hello!
Thanks for the great library!
While 32bit UUIDs aren't super common, they are out there; as-is, cbgo will panic if one's discovered https://github.com/JuulLabs-OSS/cbgo/blob/master/core.go#L104, so simply being in an environment where a 32bit UUID device is powered on will break anything using this library.
I've proposed a patch #3 to address this; it simply "upscales" a 32bit UUID to a 128bit UUID by appending the 128bit base UUID. It's tested locally and working; in fact, I'm using it to connect to a device broadcasting a 32bit UUID.
I wasn't sure how you might want this structured, so I figured I'd keep it dumb simple.
Cheers,
Garrett
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.