| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Experimental: Location and Navigation Service
This information applies to the following SoftDevices: S130, S132, S332

This module implements the Location and Navigation Service with the corresponding set of characteristics. During initialization, it adds the Location and Navigation Service and a set of characteristics specified by the ble_lns_init features. If features for Location and Speed, Position Quality, or Navigation are needed, the user must provide the corresponding data structures.

Notification of location and speed is performed when the application calls the ble_lns_loc_speed_send() function and the corresponding CCCD characteristic is configured for notification.

The control point supports the following functionality:

- Set total distance.
- Mask out features from the location and speed characteristic notifications.
- Control the navigation state. Supported commands are: Stop Start Pause Continue Skip waypoint Continue from nearest Stop and pause will stop navigation. Start, continue, and continue from nearest will start navigation. Skip waypoint will not affect the navigation state.
- Request the number of routes stored.
- Get the name of a route.
- Select a route.
- Set the fix rate.
- Set elevation. Control point writes that affect the state of the Location and Navigation Service are sent back by the corresponding callback function. The control point can perform an action only when its CCCD is configured for notification.

Notification of navigation is done when the application calls the ble_lns_navigation_send() function, navigation is running, and the corresponding CCCD characteristic is configured for notification.

Routes can be added and removed using the functions ble_lns_add_route() and ble_lns_remove_route().

If an event handler is supplied by the application, the Location and Navigation Service will send Location and Navigation Service events to the application.

Note
  The application must propagate BLE stack events to the Location and Navigation Service module by calling ble_lns_on_ble_evt() from the SoftDevice Event Handler callback.