as numerous 
 wireless personal   area networking ( wpan ) technologies emerge , 
 the interest for   applications such as health monitoring , smart homes , and 
 industrial control has grown significantly . zigbee is the first industrial 
 standard wpan technology   that provides short - range , low - power , and 
 low - data - rate communication , and supports mesh networking and multihopping . 
 while many smart home application areas such as lighting , security , and climate 
 control have been suggested using the zigbee standard , health - care applications 
 have not received much attention despite their importance and high - value added . 
 here , we present a wireless communication system for real - time health 
 monitoring with secure transmission capability . early   clinical trials conducted in the mid - nineties by the 
 national institute of health in the mobile telemedicine project    has indicated that the 
 transmission of critical patient data during emergencies can make significant 
 difference in patient outcomes . this result has led to a proliferation of 
 health - care projects , including codeblue , ppmim   , customed , mobicare , livenet , pcn , ubimon , mobihealth , amon , and padnet . various types of wearable health monitoring sensor 
 devices have been developed and integrated into patients ' clothing   [ 1316 ] , an armband , or wristband . most of the existing mobile patient monitoring 
 projects such as ppmim , mobicare , mobihealth , and amon   employ cellular networks ( e.g. , gsm , gprs , or umts ) 
 to transmit vital signs from bsn to health centers . for instance , in ppmim 
 project , a remote medical monitoring three - tier architecture with a gsm / gprs 
 peer - to - peer channel is presented , and the concept of multiresolution is 
 introduced to identify useful information and to reduce communication costs . in 
 mobicare , a body sensor network ( or mobicare client ) and health - care servers 
 employ short - range bluetooth between bsn and bsn manager , and gprs / umts 
 cellular networks between bsn manager and health - care providers . the ubimon 
 ( ubiquitous monitoring environment for wearable and implantable sensors ) 
 project aims to provide a continuous and unobtrusive monitoring system for 
 patients in order to capture transient but life threatening events . among major projects in the area , codeblue   is the only existing project 
 that employs wireless sensor networks in emergency medical care , hospitals , and 
 disaster areas as an emergency message delivery system . with mica motes 
 , codeblue uses 
 pulse oximetry and electrocardiogram ( ecg ) sensors to monitor and record blood 
 oxygen and cardiac information from a large number of patients . however , most 
 of the existing systems lack two key features : ( 1 ) wireless communication 
 technology that conforms to standards , ( 2 ) integration with wireless sensor 
 network platforms such as smart home systems , and ( 3 ) secure transmission 
 capability that addresses the 
 resource constraints optimally . our zigbee - based architecture is based on the premise 
 that the secure wireless communications combined with the widespread 
 infrastructure provided by applications such as smart homes will be key to the 
 effective use of future medical monitoring systems . this is due to the fact 
 that practicality of the sensing , transmission , and processing steps is often 
 the major obstacle against common use of such devices . therefore , we believe 
 that medical monitoring based on the emerging smart home wireless technology , 
 zigbee , has a great potential . in addition , optimized processing of the collected 
 data plays a key role . with optimization , we refer to the best use of 
 computation and storage capacity at each of three different stages , namely , the 
 mobile device , home server , and the central server . for example , the mobile 
 device can play an important role in alerting the user in case of emergencies 
 and therefore should be used for detecting the most urgent situations , 
 especially in the absence of the wireless link . the home server typically has 
 greater capacity and thus can perform much more complex tasks . another objective of this paper is to provide a secure 
 and efficient scheme to meet the quality of service ( qos ) requirements of 
 medical and context data while they are transmitted from body sensors of mobile 
 patients to health - care centers over body sensor networks and wireless networks 
 of various types . in this regard , this paper also addresses two essential 
 issues : ( i ) secure data transmission from body sensors to 
 the mobile device over a body sensor network and ( ii ) efficient channel allocation and data security 
 for transmission of medical and context - aware data to health - care center . earlier , we have proposed a wireless health 
 monitoring system  
 that presents a three - tier architecture integrated to smart homes . here , we 
 enhance that architecture with ( 1 ) zigbee profile descriptions for 
 standards - based wireless communication . ( 2 ) a secure transmission mechanism that 
 optimizes the use of system resources in medical monitoring applications . in 
 addition , we provide the particulars of the system that we have developed that 
 will be implemented in a pilot market . then , we provide an introduction to ecg 
 systems , which is the primary data we collect and process at the first stage of 
 our development . the section that follows provides some specific aspects of our 
 approach followed by some concluding remarks and discussion of our ongoing 
 work . our system consists of several modules , each 
 associated with a certain function as shown in figure 1 . data collection module 
 collects vital data , particularly ecg signal and provides local storage and 
 transmission functionalities . the local server receives the data and 
 preliminary analysis results and communicates with the central server as 
 required . the central server follows the guidelines set by a particular service 
 provider to initiate a sequence of response actions , including contacting the 
 health professional . our system first measures the raw ecg signal from up 
 to three electrodes and locally analyzes heart rate variability . if an 
 arrhythmia risk is detected , an alert is transferred to the home server over 
 the zigbee network controller . at the same time , the raw ecg is measured and 
 transmitted continuously to the home server , and then the home server analyzes 
 the ecg records . if any anomaly is detected , patient 's doctor is contacted . continuous 
 transmission of the ecg data requires support for segmentation and reassembly , 
 which is not offered by the current version of the zigbee standard . the electrocardiogram is primarily a tool for 
 evaluating the electrical events within the heart . the action potentials of 
 cardiac muscle cells can be viewed as batteries that cause charge to move 
 through the body fluids . figure 2   illustrates the typical lead ii ecg 
 where the active electrodes are placed on the right arm and left leg . the first deflection , the p wave , corresponds to a 
 current flow during atrial depolarization . normal p waves have various shapes , 
 from flat to sharply - peaked with amplitudes ranging from 0 to 0.3 mv . the pq 
 interval , extending from the beginning of the p wave to the first component of 
 the qrs complex , corresponds to the depolarization of the atria , av node , av 
 bundle and its branches , and the purkinje system . the final deflection , the t 
 wave , is the result of ventricular repolarization . atrial repolarization is 
 usually not evident on the ecg , because it occurs at the same time as the qrs 
 complex . key steps consist of low - noise amplification , quantization , digital 
 filters , and feature detection algorithms . the processed digital data is then 
 sent to the home server over the zigbee network . the ad converter used in our setup accepts voltages from 0 to 3 v. 
 therefore , we first add 1.5 v offset to center the ecg waveform prior to 
 amplification . the amplified signal is then quantized to 8 bits by the adc 
 within the m16c microcontroller . the discrete waveform is passed through a differentiator 
 and lowpass filter as shown in figure 4 , where e(k ) represents the quantized ecg signal . the 
 sampling rate in our implementation is 320 hz . the filter transfer functions are 
 as follows:(1)g1(z)=1z1 . g1(z ) is a differentiator filter ; and is used to 
 obtain slope of the qrs complex . g2(z ) is a lowpass filter to avoid residual noise 
 and intrinsic differentiation noise . overall filter response maximizes the 
 energy of the qrs complex and improves detection of r wave peaks . detection of qrs peaks has a great value in diagnosis 
 of many medical anomalies . for detection of qrs peaks , normalized amplitude 
 distribution function of a smoothed ecg signal is used in    to detect whether a qrs 
 complex is   present within   an observation interval . the slope of the 
 distribution function becomes very sharp when the qrs complex does not exist 
 inside the interval . threshold value is set to be proportional to the r - r 
 interval . in , two 
 thresholds are set and the number of crossings are used to determine the qrs 
 complex . the higher threshold h is set to be h = max(0.5pqrs , gammal ) , 
 and the lower threshold l is set to be l = 0.75l + 0.25pqrs , where pqrs indicates the peak of the latest qrs complex . these two algorithms are not very effective in presence of strong baseline drift . in our work , a more robust adaptive threshold setting similar to that in 
 is used to detect qrs peaks . note that due to severe baseline drifting and 
 movement of patients , an ecg signal waveform may vary drastically from a heart 
 beat to the next . with an adaptive threshold , probability of missing a qrs peak 
 can be decreased . in our platform , the first five seconds of the 
 absolute value of the lowpass filtered digitized ecg data , f(n ) , 
 is searched for its highest peak . let us denote the magnitude of this peak as p. 
 then , the threshold  is initialized to  = p , 
 where  < 1 . in our implementation , we set  = 0.65 . let p[i ] denote the first local peak of f(n ) after a threshold crossing . after determining the slopes on both sides of p[i ] , 
 the zero crossing between p[i ] and the peak of the highest slope is chosen as 
 the ith r wave peak location . the next 
 threshold is set as follows:(2)[i]=[i1]+(1)p[i1 ] . 
  if an r - to - r interval is measured as  times longer than the previous interval , where  > 1 , a search is repeated only within that section of the ecg with a lower threshold 
 to detect a possibly missed heart beat . the inverse of the interval between two consecutive r wave peaks gives the instantaneous heart rate . their sequence shows how heart 
 rate varies , which is another important medical data . in figure 5 , a raw ecg trace and the output of the 
 implemented r peak detector body sensors 
 are used to sense vital sign data such as ecg for performing real - time health 
 monitoring of mobile patients . due to the transmission of sensitive medical 
 data , it is imperative to build a strong security mechanism in order to protect 
 the information transmitted as it may be susceptible to both active and passive 
 attacks . key distribution is central to any security mechanism based on 
 cryptographic techniques . whenever it is not possible to meet the power and 
 computational requirements of asymmetric security techniques in small devices 
 such as body sensors , symmetric key cryptography is employed to establish a 
 secret session key for safeguarding data against various security attacks . key 
 management is fundamental to provide in body sensor networks ( bsns ) because it 
 provides and manages cryptographic keys to enable security services such as 
 authentication , confidentiality , and integrity . next , we will first introduce 
 an attacker model and then present a secure key establishment and 
 authentication algorithm for transmitting medical data from body sensors like 
 ecg sensors to a handheld device of mobile patient , called personal wireless 
 hub ( pwh ) . prior to attaching body sensors to a mobile patient , we assume that 
 they are not compromised and are embedded with a common global key , kcg , at a secure place like home . kcg is initially used to set up a session key at a secure place and then deleted . a compromised node of a bsn of a patient may eavesdrop on data being transmitted in its own bsn in order to break the 
 session key . a compromised body sensor node of another close - by patient or 
 intruder may eavesdrop on the medical data being transmitted in bsn of a 
 neighboring patient . a compromised node from another bsn may try to inject 
 false data into the bsn in order to force the pwh to establish a compromised 
 session key . a replay attack 
 is a form of network attack in which a valid data transmission is maliciously 
 or fraudulently repeated or delayed . this is carried out by a compromised node 
 who intercepts the data and retransmits it at some later stage . this attack can 
 be carried out by a compromised node which can be either internal or external 
 to the bsn . our objective is now to establish two symmetric keys , namely kpwhbsn and kbsnbsn using an algorithm of three phases . the 
 symmetric key kpwhbsn is used to encrypt data between bsn sensors 
 and pwh , while the symmetric key kbsnbsn is employed among bsn sensors . the first phase is required to be implemented in a more secure place like home , though the 
 second and third phases can be implemented at any place . in the first phase , pwh first generates an 
 initialization key kpwh using its random number generator , xors the 
 key kpwh with the timing information of the last ecg 
 signal sent by the bsn , and then sends the xored result to the bsn sensors . at 
 the end of the first phase , bsn sensors first recover the initialization key kpwh using the same last ecg signal sent to pwh , and then agree on a nonce nbsn among themselves . in the second phase , all bsn sensors compute the symmetric key kpwhbsn = kpwh  nbsn , encrypt nbsn   with kpwh , and send the encrypted message ekpwh(nbsn ) to pwh . at the end of the second phase , pwh first recovers nbsn by decrypting ekpwh(nbsn ) with the initialization key kpwh and then recovers the symmetric key kpwhbsn . in the third phase , pwh generates 
 a nonce npwh , computes the symmetric key kbsnbsn = kpwh  npwh , encrypts npwh with kpwh , and sends the encrypted message ekpwh(npwh ) to bsn sensors . at the end of the third phase , bsn sensors first recover npwh by decrypting ekpwh(npwh ) with the initialization key kpwh and then recover the symmetric key kbsnbsn . the established symmetric key can be used to encrypt data in those techniques supporting authentication , data integrity , and confidentiality . for instance , pwh can authenticate a bsn sensor node by comparing its aggregated timing information of heart beats with the heart beats ' timing information sent by the bsn sensor node . once a session key is securely established between the 
 body sensors and the pwh , the body sensors can use this session key for 
 transmitting the data securely to the pwh . the established session key is known 
 globally by all the body sensors and the pwh . each body sensor also establishes 
 a pairwise key with the pwh which is only known to the corresponding sensor and 
 the pwh . to provide with added security , each body sensor provides with data 
 confidentiality by encrypting the data with the session key and uses the 
 pairwise key for data authentication . we can 
 provide data confidentiality by   encrypting the data 
 with the session key established . to provide data integrity , a keyed - hash message authentication codes ( hmacs ) can be used along 
 with a key as an input . to make it more secure from intruders , the key used for data confidentiality should be different from the key used to establish data 
 integrity ( to calculate the hmac ) . the body sensors use the session key to 
 encrypt the data to provide data confidentiality and 
 use the pairwise key to calculate the hmac to 
 provide data integrity . using this scheme , an 
 intruder will need to have the knowledge of both the keys in order to spoof the 
 pwh . many medical applications will benefit from 
 standards - based wireless technologies that are reliable , secure , and run on low 
 power . established standards for wireless applications , such as bluetooth and 
 ieee 802.11 , allow high transmission rates , but poses disadvantages such as 
 high power consumption , application complexity , and cost . zigbee networks on 
 the other hand , are primarily intended for low duty cycle sensors ,   those active 
 for less than 1% of the time for improved power consumption . for instance , an 
 off - line node can connect to a network in about 30 milliseconds . waking up a 
 sleeping node takes about 15 milliseconds , as does accessing a channel and 
 transmitting data . in addition , with their support of mesh networking and 
 rapidly increasing popularity in wireless sensor network environments and smart 
 homes make this networking technology a strong candidate for health 
 applications as well . zigbee is best described by referring to the 7-layer 
 osi model for layered communication systems figure 6 . the network name comes 
 from the zigzagging path a bee ( a data packet ) follows to get from flower to 
 flower ( or node to node ) . the alliance 
 specifies the bottom three layers ( physical , data link , and network ) , as well 
 as an application programming interface ( api ) that allows end developers the 
 ability to design custom applications that use the services provided by the 
 lower layers . it should be noted that the zigbee 
 alliance chose to use an existing data link and 
 physical layer specifications . these are the recently published ieee 802.15.4 
 standards for low - rate personal area networks . complete descriptions of the 
 protocols used in zigbee can be found in [ 1 , 27 ] . profiles in zigbee networks provide a common protocol 
 for communication within the network for a particular application to form an 
 industry standard . so far , zigbee alliance has not issued an approved profile 
 for use in health - care applications . in this section , we propose a proprietary 
 profile description we have developed as part of this project that may also 
 form a basis for future standardization efforts . zigbee network is configured in such a way that it 
 uses one pan per unit being monitored , that is , apartment , hospital section . completely cover the monitored area , several additional zigbee routers may be 
 required . at the initial configuration , every router device discovers the route 
 to the controller ( pan coordinator in our case ) . every router then can respond to the route discovery request from the ecg 
 device and does not need to rediscover the entire route . the application software running on zigbee devices is 
 responsible for the creation of proper payload that carries corresponding 
 commands , responses , and data . once the payload is created , it is passed to the 
 zigbee aps layer for the transmission over the air using api provided by zigbee 
 stack manufacturer . incoming cluster is used for command and control messages , one of the outgoing 
 clusters is used to send response to control messages and the other to send raw 
 ecg data . node can receive command messages such as  start  ,  stop  
 to control transmission ,  setfq  to set sample frequency , and sample rate device produces 4 data packet 
 per second . depending on the hardware configuration ( e.g. ,   available ram ) some 
 amount of data the application software running on zigbee devices is 
 responsible for creation of proper payload that carries corresponding commands , 
 responses , and data . once the payload is created , it is passed to the zigbee 
 aps layer for the transmission over the air using api provided by zigbee stack 
 manufacturer . zigbee device profile defines a set of commands and 
 responses for a particular application . these are contained in clusters with the cluster identifiers enumerated for each command and response . a cluster is a 
 related collection of commands and attributes , which together define an 
 interface to a specific functionality . typically , the entity that stores the 
 attributes of a cluster is referred to as the server of that cluster and 
 an entity that affects or manipulates those attributes is referred to as the 
 client of that cluster . commands that allow devices to manipulate attributes , 
 for example , the read or write attribute commands , are sent from a client 
 device and received by the server device . any response to those commands are 
 sent from the server device and received by the client device . conversely , the 
 command that facilitates dynamic attribute reporting , that is , the report 
 attribute command is sent from the server device ( as typically this is where 
 the attribute data itself is stored ) and sent to the client device that has 
 been bound to the server device . the clusters supported by an application 
 object within an application profile are identified through a simple descriptor 
 ( see ) , specified 
 on each active endpoint of a device . in the simple descriptor , the application 
 input cluster list contains the list of server clusters supported on the 
 device , and the application output cluster list contains the list of client 
 clusters supported on the device . in our system , the server 
 is the source node , that is , the mobile medical 
 data collection device and client is the 
 data collector node , that is , the home server . the server can receive the following commands : setsamplingfreq   to set sampling 
 frequency of the analog signal at the ecg circuit , start   to start 
 reporting ecg data , and stop   to stop 
 reporting ecg data . the server uses a reporting mechanism to send raw ecg 
 data to the client for further processing . the format of the ecg data packet is 
 summarized in   table 1 . in the profile ,   timestamp refers to the 
 consecutive number that increments with every packet sent and allows to 
 reconstruct ecg trace at the server in case packets come unordered or if some 
 packets are missing ; freq is the sample frequency index , which is by default 
 320 hz , and can be changed from the controller ; ecg data is 80 bytes of 
 digitized ecg signal , where each byte is a sample of the analog signal 
 generated by the acquisition circuit . mobile telemedicine will allow 
 patients to do their daily activities while they are being monitored 
 continuously anytime , anywhere . typical telemedicine applications include 
 transmission of ecg signals from the patient to the doctor , voice conversation 
 between the doctor and the personnel in the emergency vehicle , transmission of 
 x - rays , live video and medical images from the emergency vehicle , or the 
 patient to the doctor at the health - care center . these applications require 
 communication between a mobile patient and a health - care center or central 
 server . but , these telemedicine applications will have to deal with the 
 characteristics of wireless networks such as low bandwidth , channel 
 fluctuations , and coverage changes . further , a single network alone would not 
 be able to meet the bandwidth requirements of applications at all locations . fortunately , future mobile devices are expected to support multiple wireless 
 interfaces , so that they can communicate through more than one wireless network 
 at the same time . this allows the mobile applications to take advantage of 
 various wireless networks , depending on their availability , channel conditions , 
 coverage , and bandwidth . in this section , we present an efficient channel 
 allocation algorithm to enable a pwh to allocate channels efficiently from 
 wireless networks for mobile telemedicine applications . in addition , the human body can respond differently in cold 
 temperatures and/or high altitudes , which may , for instance , prevent a finger 
 pulse oximeter from taking an accurate measurement because blood flow to the 
 fingers may get restricted . therefore , not only ecg measurements , but also 
 context information such as the time , location , environment and weather 
 information associated with the ecg measurements should be sent from the mobile 
 device to the server for analysis . another important characteristic of ecg data 
 is the difference in the periodicity and sporadic nature of the data . when the 
 patient is under good conditions , the ecg data of the patient is typically sent 
 to the health - care center periodically to monitor the condition of the patient . in addition to the periodic data , when the patient 's condition deteriorates , 
 sporadic emergency data needs to be sent to the health - care center , which may 
 impact the periodicity and thus the wireless bandwidth requirement for the ecg 
 data . we assume that a patient exists in one of three states 
 at a given moment with respect to a particular vital sign . at any given time , a 
 patient 's health status sign would be good , fair , or critical . a patient 's health status is treated as good if the vital signs are stable and within 
 normal limits . a patient 's health status is treated as fair if the vital signs show slight instability and 
 the patient may be uncomfortable . a patient whose vital sign data are unstable 
 and not within normal limits , the patient 's status is treated as critical . 
 a simple way to predict a patient 's status is through the use of thresholds . for example , we can measure the number of times that a vital sign value from a 
 body sensor exceeds the acceptable value specified by the doctor . if out of x consecutive vital sign values , y of those vital sign values exceed the 
 acceptable value , then the patient 's status can be concluded as moving from good to fair or critical . the exact way of determination of patient 's status is specified by the medical 
 doctor based on the patient 's health history and the particular vital sign 
 being measured . determination of patient 's status should also take into account 
 the current activity level of the patient . that is , when the patient is 
 exercising or doing some other highly intense activity , a different threshold 
 should be used in determining the status of the patient from the threshold used 
 under normal activity conditions . the current activity level of the patient can 
 be determined from observing the outputs of body sensors that record the 
 patient 's speed , elevation , angle , room temperature , and so forth . wireless bandwidth can be reserved for periodic ecg 
 data since we know the amount and time of occurrence of the data . in contrast 
 to this , reserving bandwidth for emergency ecg data is not efficient in terms 
 of resource usage . at the same time to solve this problem , we propose a scheme , where 
 the periodic ecg data is differentiated and if the differences in the periodic 
 data exceeds a threshold , the pwh will start reserving bandwidth on the 
 wireless networks in order to ensure the availability of the wireless bandwidth 
 for any possible emergency ecg data . this reduces the wastage of bandwidth 
 resources by not reserving bandwidth for emergency ecg data all the time . at 
 the same time , by predicting the occurrence of an emergency situation and 
 reserving resources beforehand based on the prediction , it also improves the 
 probability of bandwidth availability under emergency situations . we now present the dynamic channel allocation 
 algorithm that is invoked whenever bandwidth is not available to satisfy an ecg 
 data call request for emergency ecg data in a cellular network . the dynamic 
 channel allocation algorithm presented here dynamically requests and migrates 
 bandwidth from neighboring base stations . also , every possible attempt should be made to not drop an ecg data call . therefore , a dynamic and adaptive channel allocation scheme is essential , where 
 channels are shared dynamically by various base stations of the same network 
 access technology by adapting to the requirements of the clients . the adaptive dynamic channel allocation ( adca ) 
 algorithm presented here does the channel allocation to an ecg or a non - ecg 
 call . a base station uses a different frequency , time slot , or code for each 
 connection with a client . we also assume that each bs knows its neighboring bss , that is , the network is already established and it remains fixed . the base 
 stations do not move , however , the wireless clients can move from the coverage area 
 of one base station to another . it is possible that some of base stations may 
 become more loaded than the others . in such a situation , some channels have to 
 be transferred from one base station to another . the basic steps of the adca algorithm are as follows . 
 on line 2 , each base station computes and sends its call blocking probability 
 for ecg and non - ecg calls to all of its neighbors . based on the knowledge of 
 its own call blocking probabilities and of that of its neighbors , on line 3 , 
 each base station determines whether a request can be made to borrow channels 
 from any of the neighboring nodes . based on the determination , neighboring 
 channels are requested . if this base station receives a channel borrowing 
 request from the neighboring node , it first checks if the number of free 
 channels under the base station is greater than the threshold of free channels . if so , an appropriate free channel is moved from the base station to the 
 requesting neighbor on line 5 . on lines 6 to 9 an ecg call is assigned a channel as long as there are free channels 
 available . on lines 10 to 13 a 
 non - ecg call is allocated a channel only if the number of free channels is 
 greater than the threshold of guard channels , tgc . the adca algorithm makes use of two thresholds while 
 assigning channels to an ecg data or a non - ecg data call . every base station 
 maintains two thresholds , tfc and tgc , where tfc is the threshold of free 
 channels and tgc is the threshold of guard channels for ecg data calls ( tfc > tgc ) . every base station periodically sends the 
 call blocking probabilities of ecg and non - ecg calls to its neighbors . a 
 non - ecg call is assigned a channel only when the number of free channels under 
 the base station is greater than tgc , that is , tgc number of channels are 
 always reserved for ecg data calls . in situations when an ecg data call can not 
 be allocated a channel even from the set of guard channels , the algorithm 
 attempts to transfer a channel from a neighboring base station . a base station 
 is allowed to transfer a channel only when the number of free channels under 
 that base station is greater than tfc . since tfc is greater than tgc , this 
 transfer of channels does not affect the call blocking probability of ecg data 
 calls under the base station that transfers the channels . in the previous sections , we have presented techniques 
 for the capture , analysis , and secure transmission of ecg data for real - time 
 monitoring of persons / patients in their homes . we envision that such techniques 
 can work best in practice when they are integrated to existing platforms in 
 homes such as wireless smart home systems . we have devised a three - stage 
 approach where the vital signals are processed at the mobile device for 
 immediate , life - threatening situations as described in the previous section . 
 here , we briefly present the processing at the next two levels : processing at 
 the ( local ) home server and processing at the central service provider . for improved performance , this part entails the 
 measurement pulse rate through qrs peak detection algorithm discussed earlier . this is done to facilitate a reliable warning in case of a network failure . next , raw data basic analysis results are transmitted to the home server and 
 central server as described in the next two sections . digitized ecg data is continuously transmitted to the 
 home server via a zigbee network . additionally , results of the analysis at the 
 mobile device are sent to the server and stored here for future reference . the 
 goal is to provide a repository for more detailed analysis of the data by 
 medical professionals or detection algorithms . in addition , the stored data is 
 processed for more detailed and accurate analysis of ecg signals for detections 
 such as q - t interval and t wave detection . the main responsibilities of the home server are : ( 1 ) 
 coordinate the zigbee in - home wireless network , ( 2 ) store incoming data , ( 3 ) 
 conduct accurate and detailed analysis of the data , and ( 4 ) communicate with 
 the central service provider for transmission of the data and notifications for 
 detected anomalies . we are currently developing a linux - based architecture 
 housed on a pc - platform that allows remote access through a web - based 
 interface . the server also is connected to the zigbee network through a 
 coordinator module connected via usb or serial port . routers on the smart home 
 network will be continuously powered and distributed throughout the home , 
 possibly one for each room . an existing zigbee network normally used for 
 lighting or security can be used for this purpose as well . the data repository 
 is made available for future use by service provider as well as the user and is 
 backed up against losses through a data warehousing service . continuous recording and analysis of ecg data provides 
 an excellent basis for automated detection as well as professional diagnosis of 
 many cardiological symptoms . according to our model , the last and the third 
 piece is the central data processing center where servers as well as medical 
 personnel can provide a variety of services such as storage , early diagnosis , 
 and in - home care . the home server transmits periodic reports and makes stored 
 data available to the central server . a key point for the central server processing is the 
 optimization of the use of resources at the home server resources and the 
 central server . as the number of users increase , the central server can 
 allocate only a limited amount of computational capacity to each user . the central server also functions as an entry point 
 for the professional staff to monitor the data and reports generated by the 
 home server . in addition , the alerts initiated by the mobile device are 
 transmitted to the central server through the home server . the central server 
 also keeps records of all transactions through an event management system . we have presented a real - time and secure architecture 
 for health monitoring in smart homes using zigbee technology . our research has 
 outlined many specific issues that relate to a collection of emerging 
 technologies , namely , wireless communication , secure transmission , and 
 processing of medical data within the context of  smart environments  . in 
 particular , we believe that our work has made the following contributions : 
 description 
 of a zigbee profile for transmission of ecg data over a wireless sensor 
 network , a security model for secure transmission of 
 data over wireless sensor network ,   an efficient mechanism for channel allocation 
 in wireless networks to transmit medical data , anda three - tier architecture for optimized 
 analysis of data using an adaptive mechanism that maximizes the utility of 
 processing and computational capacity at each of three stages . 
  description 
 of a zigbee profile for transmission of ecg data over a wireless sensor 
 network , a security model for secure transmission of 
 data over wireless sensor network ,    an efficient mechanism for channel allocation 
 in wireless networks to transmit medical data , and a three - tier architecture for optimized 
 analysis of data using an adaptive mechanism that maximizes the utility of 
 processing and computational capacity at each of three stages . our project continues towards completion of the 
 implementation of local and central server components for an end - to - end 
 service . in addition , we are expanding the collection of information to other 
 modalities such as oxygen , temperature , and glucose level measurements .
we present a framework for a wireless health 
 monitoring system using wireless networks such as zigbee . 
 vital 
 signals are collected and processed using a 3-tiered architecture . 
 the first stage is the mobile device carried on the body that 
 runs a number of wired and wireless probes . 
 this device is also 
 designed to perform some basic processing such as the heart 
 rate and fatal failure detection . at the second stage , 
 further 
 processing is performed by a local server using the raw data 
 transmitted by the mobile device continuously . 
 the raw data is 
 also stored at this server . the processed data as well as the 
 analysis results are then transmitted to the service provider 
 center for diagnostic reviews as well as storage . 
 the main 
 advantages of the proposed framework are ( 1 ) the ability to 
 detect signals wirelessly within a body sensor network ( bsn ) , 
 ( 2 ) low - power and reliable data transmission through zigbee 
 network nodes , ( 3 ) secure transmission of medical data over bsn , 
 ( 4 ) efficient channel allocation for medical data transmission over 
 wireless networks , and ( 5 ) optimized analysis of data using an 
 adaptive architecture that maximizes the utility of processing and 
 computational capacity at each platform .