JuulLabs-OSS/cbgo

bug: panic on discovery of 32bit UUIDs

Opened this issue · 0 comments

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