assaabloy-ppi / salt-channel

The specification and the reference implementation of Salt Channel - a simple, light-weight secure channel protocol based on TweetNaCl by Bernstein.
MIT License
14 stars 11 forks source link

Suggested transport for BLE? #27

Closed nocko closed 4 years ago

nocko commented 6 years ago

The V2 spec briefly mentions BLE; but not a recommendation for a specific stream transport over BLE.

The two obvious ones I can think of are:

  1. Salt Channel via TCP/6LoWPAN-over-BLE
  2. Custom GATT Service implementing a serial port type profile

It's unclear how discovery would work with option 1, where as in option 2 the GATT service UUID in the advert seems straight forward and low power.

If a custom service is chosen, then the GATT Service / Characteristics should be documented in the spec. I suppose that there's an argument to be made that this doesn't belong in the spec, but it'd be nice for interoperability in general and collaborators working with Assa Abloy specifically if it were documented and prominently linked in/near the spec.

sijohans commented 6 years ago

I can recommend the UART emulation over BLE used by Nordic Semiconductors and Adafruit. There are a lot of hardware and software that you easily could adapt and use with salt-channel.

Your first options sounds interesting.

franslundberg commented 5 years ago

Why not specify openly what we do use at ASSA ABLOY today? We would need to split the specs. Break-out the public parts and define Salt Channel-over-BLE. Shouldn't be a problem, I think. Actually, it does make sense. Would be great to have a useful open-source implementation of Salt Channel over BLE.

sijohans commented 5 years ago

I agree, but should that include the advertisement part or just the part once connected?

nocko commented 5 years ago

I think the advertisement is necessarily device specific. Publishing the BSS/WSP specification would be enough to encourage broadly compatible implementations.

The AA BSS service UUID, advertising format and WTP could be withheld for "certified" products designed to work with specific AA products.

franslundberg commented 4 years ago

I think we need to close this one. What we have internally is still proprietary. The recommendation of using "the UART emulation over BLE used by Nordic Semiconductors and Adafruit" is good.

@sijohans Any other opinion?

sijohans commented 4 years ago

I agree on that, One would also need how to specify how to chunk longer packages than the negotiated MTU. E.g. we have had success using something like { size[4] || data[n] } and then just chunking this as many times as necessary.