nRF51 IoT SDK
|
Exposing Bluetooth devices outside the link-local network requires distributing a global IPv6 prefix to the connected devices. On Linux, you can use the Router Advertisement Daemon for this purpose. RADVD can periodically or on solicitation send a Router Advertisement message.
To communicate outside of the local network, global IPv6 addresses must be configured. There are two possibilities how to obtain these addresses: stateful auto-configuration (using DHCPv6) and stateless auto-configuration. Both methods rely on a router that sends information about the used method. This user guide describes how to use stateless auto-configuration.
Figure 1 illustrates how an IPv6 global address is constructed using stateless auto-configuration.
IPv6 stateless auto-configuration requires the use of Router Advertisement (RA) messages. A Linux application that makes the system act as a router and supports sending RA messages is RADVD (Router Advertisement Daemon). RADVD also listens to Router Solicitation (RS) messages and automatically responds to them with RA.
If you followed the instructions for Installing a 6LoWPAN enabled Linux kernel and required modules, RADVD is already installed. Otherwise, install it:
The RADVD configuration file is located in /etc/radvd.conf
. See the following configuration for an example on how to disseminate the prefix 2001:db8::/64 over the bt0 interface.
Description of flags:
Run RADVD as follows:
In some Linux kernel versions, the prefix cannot be assigned automatically to the btX interface as described above. Instead, you can use the following command:
Alternatively, you can set the interface parameter accept_ra to 2. For example:
However, Linux does not add a route to this prefix automatically.