Pilgrims tracking and monitoring based on IoT

. The pilgrimage takes place in several countries around the world. The pilgrimage includes the simultaneous movement of a huge crowd of pilgrims which leads to many challenges for the pilgrimage authorities to track, monitor, and manage the crowd to minimize the chance of overcrowding's accidents. Therefore, there is a need for an efficient monitoring and tracking system for pilgrims. This paper proposes powerful pilgrims tracking and monitoring system based on three Internet of Things (IoT) technologies; namely: Radio Frequency Identification (RFID), ZigBee, and Internet Protocol version 6 (IPv6). In addition, it requires low-cost, low-power-consumption implementation. The proposed system can efficiently handle the pilgrimage challenges; namely: the language barrier, identifying of injured or dead pilgrims, directing lost pilgrims, knowing medical records of pilgrims, and the crowd management. Finally, another paramount characteristic of the proposed IoT-based system is allowing the authorities, the heath-givers, and the pilgrim’s family for real-time tracking and monitoring of pilgrim during the pilgrimage anytime, anywhere.


Introduction
Pilgrimage has considerable importance in several places such as Iraq, Malaysia, Indonesia, Sri Lanka, Saudi Arabia, and India [1].Usually, the pilgrimage includes the simultaneous movement of a huge crowd of people.The huge crowd of pilgrims causes many challenges for the authorities of the holy areas in identifying/tracking pilgrims and managing the crowd.Therefore, the authorities need a strong identifying/tracking system for pilgrims [2].Many of IoT technologies such as RFID, Zigbee, and IPv6 can be effectively utilized for tracking and managing movements of pilgrims [3].
The rest of the paper proceeds as follows.In section 2, the main challenges associated with pilgrimage are identified.Section 3 reviews related work.Section 4 proposes an IPv6-RFID-Zigbee based System for pilgrims tracking and monitoring.The conclusion is presented in section 5.

Pilgrimage challenges
Identifying and tracking a huge crowd of people during the pilgrimage is a hard mission.The authorities of the holy areas and the pilgrims faced many challenges during the pilgrimage [2].Main of these challenges are discussed below:

Language barrier
Since most of the pilgrimages are religious and often include a huge crowd of people, pilgrims are coming from different countries with different languages.It is a serious challenge when it comes to help a lost pilgrim or to treat a sick one [4].

The identifying of injured or dead pilgrims
Because of the huge crowd of pilgrims, considering the age factor and unfortunate accidents, the deaths account for the pilgrimages is on the high side.a lot of the dead pilgrims may not carry any document.This challenge is hard to solve since it is unknown if any of the dead pilgrims will be identified or claimed in the future [4].

Directing the lost pilgrims
A lot of pilgrims are got lost during the pilgrimage.Since pilgrims are coming from different countries with different languages and most of them have no document appearing their locations and contact phone numbers, It is a big challenge to direct them [4].

Knowing pilgrims' medical records
Many pilgrims are brought to clinics for emergency treatment.Knowing the pilgrims' medical records leads to more efficient treatment of patients.However, because of lacking medical documents and a common language, doctors cannot get basic medical information needed for more efficient treatment [4].

Crowd management
Usually, the pilgrimage includes simultaneous movements of a huge crowd of pilgrims, which creates possibilities of stampedes and contamination of contagious viruses and diseases.It is a big challenge to control a huge crowd of pilgrims during the pilgrimages in order to decrease the chance of spread of diseases and other catastrophes like stampedes, drowning, and fires, the number of pilgrims should be contained to manageable limits by limiting the number of people which should be permitted to gather in a particular area or space [5].

Delaying at the main ports
The huge crowd of pilgrims in the holy sites during the pilgrimage leads to overcrowding at those places which result in delaying many pilgrims at the main ports.This makes the pilgrims wait in the main ports for long queues for a lot of hours may reach a full day [6].

Literature review
Many different systems are proposed to monitor and track pilgrims and supply safety to them during the pilgrimage [2].Some of them utilized the Global Positioning System (GPS) of the smartphone with the RFID technology or with the ZigBee technology.Other systems used a "Smart Watch" with the RFID technology.Other proposals utilized RFID and ZigBee technologies.However, no one of the proposed systems used the full power of the Internet of Everything /Internet of Things (IoE/ IoT) vision by providing real-time, anytime, anywhere tracking and monitoring.Moreover, many of these proposals require a high-cost implementation with high power consumption.

Radio frequency identification (RFID) technology
The low-cost RFID technology has been integrated into many commercial and industrial applications.RFID utilizes electromagnetic radio frequency (RF) signals to identify people and things [7].The RFID technology is supposed as the essential technology to realize the IoT environment and implement IoE vision where all people and things are connected anywhere, anytime [8].As shown in figure 1, a regular RFID system consists of an RFID tag, an RFID reader, and a backend server.The RFID tag is a little equipment, which used to send, receive, and save information wirelessly based on RF signals.The RFID reader is equipment that writes and reads the information to/from an RFID tag [9].The main working principle of RFID technology is summarized as follows: an RFID reader sends a wireless RF signal to an RFID tag, and the tag is activated by obtaining energy from the received RF signal, then the activated RFID tag sends its identification information as a response signal to the RFID reader.At this point, where response RF signal is sent by using the electromagnetic RF signal, received from RFID reader, as the energy source, it is classified into a passive RFID tag, and otherwise, if the response RF signal is sent from a battery as an energy source, it is classified into an active RFID tag [10].Usually, the RFID tags stores a unique identification number (UID) and other information on a silicon microchip [4].An RFID reader can be set in specific places to read an RFID tag, and then the information read from the tag can be transmitted to a server to process it [10].

ZigBee technology
ZigBee is a low-cost low -power wireless technology.ZigBee can communicate in several kinds of topologies involving the mesh topology as shown in figure 2. There are three kinds of ZigBee devices: end device, router and coordinator.The coordinator represents the controlling of the personal area network (PAN) and establishes the connections of the ZigBee network.ZigBee router can send and receive messages, and route them to extend the coverage area.Finally, the ZigBee end device connects either to a ZigBee router or to a coordinator, and it has fewest features.any ZigBee network has unlimited number routers and end devices but it has only one coordinator [11].ZigBee networks are flexible, self-organized, and multi-hoped to transfer and receive data via RF signals [12].

Raspberry Pi
Raspberry Pi is a small low-cost (i.e.25$-35$) multi-purpose computer that can be used to interface with a lot of devices.It has a small-sized board which includes a low-power, low-cost, and powerful central processing unit (CPU), RAM, graphics chip, and different connectors to interface with external devices.Similar to the personal computer (PC), it requires a power supply, a display unit, and a keyboard.It can be powered using a Universal Serial Bus (USB) connector and provided with internet connectivity either by using an Ethernet cable or by using a Wi-Fi USB adapter [13].Moreover, Raspberry Pi acts like a Fog server that can store and manage data in the case of network failures and resend the data when the connection to the database server is returned.

Internet protocol version 6 (IPv6)
Internet Protocol Version 4 (IPv4) is a communication network protocol that allows exchanging of information in terms of packets between two nodes.IPv4 is considered the backbone of the internet.However, it has the limitation of supporting a maximum of 4.3 billion unique IP addresses.Therefore, the massive growth in PCs, mobile phones, and other wireless mobile devices leads to a need for additional IP addresses' blocks to allow about 50 billion of connected objects in 2020 [15].The IPv6 is the new version of vastly utilized IPv4.The purpose of IPv6 is to supersede the IPv4 by increasing the address space.The 128-bit length of IPv6 addresses is a significant gain over the 32-bit length of IPv4 addresses, allowing for 2^128 unique IP addresses [14].Thus, the IPv6 ensures that each thing, device, and a person that has its own IP address.The 128-bit IPv6 address composes of two parts; namely: network prefix (Net ID) and host suffix (Host ID), each part has 64-bits length.

The proposed system
This section describes the proposed system for pilgrims tracking and monitoring.The idea behind this system is to utilize three IoT technologies (i.e.RFID, ZigBee, and IPv6) to handle the pilgrimage challenges described in section 2. As shown in figure 3, the proposed system consists of two parts; namely: Local Units (LUs), and Central Unit (CU).Each of LUs consists of Raspberry Pi, RFID reader, and ZigBee router.Each of LUs represents a region in the holy area of pilgrimage and it has a unique name.The CU consists of a backend server (i.e.PC), and ZigBee coordinator.Since the maximum nominal range of ZigBee is 100m [16], each 100m of the holy area of pilgrimage will contain one CU connected to several LUs via the ZigBee and all the backend database CUs' servers are connected to the cloud for internationally monitoring and tracking.

IP phase
In this phase, the RFID tag of each pilgrim is initialized with the full name of a pilgrim and phone number, his/her age and gender, his/her weight and height, his/her native language, in addition to pilgrim's medical record.Moreover, the backend database server in the CU is initialized with the same information of each pilgrim tag, and UIDs of tags.The pilgrims' information is written in a common language (i.e., English) to handle the challenge of the language barrier.

MP phase
In this phase, the monitoring process of pilgrims is executed as follows.When a pilgrim passes through an LU, the RFID reader reads the pilgrim tag and sends the pilgrim information to the Raspberry Pi.The Raspberry Pi sends the region name of LU and the pilgrim information via the ZigBee technology to the CU.The CU server stores the received information in the database.There will be an estimated time that the pilgrim must pass during it from an LU to another.The estimated time is determined based on the pilgrim's age, gender, weight, height, and his/her health status.Each time, the CU server check if the passing time of a pilgrim is more than the estimated time, or if there is no update of pilgrim's location, the server sends an alarm and the pilgrim information to the authorities and health-givers to check the status of the pilgrim (i.e.lost, injured, or dead).In addition, if any of the pilgrims got lost, the CU server will know this situation by checking the location update of LU that pilgrim passes through.For example, if a pilgrim passes from LU1 to LU3 instead of passing from LU1 to LU2, the CU server will send an alarm and the information of the lost pilgrim to the authorities to direct him/her to the correct region.Moreover, each LU has a maximum number of pilgrims that can be in the LU region.If the pilgrims' number exceeds the maximum limit, the Raspberry Pi of the LU will send an alarm to the authorities to handle the situation.Figure 4 shows the sequence diagram of the MP phase.

TP phase
In this phase, the tracking process of pilgrims is executed as follows.When a pilgrim passes through an LU, the RFID reader writes the region name of the LU to the pilgrim's tag.Then, the Raspberry Pi sends the location update of the pilgrim to the backend database of the CU.To provide pilgrims tracking in real-time, each pilgrim's tag will be provided with an IPv6 address.Thus, the tag information will be reachable via the IPv6 address anytime, anywhere.However, since passive lowcost RFID tags cannot run the IP protocol stack because of lacking enough processing and electrical power, these tags will be represented virtually on the Internet using a proxy application by creating a Virtual Network Interface (VNI).This VNI has an IPv6 address that can be mapped to the RFID tags that pass through the covering area of an RFID reader [17].The proxy application will be run on the Raspberry Pi in each LU.The IPv6 address of each pilgrim's tag will be derived from the UID of the tag as follows.When a pilgrim passes through an LU, the RFID reader reads the UID of the pilgrim's tag and sends it to the Raspberry Pi.Then, the running proxy application on the Raspberry Pi constructs an IPv6 address of the pilgrim's tag using the mapping mechanism proposed in [18] by using the Net ID of Raspberry Pi's IPv6 address and the UID of tag as two operands to an XOR operator.As shown in figure 5, the UID-64bits unit checks the length of the tag's UID.If the length is less than 64 bits, it adds left zero-padding to the UID in order to make its length 64 bits.If the length is equal to 64 bits, the unit keeps the 64 bits of the tag's UID.If the UID length is more than 64 bits, the UID-64bits unit utilizes the binary compression to generate the desired 64-bits UID [18].After obtaining the 64 bits UID, the Raspberry Pi utilizes it with its Net ID as two operands to the XOR operator to obtain the Host ID of the IPv6 address of the pilgrim's tag.Then, the Raspberry Pi combines the obtained Host ID with its Net ID to construct the IPv6 address of the tag. Figure 6 shows the flow chart of the XOR-based mapping mechanism.1 displays an example of how the mapping mechanism from a UID of a ''Mifare Classic'' (for e.g.) RFID tag [8] to an IPv6 address is executed.Figure 7 shows the sequence diagram of the TP phase.
Table 1.Example of the XOR-based mapping.

Conclusions
This paper proposed a pilgrims' tracking and monitoring system that utilized the full power of IoT technologies and could be implemented in low-cost tags.The proposed system has been designed by using three IoT technologies (i.e.RFID, ZigBee, and IPv6) to handle the pilgrimage challenges.The proposed system overcomes the language barrier by writing the required information of pilgrims into the RFID tags using a common language (i.e.English).Moreover, the injured or dead Pilgrims can be identified easily by monitoring/tracking pilgrims' tags.In addition, the proposed system monitors the pilgrims continuously so, it will identify the lost pilgrims and direct them to the correct pathway.Moreover, the doctors can get the needed medical records of pilgrims brought to clinics easily using pilgrims' tags.In addition, the proposed system can control the huge crowd of pilgrims during the pilgrimages by limiting the number of people that should be permitted to gather in a specified LU.Thus, it minimizes the chances of catastrophes, overcrowding, and delaying that appear at the main ports.Finally, another paramount characteristic of the proposed system is allowing real-time tracking and monitoring of pilgrims using IPv6, so the authorities, the heath-givers, and the pilgrim's family can know the pilgrim's location during the pilgrimage anytime, anywhere, from any smart device (i.e.

Figure 4 .
Figure 4. Sequence diagram of the MP phase.

Figure 6 .
Figure 6.Flow chart of the mapping algorithm.

Figure 7 .
Figure 7. Sequence diagram of the TP phase.