**6. The use of smartphones in IoT and IoE**

humidity, and light information to evaluate the healthy level of the earthen sites by applying the concept of artificial antibodies to identify unusual environmental factors" [48], and "*Smart heat and electricity management transportation"* suggested by Kyriazis et al. [49] that "uses smart meters for electricity consumption and mobile sensors to assess the effect of real-time electricity usage on the energy consumption of buildings and individual appliances, etc." [9]. In conclusion, the IoT-based applications in the environment and disaster field should at least include the following components as suggested by authors in [9]: *environment sensors*, which help gathering and processing information such as humidity, temperature, and pressure from the environment, *WSN and mobile communication* (3G and 4G) helping to communicate the sensed information to other users or systems and trigger the necessary alerts, and *participatory sensing applications*, which, by the use of multiple sensors and devices to capture the environment data and sense the physical world, and to help making the right decisions when facing

Home automation can be made possible using IoT technologies to allow us to remotely control our home's appliances based on our needs [50]. Example applications include but are not limited to monitoring of utility meters, energy, and water supply to avoid overloading or leaks, and gardening sensors, which could be used to water plants according to their needs and measure their vitals such as light, humidity, and moisture [50]. Connected to the IoT, smart buildings' energy and maintenance could be optimized and predicted, along with

The IoT technologies, such as field-based sensors, can be used to monitor soil humidity, moisture, and nutrition, automatically adjust the temperature to maximize agricultural production, and communicate with weather stations to get the latest forecasts [50, 39]. They can also help for an accurate fertilization and watering [50]. Sensors used for animal tracking help in monitoring livestock for disease and accidents, and providing better opportunities for husbandry [39]. "Smart farms" may also share data with other farms, consumers, and regulators [39]. The major opportunities provided by IoT for agriculture are maximizing yields by automatically identifying damaging weeds and reporting their location to farm owners or autonomous weeding machines, improving food traceability by tracking food and informing consumers about their provenance, origin, and production methods, and tackling environmental challenges such as the use of 3D accelerometers to detect injuries in cows and monitor them within the livestock, which allows for an early adoption of preventive measures [39].

The IoE has been used to help "automated and people-based processes" by extracting and analyzing real-time data from the millions of connected sensors [51]. IoE has been also used for environment sustainability, public policy goals, and economic goals [51]. The use of IoE

increased comfort, security, and safety for the building users [39].

a disaster, for example [9].

*5.1.6. Smart agriculture*

*5.1.5. Smart home and smart buildings*

148 Smartphones from an Applied Research Perspective

**5.2. Applications based on the IoE**

The technology necessary for all the example applications of IoT and IoE, stated in the previous sections, to succeed is available today. RFID, Bluetooth, NFC, 3G, 4G, 5G, etc. can transfer data over the Internet, also batteries' technologies have evolved; for example, wireless and solar power batteries and long-lasting batteries are available in today's market [3]. In addition, different types and sizes of sensors exist and can be used to monitor various industrial processes [3]. The challenge is to include all the aforementioned technologies into one light, inexpensive, user-friendly, multipurpose, and portable device that can be easily used by people in their daily lives [3]. Such a device is today an existing reality which is the smartphone. The Smartphone is equipped with a range of built-in sensors such as accelerometers, motion sensors, position sensors, and environmental sensors, that is, barometers, thermometers, and photometers measuring pressure, humidity, ambient temperature and illumination levels, etc. Some other kinds of special sensors measuring health vital signs, such as body temperature, ECG value, blood glucose level, stress level, body fat percentage, heart rate, etc., can be integrated into the smartphone [3]. All these sensors produce large volumes of data in structured form such as GPS or acceleration data and unstructured form such as pictures or videos [55]. The smartphone's cameras and microphones are also used to detect and record images in many smart applications used in IoT [3]. The smartphone is also equipped with a variety of connectivity technologies such as NFC, Bluetooth, Wi-Fi, and cellular, which allow it to connect and interact with other devices and sensors and be the brain of the IoT world [56]. An example of the use of IoT-enabled smartphones given in [3] is "traffic congestion control on specific roads using Google Maps; data are automatically being collected from users' smartphones moving along a specific road at a specific time, processed and sent to all connected users to Google Maps interested in getting this information" [3]. Another example is the use of smartphone to open a smart door of a hotel room in some parts of the world, once you approach it. This could be extended to office access control or garage access door opening [56].

Smartphones along with other IoT devices will play a main role in the expansion and use of this new terrain of Internet of Things [55]. The smartphone is considered to be "at the heart of a growing universe of connected devices and sensors" [55], also the rise of the smart wearables such as Apple Watch and Android Wear plays an additional role in creating an intelligent body area network (BAN) for the user where he stays connected most of the time [55]. The NFC technology integrated to the smartphones allows them also to act not only as sensors but as actuators triggering many actions such as payments, TV control, cars control, and home automation [55].

As reported in Ref. [55], smartphones can be used in an IoT setup along with four application categories: (1) *Personal IoT* where we find an increasing number of applications targeting health and fitness, and helping to solve everyday problems for users; (2) *group IoT* where smartphones can be used in the context of connected cars to check the system status, or in smart homes; (3) *community IoT* where crowd-sourcing applications could be used by citizens to contribute to a smart city; and (4) *industrial IoT* where smartphones are used for business to consumer (B2C) purposes such as sending customized services and vouchers in real time [55]. Future applications of the use of IoT through the smartphone include viewing data and controlling sensors anywhere; for example, at home or in a workplace, the smartphone could be used to "control a smart air conditioning or an alarm system at home from an application, or technicians may be alerted on their smartphones when a factory machine at a customer site is overheating and probably needs attention" [56]. In a smart city context, a smartphone application could be used to check the queue in a local store and see whether an item is in stock in real time, reserve the item, and call the client service for delivery. Other applications could be used in the smartphone to get data about noise and traffic congestion in the city to improve the residents' living experience in the controlled area.

Authors in [58] propose a four layers model named "*k-Healthcare*," which is considered a comprehensive platform for accessing patients' health data using the smartphones' sensors and applications. The model in [58] is composed of the following layers: (1) the *sensor layer*; which consists of sensors used to detect the patients' vital signs such as blood oxygen and pulse and the smartphone built-in sensors such as barometers, temperature, and humidity sensors, along with RFID tags used to for objects identification. All of these IoT devices are used by the k-Health platform to get data and send them to the other layers for further processing [58]. (2) The *network layer* is "the communication layer that connects the IoT devices with WAN using different protocols such as 802.16 for 3G, IEEE 802.16m for 4G, IEEE 802.20, ZigBee, etc." [58] (3) The *internet layer* is responsible for data management and storage using cloud storage or physical storage. Finally (4) the *services layer* "provides direct access of data to patients and professionals such as doctors, hospitals, and medicine supply chains using various protocols such as HTTP, HTTPS, web services, etc." [58]

sensors, position sensors, and environmental sensors, that is, barometers, thermometers, and photometers measuring pressure, humidity, ambient temperature and illumination levels, etc. Some other kinds of special sensors measuring health vital signs, such as body temperature, ECG value, blood glucose level, stress level, body fat percentage, heart rate, etc., can be integrated into the smartphone [3]. All these sensors produce large volumes of data in structured form such as GPS or acceleration data and unstructured form such as pictures or videos [55]. The smartphone's cameras and microphones are also used to detect and record images in many smart applications used in IoT [3]. The smartphone is also equipped with a variety of connectivity technologies such as NFC, Bluetooth, Wi-Fi, and cellular, which allow it to connect and interact with other devices and sensors and be the brain of the IoT world [56]. An example of the use of IoT-enabled smartphones given in [3] is "traffic congestion control on specific roads using Google Maps; data are automatically being collected from users' smartphones moving along a specific road at a specific time, processed and sent to all connected users to Google Maps interested in getting this information" [3]. Another example is the use of smartphone to open a smart door of a hotel room in some parts of the world, once you approach it. This could be extended to office access control or garage access door opening [56]. Smartphones along with other IoT devices will play a main role in the expansion and use of this new terrain of Internet of Things [55]. The smartphone is considered to be "at the heart of a growing universe of connected devices and sensors" [55], also the rise of the smart wearables such as Apple Watch and Android Wear plays an additional role in creating an intelligent body area network (BAN) for the user where he stays connected most of the time [55]. The NFC technology integrated to the smartphones allows them also to act not only as sensors but as actuators triggering many actions such as payments, TV control, cars control, and home automation [55]. As reported in Ref. [55], smartphones can be used in an IoT setup along with four application categories: (1) *Personal IoT* where we find an increasing number of applications targeting health and fitness, and helping to solve everyday problems for users; (2) *group IoT* where smartphones can be used in the context of connected cars to check the system status, or in smart homes; (3) *community IoT* where crowd-sourcing applications could be used by citizens to contribute to a smart city; and (4) *industrial IoT* where smartphones are used for business to consumer (B2C) purposes such as sending customized services and vouchers in real time [55]. Future applications of the use of IoT through the smartphone include viewing data and controlling sensors anywhere; for example, at home or in a workplace, the smartphone could be used to "control a smart air conditioning or an alarm system at home from an application, or technicians may be alerted on their smartphones when a factory machine at a customer site is overheating and probably needs attention" [56]. In a smart city context, a smartphone application could be used to check the queue in a local store and see whether an item is in stock in real time, reserve the item, and call the client service for delivery. Other applications could be used in the smartphone to get data about noise and traffic congestion in the city to

150 Smartphones from an Applied Research Perspective

improve the residents' living experience in the controlled area.

Authors in [58] propose a four layers model named "*k-Healthcare*," which is considered a comprehensive platform for accessing patients' health data using the smartphones' sensors and applications. The model in [58] is composed of the following layers: (1) the *sensor layer*; which consists of sensors used to detect the patients' vital signs such as blood oxygen and pulse and the smartphone Using our FlexRFID middleware discussed in the IoT architecture section, **Figure 2** shows the use of smartphones at the different layers of the IoT architecture.

From **Figure 2**, it is clear that the smartphone could be used as an automatic identification and sensing device at the level of the *sensing/auto-tracking layer* and as a backend device at the level of the *application layer* where different users accessing different applications could get the needed services.

**Figure 2.** The use of smartphone in FlexRFID middleware.
