Changes

Created page with "==Introduction== Precise GNSS tracking might be physically not possible in certain environments, where the GNSS signal is unable to reach the tracking device. One example of s..."
==Introduction==
Precise GNSS tracking might be physically not possible in certain environments, where the GNSS signal is unable to reach the tracking device. One example of such environment might be the inside of a large industrial warehouse. If the precise position of a vehicle, such as a forklift is needed to be tracked inside of it, other additional measures need to be taken. Teltonika indoor tracking solution ensures indoor positioning in such environments by utilising eye beacons. Eye Beacons are interchangeable with Eye Sensors; it works in the same way as an Eye Beacon while also providing additional features, such as magnetic field detection, temperature and humidity reading. All of which help ensure proper warehouse conditions to prevent damage of goods. However, for regular indoor positioning, it is recommended to use Eye Beacons, as they ensure a longer battery life.
==Solution description==
First, BLE beacons are set up in an inside space, their position will remain fixed and they will serve as a known location reference. These beacons periodically broadcast a signal which is unique for each beacon containing the beacon’s ID. When any FM device configured for the solution receives a signal from a beacon, the strength of this received signal (RSSI-Received signal strength Indicator) will be proportional to the distance between them. With several beacons, the position of configured FM devices can be calculated. These calculations are performed on the server side. Many FM devices can utilize the same Eye Beacons at the same time.
==Beacon installation==
The main challenge in using iBeacon or Eddystone signals for indoor positioning is the variance of RSSI readings due to their sensitivity to environment factors. These factors include obstruction of signal due to physical obstacles: walls, doors, metal objects. Beacons should be installed on the walls, ceiling or racks and their position will remain fixed. Clear line of sight should be maintained for optimal coverage of the beacon signal. For best tracking coverage and accuracy results, beacons should be installed in such a way, that at least 3 beacon transmissions can be detected at any point of the indoor facility. The maximum open-field distance of beacon detection is 80m, however, indoor signal range will be smaller and depend on the configured transmitting power of the Eye beacon as well as layout of the facility. In general, the more beacons are set up, the higher the positioning accuracy.
==Configuring FM device==
[[File:Indoortrackingsolution2.gif]]
<br>

#In System Settings Enable [[Codec#Codec_8_Extended|Codec8 Extended]];
#In [[FMB120_Bluetooth_settings|Bluetooth]] settings Enable Bluetooth, set this setting as either "Enable (hidden)" or "Enable (visible)", otherwise Bluetooth will be disabled;
#In [[FMB120_Bluetooth_4.0_settings|Bluetooth 4.0]] settings, set Non Stop Scan to "enabled" or "disabled" and configure the desired update interval.
#In [[FMB120_Beacon_List|Beacon list]] settings, configure Beacon Detection as "Configured" and Beacon Record as "Periodic". This configuration will allow detection of beacons from the beacon list and send periodical positioning data to the server. However, keep in mind only 50 beacons can be added to the beacon list.
If the beacon detection option is set to Configured, only beacons from the beacon list will be detected and their data will be sent to the server.
<br>
If beacon detection is set to All, all beacons will be detected by the FM device, therefore beacon lists will not have to be configured on the devices. <br>
It is also possible to configure the device to recognize the beacon by it’s mac address.<br>
As always, FM device configuration will vary depending on the User’s exact needs.
==Configuring EyeBeacon==
Devices work constantly and are ready to perform out of the box. Default basic Sensor settings are set to:
<br>• Transmitting at 2 dBm power.
<br>• Data advertising at 3 second intervals.
<br>• Eddystone protocol
<br>
However, these parameters can be changed. Transmitting power can be set from -14dBm to 8dBm – higher transmitting power translates to a larger beacon range. Data advertising interval can be selected from the range 20ms to 10s, shorter data advertising intervals ensure a more stable signal. However, increasing power or reducing the advertising interval affects the battery life of the Eye Beacon.
{| class="wikitable"
|EYE Beacon / BTSID1
|EYE Sensor / BTSMP1
|-
|2+ years

(Tx=2 dBm; interval: 1 s)
|1+ year

(Tx=2 dBm; interval: 1 s)
|-
|5+ years

(Tx=2 dBm; interval: 3 s)
|2.5+ years

(Tx=2 dBm; interval: 3 s)
|-
|10+ years

(Tx=2 dBm; interval: 10s)
|5+ years

(Tx=2 dBm; interval: 10s)
|}
More information can be found [https://wiki.teltonika-gps.com/view/EYE_FAQ#Questions_about_FMBxxx_compatibility_with_EYE_Accessories. here]
All configuration of the Eye Beacon will be done via [https://wiki.teltonika-gps.com/view/EYE_BEACON_/_BTSID1#EYE_App_Configuration EYEapp.] On the app, wanted protocol can be selected, transmitting power, advertising interval and Beacon ID can be easily configured. Below is an example configuration. <br>
[[File:Eyeappexample.gif]]
<br>
==Beacon data==
After the FM device and EyeBeacons are configured, the FM device will be able to read EyeBeacon data and send it to the server, where positioning calculations are to be performed. Beacon data is sent to the server in a variable length packet (AVL ID 385) if simple mode is selected, if advanced beacon mode is selected, beacon data is packed into AVL ID 548.
<br>
In order to make sense of the data sent to the server for the calculation to be made, packets need to be parsed. Depending on the selected beacon protocol, packet structure will differ. Provided below are examples of parsing a packet containing Beacon data.
===Eddystone example with 1 beacon===
received raw data: 00000000000000408e01000001701f9b3fa9010f0e502a209ab461007400c60e00000181000100000000000000000001018100131101e39b606aa38255aa8e460b154e2d0055cf0100000056
parsing example:
{| class="nd-othertables_2" style="width:100%;"
|+

! colspan="3" style="border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |AVL Data Packet
|-
! colspan="2" rowspan="1" style="width:60%; vertical-align: middle; text-align: center;" |AVL Data Packet Part
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |HEX Code Part
|-
| rowspan="4" style="vertical-align: middle; text-align: center;" |
| style="vertical-align: middle; text-align: center;" |Zero Bytes
| style="vertical-align: middle; text-align: center;" |00 00 00 00
|-
| style="vertical-align: middle; text-align: center;" |Data Field Length
| style="vertical-align: middle; text-align: center;" |00 00 00 40
|-
| style="vertical-align: middle; text-align: center;" |Codec ID
| style="vertical-align: middle; text-align: center;" |8E (Codec8 Extended)
|-
| style="vertical-align: middle; text-align: center;" |Number of Data 1 (Number of Total Records)
| style="vertical-align: middle; text-align: center;" |01
|-
| rowspan="24" style="vertical-align: middle; text-align: center;" |AVL Data
| style="vertical-align: middle; text-align: center;" |Timestamp
| style="vertical-align: middle; text-align: center;" |00 00 01 70 1F 9B 3F A9 (GMT: Friday, 07 February 2020 12:23:53.001)
|-
| style="vertical-align: middle; text-align: center;" |Priority
| style="vertical-align: middle; text-align: center;" |01
|-
| style="vertical-align: middle; text-align: center;" |Longitude
| style="vertical-align: middle; text-align: center;" |0F 0E 50 2A
|-
| style="vertical-align: middle; text-align: center;" |Latitude
| style="vertical-align: middle; text-align: center;" |20 9A B4 61
|-
| style="vertical-align: middle; text-align: center;" |Altitude
| style="vertical-align: middle; text-align: center;" |00 74
|-
| style="vertical-align: middle; text-align: center;" |Angle
| style="vertical-align: middle; text-align: center;" |00 C6
|-
| style="vertical-align: middle; text-align: center;" |Satellites
| style="vertical-align: middle; text-align: center;" |0E
|-
| style="vertical-align: middle; text-align: center;" |Speed
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |Event IO ID
| style="vertical-align: middle; text-align: center;" |01 81 (385)
|-
| style="vertical-align: middle; text-align: center;" |N of Total ID
| style="vertical-align: middle; text-align: center;" |00 01
|-
| style="vertical-align: middle; text-align: center;" |N1 of One Byte IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |N2 of Two Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |N4 of Four Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-

| style="vertical-align: middle; text-align: center;" |N8 of Eight Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |NX of X Bytes IO
| style="vertical-align: middle; text-align: center;" |00 01
|-
| style="vertical-align: middle; text-align: center;" |N’th IO ID - AVL ID.
| style="vertical-align: middle; text-align: center;" |01 81 (385)
|-
| style="vertical-align: middle; text-align: center;" |Length of Variable Length IO
| style="vertical-align: middle; text-align: center;" |00 13
|-
| style="vertical-align: middle; text-align: center;" |Value of Variable Length IO
| style="vertical-align: middle; text-align: center;" |1101E39B606AA38255AA8E460B154E2D0055CF
|-
| style="vertical-align: middle; text-align: center;" |Number of Data 2 (Number of Total Records)
| style="vertical-align: middle; text-align: center;" |01
|-
| style="vertical-align: middle; text-align: center;" |CRC-16
| style="vertical-align: middle; text-align: center;" |00 00 00 56
|-
|}


{| class="nd-othertables_2" style="width:100%;"
|+
! colspan="7" style="border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |AVL 385 Parsing
|-
|Data part
|BLE beacon flags #1
|Beacon ID #1
|Signal Strength #1
|Beacon data #2
|-
|1 Byte
|1 Byte
|20/16 Bytes
|1 Byte
|…
|-
|11 – Data part, 1 Record out of 1 Beacon Packet.
|01 – Eddystone with RSSI
|Eddystone – 16B (Namespace, Instance ID)




E39B606AA38255AA8E46 – BLE Beacon Namespace

0B154E2D0055 – BLE Beacon Instance ID
| -49
| -
| -
| -
|}

====iBeacon example with 2 beacons====
received raw data: 000000000000005a8e010000016b69b0c9510000000000000000000000000000000001810001000000000000000000010181002d11216b817f8a274d4fbdb62d33e1842f8df8014d0<br>22bbf21a579723675064dc396a7c3520129f61900000000bf0100003e5d<br>
parsing example:
{| class="nd-othertables_2" style="width:100%;"
|+

! colspan="3" style="border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |AVL Data Packet
|-
! colspan="2" rowspan="1" style="width:60%; vertical-align: middle; text-align: center;" |AVL Data Packet Part
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |HEX Code Part
|-
| rowspan="4" style="vertical-align: middle; text-align: center;" |
| style="vertical-align: middle; text-align: center;" |Zero Bytes
| style="vertical-align: middle; text-align: center;" |00 00 00 00
|-
| style="vertical-align: middle; text-align: center;" |Data Field Length
| style="vertical-align: middle; text-align: center;" |00 00 00 5A
|-
| style="vertical-align: middle; text-align: center;" |Codec ID
| style="vertical-align: middle; text-align: center;" |8E (Codec8 Extended)
|-
| style="vertical-align: middle; text-align: center;" |Number of Data 1 (Number of Total Records)
| style="vertical-align: middle; text-align: center;" |01
|-
| rowspan="24" style="vertical-align: middle; text-align: center;" |AVL Data
| style="vertical-align: middle; text-align: center;" |Timestamp
| style="vertical-align: middle; text-align: center;" |00 00 01 6B 69 B0 C9 51(GMT: Tuesday, 18 June 2019 08:25:22.001)
|-
| style="vertical-align: middle; text-align: center;" |Priority
| style="vertical-align: middle; text-align: center;" |00
|-
| style="vertical-align: middle; text-align: center;" |Longitude
| style="vertical-align: middle; text-align: center;" |00 00 00 00
|-
| style="vertical-align: middle; text-align: center;" |Latitude
| style="vertical-align: middle; text-align: center;" |00 00 00 00
|-
| style="vertical-align: middle; text-align: center;" |Altitude
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |Angle
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |Satellites
| style="vertical-align: middle; text-align: center;" |00
|-
| style="vertical-align: middle; text-align: center;" |Speed
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |Event IO ID
| style="vertical-align: middle; text-align: center;" |01 81 (385)
|-
| style="vertical-align: middle; text-align: center;" |N of Total ID
| style="vertical-align: middle; text-align: center;" |00 01
|-
| style="vertical-align: middle; text-align: center;" |N1 of One Byte IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |N2 of Two Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |N4 of Four Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-

| style="vertical-align: middle; text-align: center;" |N8 of Eight Bytes IO
| style="vertical-align: middle; text-align: center;" |00 00
|-
| style="vertical-align: middle; text-align: center;" |NX of X Bytes IO
| style="vertical-align: middle; text-align: center;" |00 01
|-
| style="vertical-align: middle; text-align: center;" |N’th IO ID - AVL ID.
| style="vertical-align: middle; text-align: center;" |01 81 (385)
|-
| style="vertical-align: middle; text-align: center;" |Length of Variable Length IO
| style="vertical-align: middle; text-align: center;" |00 2D
|-
| style="vertical-align: middle; text-align: center;" |Value of Variable Length IO
| style="vertical-align: middle; text-align: center;" |11216B817F8A274D4FBDB62D33E1842F8DF8014D022BBF21A579723675064DC396A7C3520129F61900000000BF
|-
| style="vertical-align: middle; text-align: center;" |Number of Data 2 (Number of Total Records)
| style="vertical-align: middle; text-align: center;" |01
|-
| style="vertical-align: middle; text-align: center;" |CRC-16
| style="vertical-align: middle; text-align: center;" |00 00 3E 5D
|-
|}


{| class="nd-othertables_2" style="width:100%;"
|+
! colspan="7" style="border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |AVL 385 Parsing
|+
|Data part
|BLE beacon flags #1
|Beacon ID #1
|Signal Strength #1
|Beacon data #2
|-
|1 Byte
|1 Byte
|20/16 Bytes
|1 Byte
|…
|-
|11 – Data part, 1 Record out of 1 Beacon Packet.
|21 – iBeacon with RSSI
|17F8A274D4FBDB62D33E1842F8DF8 – UUID

014D – Major

022B – Minor
| -65
|21A579723675064DC396A7C3520129F61900
000000BF
|-
| -
|21 – iBeacon with RSSI
|A579723675064DC396A7C3520129F619 – UUID
0000 – Major

0000 – Minor
| -65
| -
| -
| -
|}

Note, the signal strength byte value in Hex format must be converted to Decimal from signed 2's complement, the converted value will be in dBm.
For Eddystone protocol, Beacon namespace:instance ID will be used to identify the beacon, for iBeacon protocol UUID:major:minor will be used. From there, the signal strength information can be used to calculate the distance to the beacon, then various positioning algorithms can be implemented on the server side for indoor positioning. <br>
It is also possible to identify beacons by their MAC address, by selecting advanced beacon mode on the FM device configuration. Below is an example


===Advanced Beacon Mode===
When advanced beacon mode is selected, beacon data capturing can be configured manually (AVL ID 548). This mode can prove useful in several scenarios. For example, advanced beacon mode could be used to read additional data, such as temperature or humidity from EyeSensors or monitoring beacons' battery voltage. A detailed description of advanced beacon mode can be found [https://wiki.teltonika-gps.com/view/Advanced_Beacon_Capturing_Configuration here].<br>
Advanced beacon mode can also be used for configuring the FM device to discover beacons based on their MAC address, instead of UUID:major:minor for iBeacon or namespace:instanceID for Eddystone.<br> Below is an example configuration for the FM device discovering EyeBeacons whose MAC addresses match the ones specified in beacon list and are using Eddystone protocol.<br>
[[File:Indoortracking1.gif|Indoortracking1.gif]]

Received Raw beacon frame with AVL ID 548, containing data from 1 beacon: <br>
000000000000003a8e010000018088ef844b000f0e5732209ab89c004f001010000002240001000000000000000000010224000d010b0001dc01067cd9f418d9c001000027b7 <br>
AVL ID 548 (224 in hex) part: <br>
010b0001dc01067cd9f418d9c0
<br>
{| class="nd-othertables_2" style="width:100%;"
|+
! colspan="3" style="border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |AVL 548 parsing
|-
! colspan="2" rowspan="1" style="width:60%; vertical-align: middle; text-align: center;" |Parsed Beacon data part
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |HEX Code Part
|-
| rowspan="50" style="vertical-align: middle; text-align: center;" |
| style="vertical-align: middle; text-align: center;" |(Constant)
| style="vertical-align: middle; text-align: center;" |01
|-

| style="vertical-align: middle; text-align: center;" |1st Beacon data length
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">0b
|-
| style="vertical-align: middle; text-align: center;" |RSSI (Parameter 00)
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">00
|-
| style="vertical-align: middle; text-align: center;" |RSSI length
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">01
|-
| style="vertical-align: middle; text-align: center;" |RSSI value
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">dc (coverted to dec -> -49)
|-
| style="vertical-align: middle; text-align: center;" |Beacon ID (Parameter 01)
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">01
|-
| style="vertical-align: middle; text-align: center;" |Beacon ID length
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">06
|-
| style="vertical-align: middle; text-align: center;" |Beacon ID
| style="vertical-align: middle; text-align: center;" |<span style="background:#87CEEB">7cd9f418d9c0
|-
|}

The below table represents possible Beacon Parameters. <br>
{| class="nd-othertables_2" style="width:25%;"
|+
! colspan="2" style="width:10%; border-bottom: 2px solid #0054A6; vertical-align: middle; text-align: center;" |Parameters
|-
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |00
| style="vertical-align: middle; text-align: center;" |RSSI
|-
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |01
| style="vertical-align: middle; text-align: center;" |Beacon ID
|-
! rowspan="1" style="width:40%; vertical-align: middle; text-align: center;" |02
| style="vertical-align: middle; text-align: center;" |Additional beacon data
|}