The technology is of great interest for school bus children’s RSSI location tracking, namely WiFi and BLE, both of which are classified as types of indoor location tracking, while GPS is often used for outdoor location tracking. Both WiFi and BLE operate on the 2.4 GHz band. WiFi has over 50 sub-bands, while BLE has 40 channels. The WiFi received signal strength indicator (RSSI) reflects the total value of all channel information. For this reason, WiFi is not useful for indoor applications. The BLE is becoming the focus of current indoor positioning technologies because it takes advantage of low power consumption and easy deployment [

18]. Bluetooth RSSI is measured with constant power transmission. There will be complex noise that greatly affects positioning accuracy and results in the appearance of the time-varying characteristics of RSSI. In addition, indoor electromagnetic environments, multiple fading and other noise, as well as the RSSI fluctuation of two Bluetooth beacons made by different companies all affect the accuracy and Bluetooth RSSI measured in the system [

19,

20,

21,

22]. In order to reduce random fluctuations and power consumption of RSSI and improve positioning accuracy, this research presents a design of a student-tracking smartwatch device by measuring signal strength with RSSI to determine whether the child is still inside or got off the school bus. Moreover, there is a notification to the carpool teacher and the driver.

The distance of propagation path-loss shows the channel fading characteristic follows a lognormal distribution. Thus, the instant RSSI distance measurement generally uses the logarithmic distance path-loss model, the propagation model that reveals the corresponding relationship between distance and RSSI can be expressed as Equation (1) [

16,

17,

18].

where RSSI is a dependent variable of the received signal strength indication,

D is the estimated distance between the transmitter and the receiver, and

n is a path-loss parameter related to the specific wireless transmission environment. The more obstacles there are, the larger

n will be. A is the RSSI with distance

D_{0} from the transmitter, which is a constant value.

σ is a parameter representing the path loss exponent while

X_{σ} is a Gaussian-distribution random variable with mean 0 and variance σ

^{2}. For the convenience of calculation,

D_{0} usually takes a constant value. Since

X_{σ} has a mean of 0, the distance-loss model can be obtained with

where

${d}_{k}$ is the distance from the unknown transmitter node to the

kth the receiver node, and

${A}_{k}$ and

${n}_{k}$ are the model parameters of the

kth receiver node.

${A}_{k}$ is the measured RSSI when the received node is a fixed distance away from the transmitting node. Form (2) found that the parameters

${A}_{k}$ and

${n}_{k}$ should be accurately estimated to improve the accuracy. The

${n}_{k}$ parameters are relevant with the wireless transmission environment which can be obtained through the optimization of many experimental measurements.

${A}_{k}$ depends on the transmitting power of Bluetooth. Ideally,

${A}_{k}$ should be determined by specifying one of the Bluetooth signals. The transmission power of Bluetooth varies with time.

Accurately calculating the relationship between RSSI and distances using the logarithmic distance loss model due to the complex indoor environment is extremely difficult for researchers. Therefore, there are several methods for modelling the RSSI with the most accurate distances based on any application system. However, several applications do not require a high accuracy localization, but need area-based localization; similarly, this article does not require the actual position of the tracked object, but rather to ensure the objects are within a certain area. Rather than having an accurate position of the object, users are more interested to know with absolute certainty that the tracked object is within a certain area. Therefore, this research presents a simplified method to locate tracked objects in zones with high certainty and reliability to separate the positional zone between in the car and outside the school bus only to track whether the students, especially young children, are still stuck in the school bus or not. Thus, the least mean squares (LMS) algorithm is used to fit the parameters by gathering the RSSI values for Bluetooth beacons at different distances. Suppose that the distance estimation is based on

$M$ samples of

$RSS{I}_{\left(k,i\right)}$, which represents the ith RSSI sample measured by the

kth the receiver node. For getting a good performance, the median value of

$RSS{I}_{\left(k,i\right)}$ is used to obtain the distance estimate:

where

$RSS{I}_{k}$ is the median RSSI value measured by the

kth and the receiver node is given by

To characterize the RSSI model indoor environment, measurements have been realized. The experiment has been done on a school bus.