Hacker News new | ask | show | jobs
by seanalltogether 985 days ago
I don't know about other people, but I've worked for 2 companies now that don't use numerous GATT characteristics to handle numerous operations. They use 1 characteristic with a notify handler and specify numerous operations to go over that characteristic. Discovery time is the reason for doing this. So while this ble swagger type thing might be valuable for simple devices, it might not relevant to more heavy users of ble.
2 comments

I am of the opinion that a community-backed, portable library of encoders/decoders for a single L2CAP stream or notified characteristic would be far more useful than numerous "standardized" services. I often find the implementation lacking and have to implement something custom, which is nearly always easier over a single characteristic. Something in C++ or Rust would be ubiquitous enough that it could have one counterpart in firmware and another in Android/iOS/WASM. Many GATT characteristics do not handle compression or time-series data well, and there is no shim without going custom over your own characteristics. When I need something optimal, I am probably not using a standard BLE service.
Same here. One company did use a handful of GATT characteristics, but some of them still served a dozen different purposes.