go-ble / ble

Bluetooth Low Energy for Linux / macOS
BSD 3-Clause "New" or "Revised" License
302 stars 108 forks source link

codegen comands update source #93

Open 1am opened 2 years ago

1am commented 2 years ago

Hello. Is there a source of json files for codegen https://github.com/go-ble/ble/blob/master/linux/tools/codegen/cmd.json ? I'm missing quite a few commands and was wondering where did the initial ones come from. Maybe they've been updated along Bluetooth spec updates over the years.

What puzzles me is that it comes from the same Github account, now deleted. Screenshot from 2022-04-06 20-27-39

It's also the same account as made the commands in https://github.com/paypal/gatt/tree/master/linux/cmd Screenshot from 2022-04-06 20-27-52

estutzenberger commented 2 years ago

Heya!

I didn't work on this code initially so I am uncertain of its history. As best I can tell, all of the JSON which generates the commands available in this library are in tools/codegen/*.json. If there are missing commands, I'm not aware of them or haven't needed them in anything that I've been working on. I'm happy to review a PR for missing commands if you wanted to update them.

As for the source of the files, my guess is they were added by hand directly from the Bluetooth specification. I'm not aware of any documents which provide the available command sets listed in the BT spec in a format that could be ingested and converted to meaningful JSON.