## 2 Background and Related Works  
Ubiquitous healthcare applications may include disease-diagnosis devices, monitoring systems, and even healthcare information systems. In our approach, ECG monitoring is the main focus. ECG is a graphic recording of the heart's electrical activity [3]. In an ECG test, the electrical impulses that occur when the heart beats are recorded in a waveform graph. ECG monitoring is an efficient and important clinical technique in healthcare as information from an ECG test can be used to discover heart diseases, determine the rate and regularity of heart beats as well as the size and position of chambers, and also to evaluate the effects of drugs or specialized devices used to regulate the heart. Since ECG is the core reference for doctors in the diagnosis and medication process, there are many types of commercialized ECG mobile monitoring applications available in the market today. Examples include Spyder wireless ECG monitoring [4] and wireless pulse/ECG watches [5]. In ubiquitous healthcare, wireless data communication technologies such as WSN and Bluetooth(r) are adopted to transmit the data while mobile devices are used as the monitoring terminal. However, most market-available ubiquitous healthcare applications have adopted the Bluetooth(r) technology. Spyder wireless ECG monitoring and wireless pulse/ECG watch are examples of Bluetooth(r) communication- based mobile healthcare applications. Nevertheless, several limitations and problems are reported with the adoption of Bluetooth(r) in ubiquitous healthcare communications such as the power hungry needs. WSN with the IEEE 802.15.4 Zigbee radio protocol which is able to overcome the problems seems to be more favorable for remote healthcare wireless communications. A WSN equipped with an IEEE 802.15.4 Zigbee radio protocol is preferable to Bluetooth(r) with an IEEE802.15.1 radio protocol due to its faster, more flexible and scalable networking features. The most important factor is that it consumes less energy, processing and memory resources [6]. In WSN, each sensor has wireless communication capability and some level of intelligence for signal processing and networking of the data. Other than direct transmission, a spatially distributed sensor has the capability to route the data using a multi-hop routing protocol by going through a few sensor nodes to a gateway sensor node known as a base station node. This provides better connectivity than the Bluetooth(r) technology which only supports transmission up to a certain maximum range. Thus, WSN is adopted in this proposed ubiquitous healthcare application. A WSN is easier to deploy and it is scalable. A sensor node's self organizing and automatic calibrating characteristics enable a single node to be added to or removed easily from a network. A network is reconfigured with dramatically less complexity and costs compared to wired networks as no fixed installation is needed. A WSN's unobtrusiveness increases the patient's acceptance in term of its portability. In short, WSNs and healthcare are a perfect match to bring healthcare from the hospital or medical center to one's own home. Along with the advances in communication technology, mobile communication devices can now provide efficient and convenient services such as remote information interchange and resource access through mobile devices so that users can work ubiquitously [7]. With the astronomical growth of the mobile phone ownership rate, mobile healthcare supported by mobile and wireless technologies no longer seems as costly and non-essential instead it is a cost-effective care solution with better overall health outcomes. A mobile device in ubiquitous healthcare must be an ultra compact, low cost, light- weight and low power consumption unit to achieve the optimal outcome. In our work, an Android(tm)-based smart phone is considered as the monitoring terminal due to its smart functions and computer-like features compared to the old conventional phones which are used mainly for calling and texting.