A Wi-Fi-Based Passive Indoor Positioning System via Entropy-Enhanced Deployment of Wi-Fi Sniffers

This study presents a Wi-Fi-based passive indoor positioning system (IPS) that does not require active collaboration from the user or additional interfaces on the device-under-test (DUT). To maximise the accuracy of the IPS, the optimal deployment of Wi-Fi Sniffers in the area of interest is crucial. A modified Genetic Algorithm (GA) with an entropy-enhanced objective function is proposed to optimize the deployment. These Wi-Fi Sniffers are used to scan and collect the DUT’s Wi-Fi received signal strength indicators (RSSIs) as Wi-Fi fingerprints, which are then mapped to reference points (RPs) in the physical world. The positioning algorithm utilises a weighted k-nearest neighbourhood (WKNN) method. Automated data collection of RSSI on each RP is achieved using a surveying robot for the Wi-Fi 2.4 GHz and 5 GHz bands. The preliminary results show that using only 20 Wi-Fi Sniffers as features for model training, the offline positioning accuracy is 2.2 m in terms of root mean squared error (RMSE). A proof-of-concept real-time online passive IPS is implemented to show that it is possible to detect the online presence of DUTs and obtain their RSSIs as online fingerprints to estimate their position.


Introduction
Wi-Fi is a crucial element of daily life and is present in most indoor environments. RF signals for IoT applications can be used to produce an inexpensive and accurate low-cost indoor positioning system [1]. This study creates a positioning system with acceptable accuracy without the need for additional hardware deployment, so it is cost-effective [2][3][4]. Indoor positioning systems (IPS) have gained increased attention in recent years as people spend more time indoors, and the Covid-19 pandemic has prompted or required people to stay indoors more frequently. Indoor location-based services (ILBS) have the potential to become an integral part of daily life, not only for traditional indoor wayfinding, proximity advertisements, and accurate contact tracing, but also for applications such as building emergency management [5], smart energy management [6], smart HVAC controls [7], elderly monitoring, and crime prevention.
Indoor positioning systems (IPS) present a challenge due to the complexity and dynamic nature of indoor environments, in contrast to GPS, which is used for outdoor positioning. Other radio signals, such as Bluetooth Low Energy (BLE) [8,9], Radio Frequency Identification (RFID) [10], and Ultra-wideband (UWB) [11], have also been used for IPS. However, BLE has a slower transmission speed than Wi-Fi and is less suitable for real-time tracking of moving devices. Passive RFID tags are cost-effective but have a limited transmission range, requiring more tags to be installed and maintained than a single Wi-Fi access point (AP). Active RFID tags have a more extended range but are more expensive to implement. UWB has the potential for higher positioning accuracy with large bandwidth and fast data transmission but requires additional hardware deployment.

1.
It proposes the use of a Genetic Algorithm (GA) with an entropy-enhanced objective function to determine the optimal deployment of Wi-Fi Sniffers in the area of interest for indoor positioning.

2.
Real Wi-Fi Sniffers are deployed to implement passive IPS, which identifies a DUT by finding the DUT's MAC address from a pre-deployed Wi-Fi access point (AP). 3.
The real implementation of a real-time online passive indoor positioning system (IPS) as a proof of concept. The IPS detects the online presence of DUTs and uses their RSSIs as online fingerprints for position estimation.
The remainder of the study is organised as follows. Section 2 presents related work for passive IPS. Section 3 describes the simulation of the Wi-Fi RSSI. Section 4 optimises the deployment of Wi-Fi Sniffers. Section 5 describes the automated collection of Wi-Fi fingerprints. Section 6 determines the positioning errors for simulated and measured data. Section 7 discusses the online IPS, and Section 8 draws conclusions and gives details of future work.

Related Work
Active Wi-Fi-based IPS has certain disadvantages. Installing additional APIs on the DUT, such as in [16], may not be practical, particularly for military and commercial applications. Active Wi-Fi scanning also consumes resources from the DUT and drains the battery more quickly, which may not be desirable for the user. [17].
Wi-Fi signals are theoretically bi-directional and reciprocal, which means that a Wi-Fi module can run in monitor mode to collect information from the DUT and run in access point mode to provide internet service. However, currently, no commercially available Wi-Fi APs support operating in access point mode and monitor mode simultaneously, so a custom Wi-Fi Sniffer device is required to collect information such as RSSI, Channel State Information (CSI), or Probe request message (PRqM) from the DUT. Additionally, suppose the DUT is not actively transmitting its Wi-Fi information to nearby Wi-Fi APs. In that case, detecting and tracking the DUT in real-time can be challenging using network-side fingerprinting techniques for indoor positioning. Figure 1 shows the 802.11 association process [18]. The PRqM is used to passively detect the presence of APs in the surroundings [19][20][21]. A DUT sends PRqMs periodically over multiple Wi-Fi channels, approximately every 10-15 seconds, to discover nearby Wi-Fi APs. The PRqM contains the MAC address of the DUT for identification and RSSI as Wi-Fi information. When the connection is established, the DUT can specify a particular SSID to ensure a seamless connection. This message is sent occasionally from a DUT even if Wi-Fi is disabled.
cations. Active Wi-Fi scanning also consumes resources from the D tery more quickly, which may not be desirable for the user. [17].
Wi-Fi signals are theoretically bi-directional and reciprocal, w Fi module can run in monitor mode to collect information from the point mode to provide internet service. However, currently, no c Wi-Fi APs support operating in access point mode and monitor mo a custom Wi-Fi Sniffer device is required to collect information s State Information (CSI), or Probe request message (PRqM) from t suppose the DUT is not actively transmitting its Wi-Fi information In that case, detecting and tracking the DUT in real-time can be work-side fingerprinting techniques for indoor positioning. Figure 1 shows the 802.11 association process [18]. The PRqM detect the presence of APs in the surroundings [19][20][21]. A DUT sen over multiple Wi-Fi channels, approximately every 10-15 seconds, Fi APs. The PRqM contains the MAC address of the DUT for iden Wi-Fi information. When the connection is established, the DUT c SSID to ensure a seamless connection. This message is sent occasion if Wi-Fi is disabled. One study [20] implemented an active request-to-send (RTS) p the DUT to reply with a clear-to-send (CTS) message and increase increases the number of Wi-Fi packets from the DUT to allow Sn faster.
Some studies use RSSI as Wi-Fi fingerprints for passive posit used a passive Wi-Fi tracking system to track DUTs in an exhibitio tion-maximisation (EM) algorithm determines the optimal para One study [20] implemented an active request-to-send (RTS) packet injection to force the DUT to reply with a clear-to-send (CTS) message and increase the updating rate. This increases the number of Wi-Fi packets from the DUT to allow Sniffers to capture them faster.
Some studies use RSSI as Wi-Fi fingerprints for passive positioning. One study [22] used a passive Wi-Fi tracking system to track DUTs in an exhibition venue. An Expectationmaximisation (EM) algorithm determines the optimal parameters for the signal-strengthto-distance model for different DUT models to reduce the positioning error. The system determines the MAC address of the DUT via a Wi-Fi connection and 10 Wi-Fi Sniffers were Sensors 2023, 23, 1376 4 of 18 deployed in the experimental venue. The study showed that different DUT models produce different positioning errors, of as much as 5.3 m if fingerprinting is used and as low as 1.7 m if multi-lateration is used. The study did not determine the optimal deployment for Wi-Fi Sniffers.
In terms of passive systems, Wi-Fi Sniffers can miss Wi-Fi packets from the DUT because the DUT does not actively participate in the process. Wi-Fi Sniffers may also not cover specific reference points (RPs) (dead zone) because the signal from the DUT is weak. Building structures that are not suitable for the installation of Wi-Fi Sniffers also degrade positioning performance. To overcome the above-mentioned shortage, Ko et al. [15] used legacy active Wi-Fi fingerprints as complementary features to enhance passive fingerprints. Eight Sniffers were used for passive fingerprinting in the experimental venue; using KNN, the average positioning error is 2.18 m. In addition, Luo et al. [23] proposed passive IPS using the mapping method for the collected RSS traces to specific indoor pathways by placing the Sniffers in evenly.
The placement of access points or sniffers is a critical factor impacting user transmission experience and localisation services in passive Wi-Fi-based IPS systems. Previous studies of passive Wi-Fi-based IPS deal with the extraction of Wi-Fi information from unmodified DUTs for positioning, increasing the number of Wi-Fi packets by injecting packets, and reducing positioning error using various positioning algorithms. Elmosilhy et al. [24] use GA to maximise the total system capacity and minimise transaction error. However, little attention has been paid to the effect of different deployment patterns for Wi-Fi Sniffers on positioning accuracy.
Ismail et al. [25] proposed an optimised deployment method considering the percentage of dead zones, the average strength of RSSI, and the variance of the power of RSSI in each RP. Ibrahim et al. [26] compared different objective functions in the genetic algorithm and the quantity of the access points on the localisation error. However, according to our experiment, the more Sniffers we deployed, the more the estimated deployment lead Sniffers to be thronged. The standard GA sometimes produced solutions where multiple Sniffers were placed close to each other. In other words, the features of the RP in several Sniffers would have the same trends and cause the part to be redundant. This can be problematic because the Sniffers should be distributed evenly to provide the maximum amount of distinct and useful information. We proposed the Entropy-Enhanced objective function to address this problem, elaborated in Section 4.

Simulation: Wi-Fi RSSI Simulation Using iBwave Wi-Fi Suite
In homes and small and medium enterprises and other unmonitored indoor premises, Wi-Fi APs are randomly placed to ensure good wireless communication. Wi-Fi signals are strong or weak at various RPs, so for indoor positioning, it is troublesome. Passive Wi-Fi indoor positioning systems do not have access to additional complementary features for real-time positioning without the active endorsement of the DUT. It is essential to extract the maximum amount of useful information from each Sniffer on each RP to ensure maximum positioning accuracy.
Some modern institutions and venues, such as hotels and shopping malls, use a site surveying tool that contains information about the floor plan to deploy Wi-Fi infrastructure. For example, iBwave [27], which is a provider of commercial network design solutions, lists some case studies of the optimal design and deployment of Wi-Fi networks in airports, campuses, and convention centres, on its official website. The company designs and visualises signal propagation for Wi-Fi networks in 3D by predicting signal coverage and wireless performance for indoor wireless networks.
The fast ray tracing propagation model is a default choice. The simulation tool allows floor plans that are scaled to real-world measurements, and walls that are constructed of different materials and are of different heights are modelled to better represent the real-world environment. Figure 2a shows the overall predicted Wi-Fi signal strengths for AP0, AP1, AP2, and AP3 in the Wi-Fi 2.4 GHz band at a height of 3 m. In the heatmap, pink indicates a stronger RSSI and dark blue indicates a weaker RSSI. Figure 2b shows a 3D counterpart with a better view of modelling the wall. indicates a stronger RSSI and dark blue indicates a weaker RSSI. Figure 2b shows a 3D counterpart with a better view of modelling the wall.
(a) (b)  Figure 3 shows the Wi-Fi infrastructure, as deployed using the simulation tool, which identifies <!--MathType@Translator@5@5@MathML2 (no namespace).tdl@MathML 2.0 (no namespace)@ --> <math> <mi>R</mi> </math> <!--MathType@End@5@5@ --> possible locations for Sniffers before deployment. In this setup, it is assumed that the simulated signal strength for the Wi-Fi AP is equivalent to the RSSI that is measured by the Wi-Fi Sniffer that is deployed in the real world, so the Wi-Fi AP for this simulation context is treated as a Wi-Fi Sniffer. We investigate the correlation between the simulated signal strengths by the Wi-Fi AP and the RSSIs monitored by the Wi-Fi Sniffer deployed in the real world in the following experiments. Furthermore, the estimated signal strengths of all Sniffers on each RP by the iBwave software would form a pseudo fingerprint feature for the Sniffer deployment.

Methodology: Optimal Deployment of Wi-Fi Sniffers Using Genetic Algorithm and Entropy-Enhanced Genetic Algorithm
Each Wi-Fi on different RPs must provide distinct features so that the information is helpful to distinguish different RPs for positioning algorithms. If <!--MathType@Trans-lator@5@5@MathML2 (no namespace).tdl@MathML 2.0 (no namespace)@ --> <math> <mi>M</mi>  Figure 3 shows the Wi-Fi infrastructure, as deployed using the simulation tool, which identifies R possible locations for Sniffers before deployment. In this setup, it is assumed that the simulated signal strength for the Wi-Fi AP is equivalent to the RSSI that is measured by the Wi-Fi Sniffer that is deployed in the real world, so the Wi-Fi AP for this simulation context is treated as a Wi-Fi Sniffer. We investigate the correlation between the simulated signal strengths by the Wi-Fi AP and the RSSIs monitored by the Wi-Fi Sniffer deployed in the real world in the following experiments. Furthermore, the estimated signal strengths of all Sniffers on each RP by the iBwave software would form a pseudo fingerprint feature for the Sniffer deployment.  Figure 3 shows the Wi-Fi infrastructure, as deployed using the simulation too identifies <!--MathType@Translator@5@5@MathML2 (no namespace).tdl@Math (no namespace)@ --> <math> <mi>R</mi> </math> <!--MathType@End@5@5@ --> possible locations for Sniffers before deployment. In this setup, it is assum the simulated signal strength for the Wi-Fi AP is equivalent to the RSSI that is m by the Wi-Fi Sniffer that is deployed in the real world, so the Wi-Fi AP for this sim context is treated as a Wi-Fi Sniffer. We investigate the correlation between the si signal strengths by the Wi-Fi AP and the RSSIs monitored by the Wi-Fi Sniffer d in the real world in the following experiments. Furthermore, the estimated strengths of all Sniffers on each RP by the iBwave software would form a pseudo print feature for the Sniffer deployment.

Methodology: Optimal Deployment of Wi-Fi Sniffers Using Genetic Algorithm and Entropy-Enhanced Genetic Algorithm
Each Wi-Fi on different RPs must provide distinct features so that the information is helpful to distinguish different RPs for positioning algorithms. If M Sniffers are deployed in the experimental venue, M Sniffers must be optimally selected from the R possible Wi-Fi Sniffers locations so that at each RP, the RSSI for at least K S Sniffers can be used for positioning.
The placement of Wi-Fi Sniffers is a constrained optimisation problem. The classic Genetic Algorithm (GA) is adopted to explore the state-space landscape to look for the optimal point instead of checking through all the deployment permutations. This study uses a set of R = 133 possible Wi-Fi Sniffers locations (L 1 , L 2 , . . . , L R ), as shown in Figure 4. M = 20 Wi-Fi Sniffers are deployed in these R locations, K S has a value of 5, and configuration Q is a set of specified locations for the Wi-Fi Sniffers. The simulated RSSIs  Similar to previous studies [25,26], a Wi-Fi Sniffer configuration selection algorithm is developed using a GA with the mean r, variance σ 2 r , and penalty parameter P as variables to minimise the objective function J and obtain the optimal configuration Q for deployment through generations.
The simulation uses 524 (N) of RP. The minimum RSSI setting for the algorithm is RSSI min = −80 dB, because communication is not possible at lower values. The maximum RSSI is RSSI max = −30 dB. The raw RSSI value r mn raw at each RP is normalised as The mean and variance for each configuration are calculated as follows: The objective function J defined in [24] is The weights in (4) are ω 1 = 0.8 and ω 2 = 0.2, similar to the values for a previous study [25]. The average RSSI at the RP is maximised and the variance is minimised. P is defined as the percentage of RPs in the dead zone where not all the largest K S RSSI values for the Sniffers are greater than RSSI min .
The parameters for the GA are shown in Table 1. The GA produces a convergent solution. The configurations in the population are initialised. Each configuration (chromosome) consists of M randomly selected Wi-Fi Sniffers (genes) from R possible locations. The fitness value J for each configuration is calculated based on the objective function (4). Half of the configurations with smaller J values are retained in the population for the next generation. Two of these better configurations are then randomly selected and their genes are mixed to generate a new array of 2M locations, in which M locations are randomly selected to form a new configuration. This crossover process is repeated to fill the other half of the configurations that are required for the new population for the next generation. After the crossover, the algorithm iterates over each index in the configuration to monitor mutation. If a mutation occurs, a number in the range of 1 to R (inclusive) is randomly selected to represent a new Sniffer location index in the original configuration. Using the smallest fitness value that is obtained at generation 290, the solution converges as shown in Figure 4a.
The optimal deployment pattern of Wi-Fi Sniffers, as determined using GA, is shown by the red triangles in Figure 5. The GA gives a converged solution, but eight Wi-Fi Sniffers are placed in close proximity, as shown in the green box. In general, Wi-Fi Sniffers should be distant from each other so that each gives significantly distinct and useful information. Therefore, to maximise the contributions of each Wi-Fi Sniffer to the maximum number of RPs, entropy S is used to enhance the objective function of the GA in this study. Entropy is a common metric for machine learning because it measures the unpredictability or impurity of a system [28][29][30][31][32]. The more disordered or impure a feature is, the greater the amount of information that can be extracted from that feature to better discriminate between Sniffers. <mi>R</mi> </math> <!--MathType@End@5@5@ --> (inclusive) is randomly selected to represent a new Sniffer location ind inal configuration. Using the smallest fitness value that is obtained at gene solution converges as shown in Figure 4a.
The optimal deployment pattern of Wi-Fi Sniffers, as determined using by the red triangles in Figure 5. The GA gives a converged solution, but eig ers are placed in close proximity, as shown in the green box. In general, should be distant from each other so that each gives significantly distinct formation. Therefore, to maximise the contributions of each Wi-Fi Sniffer to number of RPs, entropy <!--MathType@Translator@5@5@Ma namespace).tdl@MathML 2.0 (no namespace)@ --> <math> <mi>S</mi> </math> <!--MathType@End@5@5@ --> is used to enhance the objective function of the GA in this study. Ent mon metric for machine learning because it measures the unpredictability a system [28][29][30][31][32]. The more disordered or impure a feature is, the greater information that can be extracted from that feature to better discriminate bet Before defining the entropy S for GA, it is important to use the concept of the covariance matrix for principal component analysis (PCA) to determine the correlation between Wi-Fi Sniffers [33,34]. An M × M covariance matrix Σ, for which each element represents the covariance between Sniffers, is defined as follows: In matrix form, this is written as follows: where Σ 11 represents the self-variance of Sniffer 1 and Σ 12 represents the covariance between Sniffers 1 and 2. The eigenvalues λ of Σ are calculated to determine the variance in the data along the new feature axes, only if vector A, which is the eigenvector of Σ that corresponds to the eigenvalue λ, is non-zero, so: where the eigenvalues λ = λ 1 , λ 2 , . . . , λ M are sorted in descending order. The sum of these eigenvalues is λ total The normalised eigenvalues are defined as λ m = λ m /λ total for m = 1, · · · , M such that each has a value between 1 and 0. Entropy is then defined as follows: which are used to measure the correlation between the Sniffers. By maximising the entropy, the GA encourages a more even distribution of the Sniffers and helps avoid having multiple Sniffers placed in close proximity to each other. For the optimal condition, each value for λ is equal. There is no correlation between the Sniffers, so their contributions to the features are equally important, and the covariance matrix is a unit matrix. However, in a real environment, the positions of Sniffers affect the covariance matrix. If Sniffers are too close to each other, their features are more correlated so some of the information that they provide is less useful.
The entropy-enhanced objective function is defined as follows: where subtraction is performed on entropy value to maximise its contribution. An exponent is also used for the penalty parameter P to increase its sensitivity in terms of penalising the dead zone. The parameter values in Table 1 are used to calculate the converged solution using the entropy-enhanced objective function in the GA. The solution is obtained at generation 430, as shown in Figure 4b. Figure 6 shows the optimal positions of Sniffers using the entropy-enhanced objective function. The Sniffers are further from each other than those in Figure 5, because S is included in the calculation. The optimisation is repeated several times using different initial conditions, and the results show that the positions of Sniffers do not differ significantly. The configuration with the smallest fitness value for these trials is used for the real deployment.

Experimental Setup: Automated Collection of Wi-Fi Fingerprints as Of
Multiple Realtek BW-16s are deployed as Wi-Fi Sniffers to scan and mation from nearby Wi-Fi-enabled devices. The BW-16 is embedded with o module and can operate in Wi-Fi 2.4 GHz and 5 GHz bands. When working itor mode, it is impossible to operate in Wi-Fi client mode to connect to th data transfer between the endpoint and server. Therefore, a suitable Wi needed to transfer and receive data. In the study, Raspberry Pi 3B+ is chose client for BW-16. This fully functional single-board computer is incorporat Fi module and completed with decent processing power and memory fo

Experimental Setup: Automated Collection of Wi-Fi Fingerprints as Offline Data
Multiple Realtek BW-16s are deployed as Wi-Fi Sniffers to scan and collect information from nearby Wi-Fi-enabled devices. The BW-16 is embedded with one Wi-Fi radio module and can operate in Wi-Fi 2.4 GHz and 5 GHz bands. When working in Wi-Fi monitor mode, it is impossible to operate in Wi-Fi client mode to connect to the network for data transfer between the endpoint and server. Therefore, a suitable Wi-Fi gateway is needed to transfer and receive data. In the study, Raspberry Pi 3B+ is chosen as the Wi-Fi client for BW-16. This fully functional single-board computer is incorporated with a Wi-Fi module and completed with decent processing power and memory for remote programming and control, as well as supporting general-purpose input/output (GPIO) for system expansion. As real-world deployment often involves proper power supply with wiring for the Wi-Fi infrastructure, the Wi-Fi Sniffer is connected to a portable power supply, as shown in Figure 7 in this preliminary study. data transfer between the endpoint and server. Therefore, a su needed to transfer and receive data. In the study, Raspberry Pi 3B client for BW-16. This fully functional single-board computer is Fi module and completed with decent processing power and m gramming and control, as well as supporting general-purpose system expansion. As real-world deployment often involves pro wiring for the Wi-Fi infrastructure, the Wi-Fi Sniffer is connected ply, as shown in Figure 7 in this preliminary study.  Using an in-house Wi-Fi surveying robot, which is shown in Figure 8  The logical flow of coordination between the robot and the server for the automated collection of training data is shown in Figure 9. A Raspberry Pi 4 server verifies that all Wi-Fi Sniffers are online and that the connection is sufficient for data transfer while it waits for the robot client to come online. To collect RP data for an indoor positioning system, a list of targeted RPs is input into a ROS as ground truth for the robot's movement. A robot client program that is written in Python acts as an intermediary between the robot and the server. It transmits the current RP to the server and the server embeds the ground truth in the collected RSSI fingerprints. The server confirms that all fingerprints on the current RP have been collected by sending an "ok" signal to the robot client and the client then sends a "ready to move" signal back to ROS, which moves to the next RP.
tations on the robot and were configured to operate as Wi-Fi DUT for which Wi-Fi Sniffers can passively collect their Wi-Fi packe traffic in the vicinity.
The logical flow of coordination between the robot and the collection of training data is shown in Figure 9. A Raspberry Pi Wi-Fi Sniffers are online and that the connection is sufficient f waits for the robot client to come online. To collect RP data for an tem, a list of targeted RPs is input into a ROS as ground truth fo A robot client program that is written in Python acts as an interme and the server. It transmits the current RP to the server and the se truth in the collected RSSI fingerprints. The server confirms tha current RP have been collected by sending an "ok" signal to the r then sends a "ready to move" signal back to ROS, which moves t This study uses weighted K-nearest neighbours (WKNN) f rithm. The Euclidean distance between the fingerprint of the DU all RPs is calculated using the normalised value for the RSSI. Pos Type@Translator@5@5@MathML2 (no namespace).tdl@MathM -> <math> <mover accent='true'> <mi>p</mi> <mo>&#x005E;</mo> This study uses weighted K-nearest neighbours (WKNN) for the positioning algorithm. The Euclidean distance between the fingerprint of the DUT and the fingerprints of all RPs is calculated using the normalised value for the RSSI. Position estimatep is calculated as follows:p where the K smallest Euclidean distances D k are used, p k are the coordinates of the k th RP, and the weight w k = 1/D k . The value of K is 10 [32], a trade-off for accuracy and performance which will be explained in the next Section. The evaluation metric is the root mean squared error (RMSE), which is defined as follows: where N 0 is the total number of testing RPs and p denotes their ground truth. Figure 10 shows the training and testing RPs using offline data with entropy, which are respectively represented by blue circles and red crosses. There are 524 training points and N 0 = 30 testing points. <mo>=</mo></mrow> </math> <!--MathType@End@5@5@ --> 30 testing points.

Results and Discussion: Positioning Accuracy Using Simulate Measured Data
The results in Table 2 show that the RMSE for the Wi-Fi Sniff calculated using entropy for the Wi-Fi 2.4 GHz and 5 GHz band that is calculated not using entropy. For the GA optimisation, iBw and simulate electromagnetic waves. The software could simulate GHz Wi-Fi signals. For the measurement in the Wi-Fi 5 GHz ba 24.7% less, and the RMSE value for the Wi-Fi 2.4 GHz band is 7.1 lation data for the 5 GHz and 2.4 GHz bands, the RMSE values ar respectively, if entropy is used for the calculation.

Results and Discussion: Positioning Accuracy Using Simulated and Offline Measured Data
The results in Table 2 show that the RMSE for the Wi-Fi Sniffers configuration that is calculated using entropy for the Wi-Fi 2.4 GHz and 5 GHz bands is less than the value that is calculated not using entropy. For the GA optimisation, iBwave is used to calculate and simulate electromagnetic waves. The software could simulate both the 2.4 GHz and 5 GHz Wi-Fi signals. For the measurement in the Wi-Fi 5 GHz band, the RMSE value is 24.7% less, and the RMSE value for the Wi-Fi 2.4 GHz band is 7.1% less. Using the simulation data for the 5 GHz and 2.4 GHz bands, the RMSE values are 14.6% and 19.2% less, respectively, if entropy is used for the calculation. The results show that positioning accuracy is increased using an optimised configuration with entropy enhancement, but the increase is not significant in some cases. Therefore, comparisons are made using different numbers of Wi-Fi Sniffers to determine whether this observation is valid.
The positioning error using the simulated data versus the number of Sniffers is plotted in Figure 11.  The positioning error for the measured data versus the number in Figure 12. For different numbers of Sniffers (10, 15, 20 Sniffers), t for the configurations that are calculated using entropy for both Wi-F those for configurations that are not calculated using entropy. The r and measurement verify that using a GA with entropy allows more accuracy than calculations that do not use entropy. The positioning error for the measured data versus the number of Sniffers is plotted in Figure 12. For different numbers of Sniffers (10,15,20 Sniffers), the positioning errors for the configurations that are calculated using entropy for both Wi-Fi bands are less than those for configurations that are not calculated using entropy. The results for simulation and measurement verify that using a GA with entropy allows more accurate positioning accuracy than calculations that do not use entropy.  Figure 13 shows that generating the optimal configuration using than not using entropy because time is required to calculate the cova eigen analysis. For configurations that use 20 Sniffers or less, the calc the same, whether entropy is used. However, optimising 50 Sniffer time if entropy is used. The time that is required to calculate the o affects the pre-deployment phase. Even though there are many perm tational time for 20 Wi-Fi Sniffers is still under 10 minutes, which is  Figure 13 shows that generating the optimal configuration using entropy takes longer than not using entropy because time is required to calculate the covariance matrix and for eigen analysis. For configurations that use 20 Sniffers or less, the calculation time is nearly the same, whether entropy is used. However, optimising 50 Sniffers require 670% more time if entropy is used. The time that is required to calculate the optimal solution only affects the pre-deployment phase. Even though there are many permutations, the computational time for 20 Wi-Fi Sniffers is still under 10 minutes, which is acceptable. time if entropy is used. The time that is required to calculate th affects the pre-deployment phase. Even though there are many p tational time for 20 Wi-Fi Sniffers is still under 10 minutes, which The effects of different values of K on positioning error for using simulated and offline measured data, with the number of W The results are shown in Figures 14 and 15, respectively. From th lowest positioning error of 1.42 m is achieved using entropy in t ration at K = 17. For the measured data, the lowest positioning same configuration. In general, the configuration that uses entro ing error than the configuration that does not use entropy for bo lated and measured data. As the value of K increases, the pos decrease until they reach a point of saturation. The optimal value through cross-validation. It is worth noting that higher values computation times and slower update rates in online systems. In = 10 was chosen as a trade-off between positioning error and com  Figures 14 and 15, respectively. From the simulation results, the lowest positioning error of 1.42 m is achieved using entropy in the Wi-Fi 5 GHz configuration at K = 17. For the measured data, the lowest positioning error is 2.16 m using the same configuration. In general, the configuration that uses entropy has a lower positioning error than the configuration that does not use entropy for both Wi-Fi bands for simulated and measured data. As the value of K increases, the positioning errors generally decrease until they reach a point of saturation. The optimal value of K can be determined through cross-validation. It is worth noting that higher values of K can lead to longer computation times and slower update rates in online systems. In this study, a value of K = 10 was chosen as a trade-off between positioning error and computation time.

Use Case: Online Passive Indoor Positioning
This study calculates the optimal deployment of Wi-Fi Sniffers and Wi-Fi-based IPS in a real environment to demonstrate proof-of-concept. T of the Ming-Da Building in National Taiwan University is the area of i study. This preliminary study involves a scenario whereby a "free" Wi-F provided, so all users can connect their DUT to that offered Wi-Fi. At the current passive IPS can extract the DUT's MAC address for identificatio from the Sniffer for positioning. This ensures that Wi-Fi packets from the D ble at regular intervals, allowing the Wi-Fi Sniffers to capture the necessa for passive positioning in real-time. Note that DUTs do not connect directl ers. Figure 16 illustrates the extraction of the DUT's MAC address for MAC address of the DUT was extracted as follows: 1. The DUT connects with a randomly placed wireless AP. 2. The server obtains the DUT's MAC address from the offered AP. 3. The MAC address is then sent to the wireless Sniffers to record the D 4. The RSSI values are then sent back to the server for data integration.
By keeping a list of connected clients available on the AP, the syst identify which device is being used for positioning. Even if MAC random on the DUT, the IPS can still detect and localise the DUT because a new MA be registered to the Wi-Fi AP. However, identifying if the same DUT has with a different MAC address in the past remains a challenge.

Use Case: Online Passive Indoor Positioning
This study calculates the optimal deployment of Wi-Fi Sniffers and uses a passive Wi-Fi-based IPS in a real environment to demonstrate proof-of-concept. The fourth floor of the Ming-Da Building in National Taiwan University is the area of interest for this study. This preliminary study involves a scenario whereby a "free" Wi-Fi connection is provided, so all users can connect their DUT to that offered Wi-Fi. At the same time, the current passive IPS can extract the DUT's MAC address for identification and its RSSI from the Sniffer for positioning. This ensures that Wi-Fi packets from the DUT are available at regular intervals, allowing the Wi-Fi Sniffers to capture the necessary information for passive positioning in real-time. Note that DUTs do not connect directly to Wi-Fi Sniffers. Figure 16 illustrates the extraction of the DUT's MAC address for this study. The MAC address of the DUT was extracted as follows: 1.
The DUT connects with a randomly placed wireless AP.

2.
The server obtains the DUT's MAC address from the offered AP.

3.
The MAC address is then sent to the wireless Sniffers to record the DUT's RSSI.

4.
The RSSI values are then sent back to the server for data integration. The position estimate for each DUT is calculated on the server u real-time Web plot is generated using Plotly Express and Dash. Figu system can detect more than 20 connected Wi-Fi DUTs in a classroom represents the position estimate for an online DUT, and the MAC addr on the right side of the figure. By keeping a list of connected clients available on the AP, the system can quickly identify which device is being used for positioning. Even if MAC randomisation occurs on the DUT, the IPS can still detect and localise the DUT because a new MAC address will be registered to the Wi-Fi AP. However, identifying if the same DUT has been registered with a different MAC address in the past remains a challenge.
The position estimate for each DUT is calculated on the server using WKNN, and a real-time Web plot is generated using Plotly Express and Dash. Figure 17 shows that the system can detect more than 20 connected Wi-Fi DUTs in a classroom. Each coloured dot represents the position estimate for an online DUT, and the MAC address of each is shown on the right side of the figure. The position estimate for each DUT is calculated on the serv real-time Web plot is generated using Plotly Express and Dash. F system can detect more than 20 connected Wi-Fi DUTs in a classr represents the position estimate for an online DUT, and the MAC a on the right side of the figure. WKNN is a simple algorithm and a lazy learner, so the alg training data for any generalisation. It compares each individua online query data are supplied so the time it takes to predict th with the number of online DUTs [35]. The system requires aroun the position estimates for 23 DUTs.
Previous studies [23,36] show that different models of DUT terms of positioning because each DUT has a different RSSI distr cause different DUTs have different characteristics, such as the p antenna. The DUT does not actively participate in the positioning packets are transmitted if a phone screen is off or the device is Sniffers can then miss packets, so the DUT appears to be static in period of time. Complementary features, such as pedestrian dea not be used for passive positioning, so mobility prediction using of travel for the DUT cannot be implemented [37,38].

Conclusions
A passive IPS is presented in this study, that uses Wi-Fi sign cation of a DUT without requiring additional APIs or active par The system employs Wi-Fi Sniffers to scan and collect the DUT prints which are then used to map vectors of RSSI to RPs in the ph WKNN is a simple algorithm and a lazy learner, so the algorithm does not use the training data for any generalisation. It compares each individual data point when new online query data are supplied so the time it takes to predict the positions will increase with the number of online DUTs [35]. The system requires around 2 seconds to calculate the position estimates for 23 DUTs.
Previous studies [23,36] show that different models of DUTs perform differently in terms of positioning because each DUT has a different RSSI distribution. This occurs because different DUTs have different characteristics, such as the performance of the Wi-Fi antenna. The DUT does not actively participate in the positioning process so fewer Wi-Fi packets are transmitted if a phone screen is off or the device is in power-saving mode. Sniffers can then miss packets, so the DUT appears to be static in relation to one RP in a period of time. Complementary features, such as pedestrian dead reckoning (PDR), cannot be used for passive positioning, so mobility prediction using the speed and direction of travel for the DUT cannot be implemented [37,38].

Conclusions
A passive IPS is presented in this study, that uses Wi-Fi signals to determine the location of a DUT without requiring additional APIs or active participation from the user. The system employs Wi-Fi Sniffers to scan and collect the DUT's RSSI as Wi-Fi fingerprints which are then used to map vectors of RSSI to RPs in the physical world. The online positioning is obtained using the WKNN method. Nonetheless, the impact of the optimal deployment of Sniffers on other positioning algorithms, such as random forest and deep learning, deserves to be explored in future work.
In order to maximise the Wi-Fi RSSI received at each RP for system performance improvement, a modified GA with an entropy-enhanced objective function is utilised to optimise the deployment of the Wi-Fi Sniffers. Data collection of RSSI at each RP is automated through a surveying robot for the Wi-Fi 2.4 GHz and 5 GHz bands. A configuration of 20 Wi-Fi Sniffers that are calculated using entropy enhancement for both bands allows passive positioning with a respective RMSE value of 2.41 m and 2.23 m. These values are at least 7.10% less than the values that are calculated without using entropy. Simulation results also demonstrated that the RMSE for positioning for the configuration that is calculated using entropy for both Wi-Fi bands is at least 9.02% less than that of the figure for a configuration that is calculated without using entropy for different numbers of Wi-Fi Sniffers. The increase in performance is verified by the measurement data for configurations that use 10, 15 and 20 Sniffers.
The study demonstrates a proof-of-concept real-time online passive IPS at NTU, which can detect the online presence of DUTs and use their RSSIs as online fingerprints for position estimation. In the experiment, wireless Sniffers are deployed to record the received signal strength indicator (RSSI) values of the device-under-test (DUT). For passive positioning systems, the AP-Sniffer network is specifically designed for positioning so the physical locations must be robust to physical tampering to ensure optimal Wi-Fibased positioning. The method of previous studies [39][40][41], which monitors abnormal CSI waveforms, can be used by this study to detect any physical tampering with Sniffers to maintain good performance.
The system must restrict specific experimental areas and construct blacklists and whitelists to eliminate unwanted static targets, such as Wi-Fi printers or other Wi-Fi APs. This reduces the processing load for the server. Overall, this Internet of Things (IoT) solution effectively deploys wireless Sniffers using entropy-enhanced genetic algorithms to implement a passive fingerprinting positioning system, resulting in improved positioning accuracy.