# PlaIMoS: A Remote Mobile Healthcare Platform to Monitor Cardiovascular and Respiratory Variables
## Data Bus Blood Oxygen Sensor
### Wireless Sensor Network Infrastructure  
The WSN Infrastructure is a network composed of low power communication devices: a PlaIMoS communication node and a PlaIMoS remote node. The aim of the WSN Infrastructure is to generate a coverage area that can monitor physical variables by forming a wireless sensor network. The PlaIMoS communication node is responsible for receiving and managing the information received through the PlaIMoS remote node using IEEE 802.15.4 and forwarding the information to a Web service using IEEE 802.11. This device can perform gateway, cluster or sink functions. CSMA/CA is a multiple access method which employs carrier sensing. In CSMA/CA, nodes listen to the shared medium to determine whether other nodes are transmitting to avoid packet collisions which may occur if more than one node attempts to transmit on the same channel at the same time. When a channel becomes available, nodes transmit their complete packet data, thus insuring the transfer of information [27]. This method was implemented in the WSN:  
* It is scalable; because it is hierarchical, the networks created under this protocol have the ability to incorporate other devices without losing their efficiency. This feature is achieved in large part because each network device possesses a specific role (PlaIMoS remote node, cluster, gateway and sink);
* It provides accurate user location; because of its distributed scheme and its centroid localization algorithm, the PlaIMoS remote node can be located with an accuracy that depends on the number of nodes in the WSN infrastructure;
* It permits user mobility; PlaIMoS-Routing combines a routing protocol developed to operate in static networks where the components are motionless, along with a scheme in which the network nodes can be in constant motion;  
Figure 15: Fall detection process. * It employs redundant links; during network formation, PlaIMoS-Routing stores each node's link in a routing table, thus ensuring alternate routes if the data cannot be transmitted via the main link. PlaIMoS-Routing determines the main links through the creation of a metric (determined as weight), which is formed by the intensity of the received signal (RSSI), the number of hops and the lifetime of each node (TTL);
* It is fault tolerant; because of possible redundant links, PlaIMoS-Routing allows the network to continue operating should any link or node fail. If a node has the ability to re-establish its operation, the protocol allows it to rejoin the network and adopt the best suited role at that moment;
* It implements security schemes; PlaIMoS-Routing encrypts data using AES 128, which authorizes the persons or devices authorized to access and use the information generated in the network;
* It utilizes a reactive/ proactive scheme; PlaIMoS-Routing can operate in two different schemes, meaning it can be programmed to operate exclusively to detect any device possessing information that needs to be transmitted, thereby reducing the energy resources required by the network devices, or it can be scheduled to continuously transmit information. The PlaIMoS remote node sends continuous sampling or electrocardiogram packets to the WSN infrastructure. Continuous sampling packets contain a packet identifier, a patient identifier, a temperature value, a heart rate value, a physical position value (falls) and the patient's location (Table 3). Electrocardiogram packets possess a packet identifier, a patient identifier and 80 sample values that comprise the electrocardiogram wave (Table 4). All information that is received by the WSN Infrastructure is forwarded by the PlaIMoS communication node in gateway mode to the PlaIMoS communication node in sink mode, where it is forwarded to a Web service in the cloud. This service receives the information and stores it in the PlaIMoS database, which is responsible for obtaining information from the database to make it accessible to the apps in a standardized JSON format. The PlaIMoS-Routing communications protocol is formed by four types of communication nodes:  
1.