|
| 1 | +.. _location_services: |
| 2 | + |
| 3 | +Location services |
| 4 | +################## |
| 5 | + |
| 6 | +.. contents:: |
| 7 | + :local: |
| 8 | + :depth: 2 |
| 9 | + |
| 10 | +The Amazon Sidewalk Location Library provides an API that automatically selects the most power- and time-efficient location mechanism based on available hardware and network conditions. |
| 11 | + |
| 12 | +Overview |
| 13 | +******** |
| 14 | + |
| 15 | +The Amazon Sidewalk Location Library is available in the Amazon Sidewalk SDK v1.19 and later, and it enables Sidewalk customers to use a range of cloud-based location solvers. |
| 16 | +It also provides better control to configure and override the mechanism used to determine location as required. |
| 17 | + |
| 18 | +Supported Location Methods |
| 19 | +=========================== |
| 20 | + |
| 21 | +The location library supports three types of location resolution methods: |
| 22 | + |
| 23 | +* Sidewalk Network Location over Bluetooth LE - Uses existing Bluetooth LE connections to determine location through the Sidewalk network. |
| 24 | +* Wi-Fi Scan - Scans for nearby Wi-Fi access points and sends MAC addresses to the cloud for location resolution. |
| 25 | +* GNSS Scan - Uses Global Navigation Satellite System to collect satellite vehicle data for coordinate resolution. |
| 26 | + |
| 27 | +These methods are supported on two available link types: |
| 28 | + |
| 29 | +* Bluetooth LE |
| 30 | +* LoRa (Long Range) |
| 31 | + |
| 32 | +.. note:: |
| 33 | + FSK with Wi-Fi and GNSS scanning enabled is not currently supported. |
| 34 | + |
| 35 | +Wi-Fi and GNSS scanning use the Semtech LoRa Basics Modem middleware to manage and perform scans on the device. |
| 36 | + |
| 37 | +.. list-table:: Hardware and Library Requirements for Location Methods |
| 38 | + :header-rows: 1 |
| 39 | + |
| 40 | + * - **Location Method** |
| 41 | + - **Required Hardware** |
| 42 | + - **Supported Sidewalk Library Variants** |
| 43 | + * - BLE Location |
| 44 | + - nRF chip |
| 45 | + - BLE only, or LoRa/FSK |
| 46 | + * - Wi-Fi Location |
| 47 | + - nRF chip and LR1110 radio |
| 48 | + - LoRa and FSK |
| 49 | + * - GNSS Location |
| 50 | + - nRF chip and LR1110 radio |
| 51 | + - LoRa and FSK |
| 52 | + |
| 53 | +.. note:: |
| 54 | + Semtech SX1262 radio does not support Wi-Fi and GNSS scans. |
| 55 | + However, you can still use Bluetooth LE location features while using the SX1262 for LoRa and FSK communication. |
| 56 | + |
| 57 | +Location Levels |
| 58 | +=============== |
| 59 | + |
| 60 | +Location levels are arranged from lowest to highest effort, based on power usage and time required. |
| 61 | +The available hardware on the device determines which levels can be used. |
| 62 | +If a higher location level fails or times out, the library automatically moves to the next level after a set timeout. |
| 63 | + |
| 64 | +For more details on integrating device location services with Amazon Sidewalk, refer to the AWS post `Introducing AWS IoT Core Device Location Integration with Amazon Sidewalk`_ |
| 65 | + |
| 66 | +This article provides guidance on enabling Device Location for Sidewalk devices, configuring geolocation options in AWS IoT Core, and understanding how location data is transmitted and resolved within the AWS ecosystem. |
| 67 | + |
| 68 | +Level 1: Connected to Sidewalk through BLE |
| 69 | +------------------------------------------ |
| 70 | + |
| 71 | +At this level, the device uses its existing Sidewalk Bluetooth LE connection to resolve location. |
| 72 | + |
| 73 | +* Power Consumption - No additional power used |
| 74 | +* Description - If the device can be located through Bluetooth LE over the Sidewalk network, the device notifies the cloud to resolve the location without extra effort. |
| 75 | + If the device is not connected through Bluetooth LE or a location cannot be resolved, the library moves to the next level. |
| 76 | + The device’s location is based on the Amazon Hub it is connected to. |
| 77 | + |
| 78 | +Level 2: Reserved |
| 79 | +----------------- |
| 80 | + |
| 81 | +This level is not yet supported and will default to the next level if reached. |
| 82 | + |
| 83 | +Level 3: Send Wi-Fi Scan |
| 84 | +------------------------ |
| 85 | + |
| 86 | +At this level, the device tries to find its location using nearby Wi-Fi networks. |
| 87 | + |
| 88 | +* Power Consumption - Low |
| 89 | +* Description - The device scans for nearby Wi-Fi access points and sends the results to the cloud. |
| 90 | + It must find at least one access point. |
| 91 | + Otherwise, the device will move to the next level. |
| 92 | + If the cloud returns a low confidence score or cannot determine the location, the application should proceed to the next level. |
| 93 | + |
| 94 | +Level 4: Send GNSS Scan |
| 95 | +----------------------- |
| 96 | + |
| 97 | +At this level, the device uses satellite data for location. |
| 98 | + |
| 99 | +* Power Consumption - Higher power consumption than Wi-Fi scanning |
| 100 | +* Description - The device collects and sends GNSS (satellite) data. |
| 101 | + At least four satellites must be detected for a valid scan. |
| 102 | + |
| 103 | +Testing |
| 104 | +******* |
| 105 | + |
| 106 | +The Sidewalk location feature is implemented in the DUT application. |
| 107 | +For testing instructions, see :ref:`variant_sidewalk_dut_test_location`. |
| 108 | + |
| 109 | +Sidewalk libraries |
| 110 | +================== |
| 111 | + |
| 112 | +Location service is supported in Sidewalk libraries in the following range: |
| 113 | + |
| 114 | +* Sidewalk Sub-GHz library (LoRa and FSK) supports all location methods. |
| 115 | + However to build with radio and pal componets for WiFi and GNSS scanning, ``CONFIG_SIDEWALK_SUBGHZ_RADIO_LR1110`` must be enabled. |
| 116 | + This config is enabled automatically when sample is build with ``semtech_lr11xxmb1xxs`` shield. |
| 117 | + |
| 118 | +* Sidewalk Bluetooth LE only library supports only network location method over Bluetooth LE. |
| 119 | + |
| 120 | +Writing custom application |
| 121 | +************************** |
| 122 | + |
| 123 | +For detailed API documentation and usage guide for developers, refer to the `Amazon Sidewalk Location Library Developer Guide`_. |
| 124 | + |
| 125 | +.. _location_services_troubleshooting: |
| 126 | + |
| 127 | +Troubleshooting |
| 128 | +*************** |
| 129 | + |
| 130 | +If you run into problems, the following list includes common issues and their solutions: |
| 131 | + |
| 132 | +* ``No positioning data in the AWS IoT Core`` - Ensure that positioning is activated for your device in the AWS IoT Core console, and a destination is configured. |
| 133 | +* ``Sidewalk not ready`` - Make sure Sidewalk is initialized and started before initializing location services. |
| 134 | +* ``Initialization order`` - Always initialize location services after calling ``sid_init()`` and deinitialize before calling ``sid_deinit()``. |
| 135 | +* ``BLE location not working`` - Ensure the device is connected to a Sidewalk gateway over Bluetooth LE, and the gateway has location services enabled. |
0 commit comments