Live data from Hacker News

Show HN: OpenBLE, Swagger for Bluetooth

demo.openble.org

11–20 of 45 posts

Re: Show HN: OpenBLE, Swagger for Bluetooth

#11

> Even though shunned by Apple and Mozilla, Web Bluetooth enjoys wide support and just works. That’s an interesting way to say Chrome Only feature but you shouldn’t care because Mozilla ran Firefox into 3%/ground and Safari doesn’t matter. IDK… to the point of the project… I guess that’s cool. But once you have defined and tested your GATTs, it hasn’t been my experience to come back to it a ton of times. I just wrote…

What justification is there for not implementing this across all browsers?

because there's still a huge argument about what features from the host system that the web browser should be able to deal with. Lots of people think that webusb, webserial, webbluetooth and similiar things are a security and/or privacy nightmare.

Re: Show HN: OpenBLE, Swagger for Bluetooth

#12
post #8
post #4

I use Nordic's app nRF Connect for this - last I used it it was fantastic. Nice to have alternative options though. I agree WebBluetooth is easily the sanest way to access BLE devices. The iOS API is not too bad either but then you have to deal with Apple. The Android API is terrible, and the Android Bluetooth stack is unreliable and buggy.

nrfconnect exposes the services, but if they arent registered with the bluetooth SIG then you won't have much more detail than the ids of characteristics and services and their data types. You won't know what the purpose of each service and characteristic is.

You can actually name them, but yeah you can't implement custom encoding/decoding logic. I don't think this thing lets you do that either though.

Re: Show HN: OpenBLE, Swagger for Bluetooth

#13
post #5

> Features > 1. Define your GATT services in YAML. Uh, nope, thank you.

I'll bite. What other format would you have chosen that's widely supported, easy to read and type by hand, and supports deeply nested data structures?

JSON5

Re: Show HN: OpenBLE, Swagger for Bluetooth

#14
One thing I’ve wanted to do for end to end testing purposes is to be able to make pretend Bluetooth devices from my Mac. I’ve not seen much to suggest a simple way to do this, does anyone know of anything that I can use to make my Mac Bluetooth look like a heart rate monitor, for example?

Re: Show HN: OpenBLE, Swagger for Bluetooth

#15

One thing I’ve wanted to do for end to end testing purposes is to be able to make pretend Bluetooth devices from my Mac. I’ve not seen much to suggest a simple way to do this, does anyone know of anything that I can use to make my Mac Bluetooth look like a heart rate monitor, for example?

IIRC, last time I looked at this you needed special permissions to do anything outside the box with bluetooth on Apple.

It's technically straightforward on linux, or using a BBC microbit (there is example code in the Nordic SDK).

Re: Show HN: OpenBLE, Swagger for Bluetooth

#16
post #4

I use Nordic's app nRF Connect for this - last I used it it was fantastic. Nice to have alternative options though. I agree WebBluetooth is easily the sanest way to access BLE devices. The iOS API is not too bad either but then you have to deal with Apple. The Android API is terrible, and the Android Bluetooth stack is unreliable and buggy.

Nordic is easily the best way for BLE/ANT+, however now even they are bolting on WiFi (for non-power-limited cases). For standard profiles there's generally an example in the SDKs.

Re: Show HN: OpenBLE, Swagger for Bluetooth

#17

One thing I’ve wanted to do for end to end testing purposes is to be able to make pretend Bluetooth devices from my Mac. I’ve not seen much to suggest a simple way to do this, does anyone know of anything that I can use to make my Mac Bluetooth look like a heart rate monitor, for example?

BTLE is much simpler than traditional Bluetooth. It’s just a matter of exposing GATT services with well-known IDs. If you search hard enough, you can probably find details for heart rate monitor service definitions. Then you can either programmatically expose services with those IDs or maybe find a helper app to do it for you. I used to use a free app for iPhone that did this but then they decided to start charging a paid subscription, and I can’t remember the name of it anymore.

Re: Show HN: OpenBLE, Swagger for Bluetooth

#18

One thing I’ve wanted to do for end to end testing purposes is to be able to make pretend Bluetooth devices from my Mac. I’ve not seen much to suggest a simple way to do this, does anyone know of anything that I can use to make my Mac Bluetooth look like a heart rate monitor, for example?

My tool of choice for this is LightBlue. It's not fully cross platform, unfortunately, but it works great on Apple devices. (https://apps.apple.com/us/app/lightblue/id557428110)

I've also dabbled with bleno and noble for emulating and/or communicating with peripheral and central devices, respectively. (https://www.npmjs.com/package/@abandonware/bleno)

Re: Show HN: OpenBLE, Swagger for Bluetooth

#19
Is there a HID over GATT YAML?

From https://news.ycombinator.com/item?id=37522059 :

> https://github.com/DJm00n/ControllersInfo: HID profiles for Xbox 360, Xbox One, PS4, PS5, Stadia, and Switch

> "HID over GATT Profile (HOGP) 1.0" https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?d...

Re: Show HN: OpenBLE, Swagger for Bluetooth

#20

I really wish WebBluetooth (and WebUSB, etc) was more widely supported. It really opens the door for so many cool applications.

Unfortunately it also opens up the door for so many new exploits.

A lot of hardware has very minimal protection against attacks, because the general idea is that anyone able to run software on a machine could also just trivially physically attack the device itself. The result is that you can often update device firmware over Bluetooth or USB.

Allowing random websites to suddenly have unlimited access to poorly-secured devices is a terrible idea. Google's opinion seems to be that a permission popup is enough, but you get basically identical popups for a website wanting to send you notifications, get your current location, or completely own your physical hardware.

Post reply on HN