[riot-notifications] [RIOT-OS/RIOT] pkg/nimble: add IP-over-BLE support via netif/GNRC (#11578)
notifications at github.com
Fri May 24 18:05:52 CEST 2019
### Contribution description
This PR provides support for IP-over-BLE by providing a GNRC-netif wrapper for Nimble. The provided behavior is should be conform to RFC7668 and the Bluetooth IPSP profile, but some details do still need to be verified.
The PR provides an application for 'fully manual' control of BLE behavior. Other means for BLE connection management (e.g. towards [ipv6-mesh-over-ble](https://tools.ietf.org/html/draft-ietf-6lo-blemesh-05)) will follow in upcoming PRs.
- code (architecture, structure, implementation) is functional and ready to be looked at
- a lot of documentation (high-level and doxygen) is missing (hence the WIP label)
- some debug helpers are left in the code, will remove them once everything runs stable
I PR this code now, as it would be wonderful if someone could look over the code to see if there are some critical things I overlooked. I've been staring at this stuff for too long now and a bad tunnel vision :-)
### Testing procedure
The provided `nimble_gnrc` application provides a mighty `ble` shell command, that can be used for advertising, scanning, and connecting to other nodes. Once at least two nodes are connected, all the IP magic (udp, icmp, ifconfig, rpl) is available...
At least in theory, this code should also work for connecting a RIOT BLE node to Linux. But I did not try this, yet.
### Issues/PRs references
rebased on #11296
- using the unpatched Nimble version a node can only have a single connection. If a second connection is opened, Nimble fails to allocate a second connection context from its context buffer (see `nimble/host/src/ble_hs_conn.c` -> `ble_hs_conn_alloc()`). I can't tell why, but it seems the memblock list for `ble_hs_conn_pool` is corrupted somehow. But when renaming that var to `_ble_hs_conn_pool` everything works again. So really now idea yet, what is causing this...
- I did not fully verify, that GNRC behaves fully to spec of RFC7668 (e.g. neighbor discovery options...)
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* ble/nimble: add support for build-in IPSS service
* pkg/nimble/scanlist: implement _get_by_pos()
* boards/nrf52dk: add nimble_netif dependency
* net/ble.h: add l2cap cid and gapp svc id constants
* pkg/nimble: add netif wrapper
* examples: add basic nimble GNRC exmaple
* gnrc/l2util: add nimble opt for addr resolution
-- File Changes --
M boards/nrf52dk/Makefile.dep (2)
A examples/nimble_gnrc/Makefile (51)
A examples/nimble_gnrc/README.md (0)
A examples/nimble_gnrc/app.h (44)
A examples/nimble_gnrc/ble.c (280)
A examples/nimble_gnrc/main.c (53)
A examples/nimble_gnrc/nimble.c (0)
A examples/nimble_gnrc/udp.c (191)
M pkg/nimble/Makefile (6)
M pkg/nimble/Makefile.dep (6)
M pkg/nimble/Makefile.include (15)
M pkg/nimble/contrib/nimble_riot.c (11)
A pkg/nimble/netif/Makefile (3)
A pkg/nimble/netif/include/nimble_netif.h (164)
A pkg/nimble/netif/include/nimble_netif_conn.h (100)
A pkg/nimble/netif/nimble_netif.c (621)
A pkg/nimble/netif/nimble_netif_conn.c (202)
M pkg/nimble/scanlist/nimble_scanlist.c (9)
A pkg/nimble/svc.ipss.mk (3)
M sys/include/net/ble.h (22)
M sys/net/gnrc/netif/gnrc_netif_device_type.c (4)
M sys/net/link_layer/l2util/l2util.c (9)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications