IoT ENABLED BLE AND LoRa BASED INDOOR LOCALIZATION WITHOUT GPS

The common problem that people face these days to find out the Indoor location of a particular Object or a Person exactly. GPS-based location tracking is one of the very important services nowadays. To use GPS tracking to find a path to our destination and also track the position of our goods using GPS Tracking. It is also possible to track the exact location in absence of GPS with the help of proposed implementation. In some cases like indoor location, the GPS tracker cannot locate exact position of a person or an object. GPS Tracker generally requires an open space with no roof on it. Bluetooth Low Energy (BLE) iBeacons that have to understand basically where this technology can be used or where it is useful. Basically, it is for an especially indoor location tracking of something movable or mobile without the use of a GPS Receiver. This proposed article is going to discuss the idea of making an Indoor location tracker using BLE and LoRa Technology along with IoT Dashboard through “The Things Network” (TTN) to know the position of the object or a person anywhere in the world.


I. INTRODUCTION
To understand the BLE (Bluetooth Low Energy) iBeacon basically where this technology can be used or where is it useful. Basically, it is for a location tracking of something movable or stable without a GPS module. This is most useful when a person wants to track locations indoors and in a very precise manner. An indoor set up which is maybe a factory, a building, an office space anything which is quite big and need to track movement within that building, for example if self-driving autonomous forklifts that are moving in a warehouse, which is a pretty big one or a data center or something wherein a location trap tracking of some personnel or fleet management or something like that is required and because of all this being indoors. In that places, the GPS tracker cannot be used, because GPS tracker generally requires an open space with no roof on it and along with that if this is a multi-level thing wherein there are multiple levels then tracking precisely on which particular level in which particular room is not very much feasible with a GPS tracker.
There is where the Bluetooth Low Energy (BLE) concept comes, what happens it is a Bluetooth beacon or something like this is a small device that is battery operated and it can, it is always transmitting a signal or a small packet of information which has its unique ID over Bluetooth Low Energy. It is basically a Bluetooth signal, that this a particular beacon will transfer and it is called BLE, because, it requires very low energy and this particular beacon transmits after every 500 milliseconds. With this rate the battery inside this small beacon can last up to four to five years. These are small Bluetooth Low Energy (BLE) based beacons and all of these have a range of few meters, so, these will be transmitting their unique ID in these locations. In the proposed article, the warehouse example is taken, so, they will be transmitting their ID and now this is what the main tracker and this tracker has a BLE chip as well, as LoRa chip. Basically, this tracker has both BLE and LoRa (Hybrid Technology).
When this tracker is somewhere in the warehouse and my BLE tracker is somewhere near this Bluetooth Low Energy (BLE) beacon, it will pick up the signal of this BLE beacon and it will know that it is near this beacon, so the location of forklift with BLE Tracker can be easily tracked based on the signal strength received by BLE iBeacon and once this tracker knows the location that it is near Bluetooth it is near the beacon one it will transmit that information over through LoRa to a central Gateway as Shown the conceptual diagram 1. To calculate the exact position of an object or a person using fingerprinting algorithm added with the last recorded location based on the signal availability in the smart phones are proposed [4]. By examining, analyzing and comparing all the literature works, the new approch is proposed to calculate the exact location using BLE (Bluetooth Low Energy) beacons along with LoRa (Long Range) Gateway (Hybrid Technology) to findout exact locations of an Object or a Person in indoor Environments and send the information over a long distance with the help of LoRa Transceiver modules and moreover this entire information will be updated in the "Ubidots Cloud" platforms using LoRaWAN Central Gateway and The Things Network (TTN) to trace out the Indoor Location of an Objects, garments, Machine parts, goods or a person any where in the world.

III. METHODOLOGY
In this IoT Enabled BLE and LoRa based Indoor Localization, the methodology which is proposed a LoRa Gateway but in short a LoRa gateway will just connect the LoRa based node or device to the internet and this serves as an interface between the LoRa network and the internet network. Here, the Wi-Fi is replaced with LoRa to increase the range of connectivity [5]. The signal coverage range of Wi-Fi is 20 meters approximately, but the LoRa covers around few tens and hundreds of kilometers in an application like this wherein a big building has only one gateway at the center of the hall or may be the factory or ware house and this can provide connectivity to the entire building and multiple floors at a time as well, so, it might be able to cover three to four floors which are pretty big in area may be few hundred meters is the major advantage of this gateway [6]. The conceptual diagram of this proposed methodology as shown in figure 2.

Structure BLE and LoRa Gateways with Multiple BLE Trackers
As shown in the above figure, the gateway should be set up and all the BLE trackers that moving inside that building or ware house can be connected to that single gateway. So, all the information that which tracker is near which Bluetooth Low Energy (BLE) iBeacon that tracker labeled as tracker letter "A" so when this letter "A" will be moving near the beacon 1, it will send that information first and it will receive this ID as BLE ID 1 on this tracker, then it will send that information over through LoRa to the gateway and the gateway will update that information on the internet to look at on the smartphone or any other gadgets [7]. Wherever the BLE based indoor location tracker is used, the Wi-Fi is replaced with LoRa as well. if it is a pretty small space the Wi-Fi coverage all around the building where tracking can move but again on Wi-Fi as Wi-Fi will consume more power as compared to LoRa the first word in LoRa means "Long Range with along with low power".
So, that is another advantage, that LoRa will pose for this tracker need to deploy this service in your building or warehouse or a large garment industry just need to purchase few BLE beacons need to place them in different rooms to get a gateway set it up in a single building and the number of devices need to track to get these trackers individually and put it along with the things that need to track and when they are moving near these BLE icons the tracker will receive this ID"s on the server and the same will be displayed in the cloud database [8]. The detailed implementation of the BLE tracker, the conceptual diagram of warehouse, the BLE iBeacons, LoRa Trackers and LoRa Gateway installation proposed Model as shown in figure 3. www.turkjphysiotherrehabil.org Now, the article clearly explain the application of the Hybrid (BLE & LoRa) Technology to use Indoor Localization. In continuation with that the modules inside the tracker and the BLE iBeacons are explained in the following sections.

BCN01 (BLE iBeacon)
In this proposed article, the BCN01 (BLE iBeacon) is used and the manufacturing company is "DRAGINO" which introduces the latest BLE iBeacons. The BCN01 is a Bluetooth based iBeacon, designed for Indoor Positioning solution. BCN01 is based The iBeacon has a soft button which has a small and simple circuit along with a CR2032 battery, which is a simple coin cell 3V battery to power it on as shown the internal structure of BCN01 in figure 5.

Fig 5. Structure of BLE iBeacon with CR2032 3V Battery
Whenever the small push button is pressed on the BLE body, the blue LED blinks and it starts emitting BLE signals from the beacon which is activated with the battery and it starts transmitting the message with the unique ID using the chip inside to that which has the typical range for this setup around 100 meters that is the maximum with BLE and that too in an open environment. If some walls or obstructions between the tracker and iBeacon, then the range falls down drastically. The unique ID of the different iBeacons and trackers should be included in the program which is used to implement this indoor localization setup by allotting the location to that particular iBeacons inside the buildings and the structure of BLE iBeacon with unique ID label is shown in below figure 6.

LBT1 (LoRa WAN BLE Indoor Tracker)
LBT1 is a long range low power consumption LoRa-WAN Bluetooth Tracker. LBT1 scans and find the nearest i-Beacon information and send to IoT server via LoRa-WAN wireless network. IoT Server should have a pre configure position mapping for beacons in order to trace the location of LBT1 tracker. LBT1 targets for indoor positioning for people and things. LBT01 has motion detect feature. It will also detect walk steps and uplink the value.LBT1 is powered by 1000mA, 3.7 Volt rechargeable Li-on battery and recharge circuit, which target for real time tracking with short tracking uplink interval. Each LBT1 preloads with a set of unique keys for LoRa-WAN registrations, Register these keys to local LoRa-WAN Server and it will auto connect if there is a network coverage, after power ON as shown in below figure 7 the structure of LBT1 BLE Tracker.

Fig 7. Structure of LBT1 BLE with LoRa-WAN Tracker
Communication happening with the beacons which receives all those messages with the help of the heart and the brain of the LBT01 which is the center of the chip that is an STM32 based microcontroller, that handles all the communication happening in this device, also it contains an RFM 95 LoRa chip for handling the LoRa communication to the gateway. The flexible antenna is also attached, which is curved shape with the plastic body operates at 868 MHz which means the device works on eight six eight megahertz (868MHz) for the LoRa technology. So, that antenna is for that BLE has its onboard antenna. It consists of a battery management chip and a programmer chip for inbuilt programming which can directly connect to USB (Universal Serial Bus) and program it because there is an onboard programmer for the STM32 as shown in figure 8.

Fig 8. Internal Structure of LBT1 Module
As shown above it has a pre-configured and pre-programmed button to give an alert and whenever this button is pressed, an alarm message will be sent through this LoRa chip to LoRa-WAN gateway and the alarm message can be observed on "The Things Network" or any other server used for sending data. The reset pin, clock pin, D IO (Digital Input Output) pin and the ground pin are the four pins used for programming the STM32.

LG01-N (Single Channel LoRa-WAN Gateway)
LoRa WAN consists of LoRa and point to point connections wherein one LoRa module can connect to the other LoRa module, but, here it will be connecting the LoRa modules to the internet using this gateway as per the proposed article to setting up an Arduino node or other controllers with a gateway. Further, it will be connecting to The Things Network (TTN) which will be free network server for configure LoRa-WAN. To set up your DRAGINO gateway with The Things Network (TTN), connect your Arduino nodes or any LoRa nodes to your gateway to send data over LoRa. The standalone LoRa is capable of transmission of signals to over hundreds of a kilometer, so, it has a transmission range of hundreds of kilometers that is why it is called long-range or LoRa, there are pretty many other applications and advantages of LoRa as well which is shown in figure 9. LoRa combined with the WAN, which is a Wide Area Network means that it supports LoRa with the internet. This can be done by connecting LoRa with the internet which is possible using a gateway consists of a Wi-Fi or an internet chip which essentially brings internet to this device and the gateway also has a LoRa chip built-in. so, the LoRa chip and the internet chips are connected together and this gateway can give the functionality of both the LoRa wireless networking and the internet networking.

Setting up The Things Network (TTN)
The Things Network (TTN) is a LoRa-WAN based open-source network to connect gateways and can send data from nodes to gateways. It is an awesome network in the article proposed to send data from the BLE iBeacons information on the server screen itself or on laptop or mobile phones. Now, To set up the gateway and the BLE iBeacon, connect the gateway to the power of 12V, 1A adapter, then connect LAN cable to the LAN port and the other side of the LAN port to laptop or the computer used for the setup. Now, open the web browser and type the IP Address "10.130.1.1" and enter the username as "root" and password as "dragino" and then login which is shown in figure 10.  Fig 10. LG01

-N LoRa Gateway Basic Setup
Now, To connect the gateway to the internet using Wi-Fi, Connect the network and then wireless, hit the scan button on the wireless radio, and choose zero option, then hit the join network button corresponding to your SSID or Wi-Fi name and enter your Wi-Fi password in the WPA passphrase box mentioned, then enter any random new name of the gateway, then hit the submit button on the next page and hit the save and apply button, so, that your gateway gets connected to your Wi-Fi network. Now the DRAGINO SSID can be disabled, which essentially makes your gateway as an access point. So, the DRAGINO SSID need to disable this, so, that your gateway can connect to your Wi-Fi. After completing this setup process once in a time, then the gateway gets connected to the network can be observed as shown in the figure 11.

Fig 11. Connection Diagram LG01-N to Laptop
In the console of The Things Network (TTN), hit the gateways button to register a new gateway, then, select the legacy packet forwarder option and Enter LoRa Gateway ID and paste it in the gateway EUI on the things network console and need to select the frequency plan as India, then the router gets selected automatically as ASIA and the correct location has to be selected of where the gateway is placed to map the exact location to select the antenna placement for an indoor gateway which is shown in figure 12,13 and 14. Now, to connect the things network to the "Ubidots" IoT Dashboard. Ubidots is a popular IoT platform to map the things on its GUI Dashboard. It is very flexible to connect the devices or nodes to configure good looking appearance. There are multiple gadgets mapping is available in the Ubidots IoT platform. Here it is used to locate each and every BLE Status on the IoT Dashboard. For this, first we need to register Ubidots STEM Account, it is free user account, if you want commercially, you need to purchase the business account and the differences between both free and paid service is data storage only, remaining entire working environment is same. Now, after creation of account you need to create new device choose in the options "Blank" device as you create whatever you want in the Blank channel creation as shown in below figure 15.

Fig 15. Ubidots Blank Device Creation
After that, you create a device Name whatever you want and device label then hit the button on create. Then, next go to my profile and click API Credentials, then you need to copy default Token of your device as shown in below figure 16.

Fig 16. Ubidots Device API Key in API Credentials
Then, go to devices and copy device label to link the Ubidots to "The Things Network (TTN)", for that, go to LoRa Gateway settings and click LoRa-WAN Server settings and configure MQTT Server settings. In that, you need to enter select server as a General Server and broker address as "industrial.api.ubidots.com" broker port as "1883" user name as your device API Key and then select Quality of Server level-1 (QoS1) option and finally data string format as "DATA".

IV. RESULTS AND DISCUSSIONS
The overall communication of my proposed work from the BLE iBeacons and BLE with LoRa Tracker about how it will capture the data and how it will transmits the LoRa Gateway as followed in the flow chart algorithm for better understanding purpose which is shown in figure 17. The overall process from BLE to LoRa Tracker and after that it will be connected to LoRa Gateway to The Things Network (TTN) and TTN to Ubidots Platform through central Server as shown in the overall conceptual layout diagram in figure 18. The Ubidots platform is to observe the results, when the person is moving from one place to another place then the BLE tracker receives the unique iBeacon ID and the same will be send to Ubidots IoT Dashboard through LoRa We proposed the concept of Hybrid Technology, which involves BLE and BLE with LoRa Tracker to track Indoor Location as one of the new methods in Indoor Localization. Not only that we successfully identify the location of an object or a person and at the same time, link the corresponding location information to IoT Dashboard through the LoRa-WAN and The Things Network (TTN). So, this is mandatory to map the location of an object or person in the Cloud or IoT Dashboard nowadays. With this type of Hybrid technology, we can track 99.5% of the Indoor location of an object or a person anywhere in the world. The advantage of this hybrid technology, LoRa and BLE draws very low power consumption, when compared to the Wi-Fi Signals and also Wi-Fi is limited distance coverage, but in our Hybrid technology, we can cover the distance of ten to hundreds of Kilometer without any boosters help. Finally, this technology nowadays very useful for warehouses or large garment showrooms or fleet management or identify the location of forklifts in a large grocery showrooms.