lego-ble-wireless-protocol-docs icon indicating copy to clipboard operation
lego-ble-wireless-protocol-docs copied to clipboard

Machine readable specification of the protocol

Open janvrany opened this issue 4 years ago • 2 comments

Hi,

is there any kind of machine readable specification of the protocol? This would be extremely useful to build custom client libraries such as pylgbst, bricknil, wireshark dissectors, you name it. Now one has to manually transcribe this document into a code instead of generating it which is tedious and error-prone.

janvrany avatar Jan 29 '20 09:01 janvrany

It such really worth the effort? Who guaranties the generator is without errors? Who guaranties that the specification is technically sound and matches implementation? You have to test and review anyway.

hasselmm avatar Jan 29 '20 10:01 hasselmm

Who guaranties that the specification is technically sound and matches implementation? You have to test and review anyway.

Nobody, just like nobody guarantees this textual documentation (esentially a prose) is sound and matches the implementation. Sure you can have a bug in spec, but then, fixing bug in the spec at one place fixes it for all consumers.

Who guaranties the generator is without errors?

Nobody, just like nobody guarantees human-written translation of this textual documentation into a code is without errors. Sure you can have a bug in generator, but often generators are smaller than the code they generate.

It such really worth the effort?

I personally have no doubts about that. I use machine-readable formal ISA specs on nearly daily basis to automatically synthetise instruction encoder and decoder. GCC uses machine-readable formal specs to synthetise assembler, disassembler and simulator from single ISA specification.

janvrany avatar Jan 29 '20 22:01 janvrany

Closed because because of lack of interest.

janvrany avatar Nov 09 '23 20:11 janvrany