## 2 Materials and Methods
### System Description
#### 2.2.1 IEEE Agent  
HDP defines a transmitter of medical data as a source; ISO/IEEE-11073-20601 uses the term IEEE agent for this same node. In our framework, this agent corresponds to the acquisition, processing, and transmission hardware (Figure 3) [23]. Figure 2: IEEE agent for physiological data acquisition, processing, and transmission (**left**); and IEEE manager smartphone application for patient empowerment (**right**). **Data Acquisition. ** Our framework is composed of the TMDXMDKPO8328 and ADS1298 RFE boards from Texas Instruments (TI) for SpO2 and ECG data acquisition. Both, the pulse oximeter and the ECG implementation, are provided for the TMS320C5515 DSP as part of the Medical Development Kit (MDK) intended for evaluation and development purposes. The SpO2 acquisition board includes a low-power analog-to-digital converter (ADC), with 16 bits of resolution and 500 kilo samples per second (ksps) sampling rate. After acquiring the absorption value of the red (R) and infrared (IR) rays for the blood, the signals are conditioned by two stages of an amplifier. In the case of the ECG, the acquisition board includes a low-power ADC, working at 500 sps data rate with 24 bit data resolution. Analog signals pass through a defibrillator protection (DP) circuit to protect the rest of the system. The board derives 8 out of 12 ECG leads using differential amplifiers. These leads are filtered by a low pass filter (LPF), which provides anti-aliasing and removes frequencies above 150 Hz with 60 dB attenuation and digitized. Due to our medical requirements (see Section 2.1), only lead II is analyzed by the system. Both boards interface with the DSP module using the serial peripheral interface (SPI) and the Inter-Integrated Circuit (I2C) buses. **Bluetooth Communications. ** Communication between the agent and the manager is implemented using the ISO/IEEE-11073-20601 optimized exchange protocol over a Bluetooth stack with HDP. This protocol provides plug-and-play interoperability by using the IEEE-11073-20601. According to the established requirements for this proposal, our system includes a Bluegiga WT12-A Bluetooth module. The Bluegiga WT12 is a fully integrated Bluetooth 2.1 + Enhanced Data Rate (EDR), class 2 module combining an antenna, Bluetooth radio, and an on-board iWRAP Bluetooth stack including the iWRAP 5.0.0 firmware, which provides an easy way to configure Bluetooth to work with HDP. This version of iWRAP includes the implementation of several IEEE agents, which leads to a transparent connection management and data packaging. Thus, allowing a lower-end host processor to be used and faster time to market. The agents implemented in this firmware were tested to pass Continua v.1.5 test cases, which also allows avoiding the certification process, thus, saving time. We used the standard configuration for a pulse oximeter agent implemented in the iWRAP firmware. An example of a connection establishment sequence between a manager and a SpO2 agent implemented in the iWRAP firmware is shown in Figure 4.  
Figure 3: Architecture of the IEEE agent in our framework showing the acquisition, processing, and transmission hardware. Since the ECG agent is not supported by iWRAP, we developed an ECG agent with extended configuration in our system. It was explained in the ECG Data Processing subsection. **Processing System. ** Incoming data are processed by the low-power TMS320C5515 DSP Medical Development Kit (MDK) evaluation module (EVM) from TI. The implementation of the EVM only allows connecting one front-end-board at a time. Our software implementations are based on the examples provided by TI. We also included Real Time Clock (RTC) and External Memory Interface (EMIF) peripherals from the C55x Chip Support Libraries (CSL). CSLs provide an application programming interface (API) that shortens development time by providing standardization and portability. In the system, data are received from the acquisition boards through the SPI bus.