-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6LoWPAN over BLE (RFC7668) #1031
Comments
From discussions over Matrix with @Dirbaio it appears I just need a new medium for 6LowPan without ieee802154 headers, this can then be shipped over the L2CAP channel. I just need to figure out if the IPv6 header compression is similar enough to just work on BLE as well |
|
We should indeed rewrite parts of the wire IPHC file. The rules differ quite a lot for compression and decompression of the source and destination address, and only using an EUI64 address will not be enough. For example, for IEEE 802.15.4, the compression is based on the use of the short link layer address, the extended link layer address, or the use of the EUI64 address, while this is not the case for BLE. Also note that Neighbor Discovery Optimization for 6LoWPAN is not implemented yet (https://datatracker.ietf.org/doc/html/rfc6775), which defines how to handle the 6LoWPAN Context Option. This option MUST be used by the 6LBR when sending a Router Advertisement. However, we are not able yet to process it. As @Dirbaio says, we need a new medium that only uses 6LoWPAN compression and adapt the compression and decompression for the source and destination address. |
Given the compression differs between the 6LoWPAN mediums, does a 6LoWPAN medium actually make sense by itself? |
We can do that by using the device capabilities. |
Sure but in that case the medium would have to be BLE, not 6LoWPAN. Unless you're thinking |
After some more reading I've figured out what changes need to be made to the iphc file. |
I'm looking at implementing this with an ESP32 and trouble.
From reading various RFCs it seems to be a somewhat straightforward affair.
One just needs a L2CAP channel and a minimal GATT service for advertising, which trouble supports.
The network forms a star topology where the "Central" is the router and the "Peripheral"s are nodes in the network.
All communications between nodes/peripherals happen via the router/central.
Central is responsible for connecting to nodes advertising themselves as nodes.
Each node (including the router) has a link-local IPv6 address derived from the BLE mac address, but can still register additional non-link-local addresses using standard IPv6 protocols like Neighbour Solicitation (NS).
The L2CAP channel takes care throttling (with the credits system) and disassembly/re-assembly.
The IPv6 headers sent over BLE are compressed in the same format used for IEEE 802.15.4, but the conditions for when to compress are different.
Multicast is an O(n) operation (where n is the number of nodes) rather than a O(1) operation, due to the star topology.
I've mostly gotten the mac logic down, I just need a networking stack to handle the networking.
I looked into implementing the Device trait and I'm trying to figure out which medium to use. Do I need to PR a BLE medium or can I just use the Ip medium.
I'm still trying to figure out if I need to modify smoltcp to work with BLE or if I can do it all behind the
Device
trait.The text was updated successfully, but these errors were encountered: