diff --git a/404.html b/404.html new file mode 100644 index 0000000..276c599 --- /dev/null +++ b/404.html @@ -0,0 +1,10 @@ + + + + + +Redirecting to https://www.empatica.com/research/e4-sunset/ + + + + \ No newline at end of file diff --git a/CNAME b/CNAME index dfa46e2..b60a0f9 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -developer.empatica.com +developer.empatica.com \ No newline at end of file diff --git a/TCP_Server_Mac.html b/TCP_Server_Mac.html deleted file mode 100644 index 0253093..0000000 --- a/TCP_Server_Mac.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - - - - - - - - Empatica for Developers by empatica - - - -
-
-

Note: at this time, Empatica TCP Server is not fully supported anymore.

- -
-

Empatica TCP Server

-
- -

This is a reference guide of the communication protocol supported by the Empatica TCP Server. Empatica TCP server allows to receive realtime data from multiple Empatica E3 devices. Each TCP connection is allowed to connect to one Empatica Device at time. To connect to multiple devices, multiple TCP connections are required. - The server accepts TCP sockets connections. After a succesful connection from a client, the server waits for command messages.

- -

General message structure is described in the following section while details on client commands and server responses are described in commands and data section.
- To get a glance of the communication protocol, visit the protocol example section.

- - -

General message structure

- Messages are ASCII strings terminated with a newline ('\n') character. Some commands have parameters, which are separated by spaces. - Client requests are in the following format: -
Client request format
-				<COMMAND> <ARGUMENT_LIST>
-			Example
-				device_subscribe gsr ON
-			
- - Messages from server containing responses to commands are in the following format: -
Server response
-				R <COMMAND> <ARGUMENT_LIST>
-			Example
-				R device_subscribe acc ON
-			
- - - Messages from server containing data from device are in the following format: -
Stream Data Format
-				<STREAM_TYPE> <TIMESTAMP> <DATA>
-			Example
-				G 123345627891.123 3.129
-			
- -

Commands and Responses Details

- -

Server Status

-

The client requires the current status of the server. The server status is OK when the server is fully functional and ready to connect to Empatica E4 devices. - The server status is ERR if something is wrong (often, problems are related to Bluetooth low energy adapter). -

- -
Client Request
-				server_status
-			
- -
Server Response
-				R server_status OK
-				R server_status ERR <reason>
-			Example:
-				R server_status ERR Bluetooth low energy not available on server
-			
- -

List of available devices

-

The client requires the list of Empatica E4 devices in range and available to connect. The server responds with the number of available devices and - a list of devices info.

- - -
Client Request
-				device_list
-			
- -
Server Response
-				R device_list <NUMBER_OF_DEVICES> | <DEVICE_INFO_1> | <DEVICE_INFO_2>
-			Example
-				R device_list 2 | 9ff167 Empatica_E3 available | 740163 Empatica_E3 available
-			
- - -

The format of the device info is the following:

- -
DEVICE_INFO format
-				<DEVICE_ID> <DEVICE_NAME> <AVAILABILITY>
-			Example
-				9ff167 Empatica_E3 available
-			
- - DEVICE_ID -

The device id is unique for every device. It is used by the client during a connect request.

- - DEVICE_NAME -

The device name is used

- - AVAILABILITY -

Availability parameter is always available. Other values are reserved for future implementation.

- - -

Connect to a Device

-

The client sends a connection request to a specific device. Each TCP connection is allowed to connect to one Empatica Device at time. To connect to multiple devices, multiple TCP connections are required.

- - -
Client Request
-				device_connect <DEVICE_ID>
-			Example:
-				device_connect 9ff167
-			
- - DEVICE_ID -

The device id is returned from the server after a device_list command.

- -
Server Response
-				R device_connect OK
-				R device_connect ERR <reason>
-			Example:
-				R device_connect ERR The device requested for connection is not available.
-			
- -

Disconnect from a Device

-

The client sends a device disconnection request. It will be disconnected from the currently connected device.

- -
Client Request
-				device_disconnect
-			
- -
Server Response
-				R device_disconnect OK
-				R device_disconnect ERR <reason>
-			Example:
-				R device_disconnect ERR No connected device.
-			
- - -

In case of device disconnection (e.g., the user switch off the device, or the battery runs out) the server sends the following packet

-
Device Disconnection
-				X device_disconnect
-			
- -

Subscribe to Receive Data

-

To start receiving data from a given stream, the client sends a data subscription request specifying the desired stream.

- - -
Client Request
-				device_subscribe <STREAM> ON
-			Example:
-				device_subscribe gsr ON
-			
- -
Server Response
-				R device_subscribe <STREAM> ON
-				R device_subscribe <STREAM> ERR <REASON>
-			Example:
-				R device_subscribe gsr OK
-			
- STREAM -

The streams available are the following:

- - -

Unsubscribe from Receive Data

-

To stop receiving data from a given stream, the client sends a data unsubscription request specifying the desired stream.

- -
Client Request
-				device_subscribe <STREAM> OFF
-			Example:
-				device_subscribe gsr OFF
-			
- -
Server Response
-				R device_subscribe <STREAM> OFF
-				R device_subscribe <STREAM> ERR <REASON>
-			Example:
-				R device_subscribe gsr OFF
-			
- STREAM -

The streams available are the following:

- - - -

Suspend data streaming

-

To temporarily suspend the data streaming (without disconnecting or switching off the device), the client sends a pause request

- -
Client Request
-				pause ON
-			
- -
Server Response
-				R pause ON
-				R pause ERR <REASON>
-			Example:
-				R pause ERR You are not connected to any device
-			
- - -

Resume data streaming

-

To resume the data streaming, the client sends a resume request

- -
Client Request
-				pause OFF
-			
- -
Server Response
-				R pause OFF
-				R pause ERR <REASON>
-			Example:
-				R pause ERR You are not connected to any device
-			
- -

Data Streaming Packets

-

After a succesful connection and stream subscription to an Empatica Device, the client starts receiving sensor's data from the server.

- -
Stream Data Format
-				<STREAM_TYPE> <TIMESTAMP> <DATA>
-			Example
-				G 123345627891.123 3.129
-			
- - STREAM_TYPE -

The streams available are the following:

- - - TIMESTAMP -

The timestamp for the sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT.

- - DATA -

Each stream type has different data format as described below:

- -

Acceleration data -

-
Acceleration data
-				A 123345627891.123 51 -2 -10
-			
- -

Blood Volume Pulse data
-    The value of the BVP sample. The value is derived from the light absorbance of the arterial blood. The raw signal is filtered to remove movement artifacts.
-

Blood Volume Pulse data
-				B 123345627891.123 31.128
-			
- -

Galvanic Skin Response data
-    The value of the GSR sample. The value is expressed in microsiemens.
-

Galvanic Skin Response data
-				G 123345627891.123 3.129
-			
- -

Temperature data
-    The value of the temperature sample in Celsius degrees. The value is derived from the optical temperature sensor placed on the wrist.
-

Temperature data
-				T 123345627891.123 35.82
-			
- -

Interbeat Interval data
-    The value of the IBI sample. The value is the distance from the previous detected heartbeat in seconds.
-

Interbeat Interval data
-				I 123345627891.123 0.822
-			
- -

Battery level data
-    The battery level of the device. Values: [0.0 - 1.0]
-

Battery level data
-				F 123345627891.123 0.2
-			
- - - -

Protocol Example

- Here is an example of messages exchange between client and server during a brief acquisition session. - -
[OPEN TCP CONNECTION]
-			==> server_status
-			<== R server_status OK
-
-			==> device_list
-			<== R device_list 2 | 9ff167 Empatica_E3 available | 7a3166 Empatica_E3 available
-
-			==> device_connect ffffff
-			<== R device_connect ERR the requested device is not available
-
-			==> device_connect 9ff167
-			<== R device_connect OK
-
-			==> device_subscribe bvp ON
-			<== R device_subscribe bvp OK
-
-			<== B 123345627891.123 3.212
-			<== B 123345627891.327 10.423
-			<== B 123345627891.472 12.665
-
-			==> device_disconnect
-			<== R device_disconnect OK
-			[EOF]
-			
- - - - -

Using Empatica TCP Server for OSX

- NOTE: this part of the documentation is still under development -

Installation

- Copy EmpaticaTCPServer.app in your Application folder. -

Usage

- When running, a red icon with the Empatica logo is placed in the menu bar. Clicking on such icon, it will pop out a menu for controlling the Empatica TCP server. - - -

Configuration

- Before starting the server, you should visit the preferences panel by clicking on Menu->Configuration... -
- The Settings panel allows to set - - -

Start/Stop the server

- To start the server click on Menu->Start TCP Server
- - When devices and clients are connected, some information about the connection status is shown for debug purpose. - -

Empatica TCP Client Demo App

- The demo TCP client app implements a basic client for demo purpose. It allows to quickly evaluate the Empatica TCP server and its code can be used as starting point for the development of custom applications. - - -
-
- - \ No newline at end of file diff --git a/android-sdk-tutorial-20.html b/android-sdk-tutorial-20.html deleted file mode 100644 index aad38c9..0000000 --- a/android-sdk-tutorial-20.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - Empatica Android SDK for Developers - - - - - - - - - - - - -
-
- -
-

< back to Empatica for Developers

-

Empatica Android SDK

-
- -
-

- Introduction and requirements -

- -

The EmpaLink API allows you to build Android applications that can communicate with Empatica E4 and Empatica E3 devices.

- -

First of all, you need to make sure your phone runs Android 4.4 KitKat (API level 19) or higher. Android 4.3 doesn't offer a stable enough connection, while previous versions don't support Bluetooth 4.0 (BLE) at all, and, therefore, are not compatible with the Empatica API.

- -

This release is meant to be used with Android Studio 1.0 or later.

- -

Once equipped with a supported phone, you need to navigate to Empatica Connect Developer Area and request to become a developer. You will find your API key and all the download links there.

- -

- Dependencies -

- -

EmpaLink has the following dependency:

- -
  • Android Asynchronous Http Client - version 1.4.6
  • -

    -

    - Installation instructions -

    - -
      -
    1. Download the SDK from Empatica Connect Developer Area

    2. -
    3. Open your project in Android Studio

    4. -
    5. Create a new Module from the AAR file empalink-2.0.aar included in the zip:

    6. - - -

      File > New > New Module > Import .JAR or .AAR Package

      - - - - -

    7. Open Module Settings for your main app module and, in the Dependencies tab, add a dependency to the EmpaLink module you've just imported

    8. -
    9. Open your main build.gradle and, in the dependencies { ... } block, add the following line: -

      compile 'com.loopj.android:android-async-http:1.4.6'

    10. -
    11. Make sure your build.gradle has a minSdkVersion 19 (or higher) line

    12. -
    13. If you're using Android Studio 1.1 with Gradle version 1.1, it may be possible that the IDE will tell you it can't resolve the symbols contained in the empalink library, though the compiler will compile just fine. - If this is the case, please open your project's build.gradle, find the gradle dependency line (e.g., classpath 'com.android.tools.build:gradle:1.1.0') and change it into classpath 'com.android.tools.build:gradle:1.0.1'. If this doesn't help you, StackOverflow is your friend: Android Studio 1.1 currently has a few issues with importing AAR's.

    14. -
    - -

    - Usage -

    - -

    First of all, you need to instantiate an EmpaDeviceManager, passing your application context, and references to classes implementing EmpaDataDelegate and EmpaStatusDelegate.

    - -

    Then, you must register your API Key using the Device Manager's authenticateWithAPIKey() method.

    - -

    Here's an example:

    - -
    public class MainActivity extends Activity implements EmpaDataDelegate, EmpaStatusDelegate {
    -
    -          private EmpaDeviceManager deviceManager;
    -          protected void onCreate(Bundle savedInstanceState) {
    -              [...]
    -              deviceManager = new EmpaDeviceManager(getApplicationContext(), this, this);
    -              deviceManager.authenticateWithAPIKey("YOUR API KEY");
    -          }
    -            [...]
    -        }
    - -

    When the Device Manager is ready for use, your EmpaStatusDelegate will receive the EmpaStatus.READY value via didUpdateStatus().

    - -

    The Device Manager is now ready to scan for Empatica Devices, using: deviceManager.startScanning().

    - -

    If any devices are in range, you will receive them through the EmpaStatusDelegate callback didDiscoverDevice(BluetoothDevice device, String deviceLabel, int rssi, boolean allowed).

    - -

    If allowed is true, you can then connect to the device as follows: deviceManager.connectDevice(device).

    - -

    If the connection request is successful, the device will start streaming data, which will be transferred to your EmpaDataDelegate by invoking its callback methods.

    - -

    - Additional info -

    - -

    Please check the Javadoc documentation for details about all the available methods.

    - -
    - -
    -
    - - diff --git a/empatica-android-sdk-javadoc.zip b/empatica-android-sdk-javadoc.zip deleted file mode 100644 index 3388981..0000000 Binary files a/empatica-android-sdk-javadoc.zip and /dev/null differ diff --git a/images/android-studio-module.png b/images/android-studio-module.png deleted file mode 100644 index f09838d..0000000 Binary files a/images/android-studio-module.png and /dev/null differ diff --git a/images/body-bg.png b/images/body-bg.png deleted file mode 100644 index 5e8c4c2..0000000 Binary files a/images/body-bg.png and /dev/null differ diff --git a/images/highlight-bg.jpg b/images/highlight-bg.jpg deleted file mode 100644 index 355e089..0000000 Binary files a/images/highlight-bg.jpg and /dev/null differ diff --git a/images/hr.png b/images/hr.png deleted file mode 100644 index d32f689..0000000 Binary files a/images/hr.png and /dev/null differ diff --git a/images/octocat-icon.png b/images/octocat-icon.png deleted file mode 100644 index 2406608..0000000 Binary files a/images/octocat-icon.png and /dev/null differ diff --git a/images/tar-gz-icon.png b/images/tar-gz-icon.png deleted file mode 100644 index 502e67d..0000000 Binary files a/images/tar-gz-icon.png and /dev/null differ diff --git a/images/tut1_0.7.png b/images/tut1_0.7.png deleted file mode 100644 index d6e72cd..0000000 Binary files a/images/tut1_0.7.png and /dev/null differ diff --git a/images/tut2_0.7.png b/images/tut2_0.7.png deleted file mode 100644 index 25c92c3..0000000 Binary files a/images/tut2_0.7.png and /dev/null differ diff --git a/images/tut3_0.7.png b/images/tut3_0.7.png deleted file mode 100644 index 85a643b..0000000 Binary files a/images/tut3_0.7.png and /dev/null differ diff --git a/images/zip-icon.png b/images/zip-icon.png deleted file mode 100644 index 732aced..0000000 Binary files a/images/zip-icon.png and /dev/null differ diff --git a/index.html b/index.html index 6c5e007..5aba0e2 100644 --- a/index.html +++ b/index.html @@ -1,149 +1,10 @@ - - - - - - - - - - - - - Empatica for Developers by empatica - - - - - - - - - - - - -
    -
    - -
    -

    Empatica for Developers

    -

    Empatica Developer's Documentation

    -
    - -
    - View on GitHub -
    - -
    - -
    -

    Empatica Programming Interfaces

    - -

    Empatica research products are currently compatible with three programming interfaces: Android and iOS SDKs and a Windows based Bluetooth Low Energy (BLE) Server. All three of these solutions are designed to allow for real-time time connections to the E4’s data stream.

    - -

    In order to build your own applications using the Empatica API, you need an API Key and the SDK(s) for your platform(s) of choice. The key is used to authenticate your applications for accounting purposes. You can read the guide: Develop your own app.

    - -

    There are no REST APIs at this time so access to data that has been uploaded to the Empatica Connect web application is only accessible through the use of the GUI.

    - -

    Mobile SDKs

    - -

    Empatica provides developers SDKs for mobile development, both for Android and iOS platforms.

    - -

    iOS SDK

    - -

    You can find info on how to develop your mobile application using the Empatica SDK for iOS tutorial. Sample projects are provided that demonstrate single and multiple Empatica E4 wristbands connections from your iOS device.

    - -

    Also check our API reference.

    - -

    Android SDK

    - -

    For development in Java on your prefered environment, EmpaLink for Android offers developers access to real-time data-streams from within your Android application. E4 data can be retrieved using the following methods:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Return Type - MethodDescription
    voiddidReceiveAcceleration(int x, int y, int z, double timestamp)This method is invoked when a new acceleration value is available
    voiddidReceiveBatteryLevel(float level, double timestamp)This method is invoked when a new battery level value is available
    voiddidReceiveBVP(float bvp, double timestamp)This method is invoked when a new BVP value is available
    voiddidReceiveGSR(float gsr, double timestamp)This method is invoked when a new GSR value is available
    voiddidReceiveIBI(float ibi, double timestamp)This method is invoked when a new interbeat interval (IBI) value is available
    voiddidReceiveTemperature(float ibi, double timestamp)This method is invoked when a new interbeat interval (IBI) value is available
    - -

    -

    Note that button press/event mark timing is not yet available on the Android platform.

    You can find additional info, including a complete tutorial, on the Empatica SDK for Android tutorial.

    - -

    Sample project

    -

    A sample console app that demonstrates how to establish a streaming connection to the E4 wristband can be found on the Empalink Sample Project for Android GitHub project. For simplicity the project demonstrates EDA streaming for ten-seconds - all other arguments are commented out.

    - -

    Streaming servers

    - -

    Stream data from one or more E4 wristbands into your Windows-based application with the Empatica BLE Server for Windows. Empatica’s Windows BLE Server solution operates exclusively with the BlueGiga BLED112 Bluetooth Smart Dongle.

    - -

    Windows

    - -

    BLE client

    - -

    The Empatica BLE Client application, developed in C#, is an demonstration console that works in conjunction with the BLE Server in the Windows platform. Instructions and client source-code available at: Empatica BLE client GitHub project.

    - -

    -BLE server -

    - -

    The Empatica BLE Server is a Windows application that can connect to multiple Empatica E4 devices using Bluetooth and stream data to local endpoint using multiple socket connections. Instructions about the Empatica BLE server are available at Empatica BLE server documentation.

    - -

    -

    -Support or Contact -

    -

    Having trouble with Empatica developer's software? Contact support and we’ll help you sort it out.

    - -
    -
    -
    - + + + +Redirecting to https://www.empatica.com/research/e4-sunset/ + + + diff --git a/ios-sdk-api-reference-07.html b/ios-sdk-api-reference-07.html deleted file mode 100644 index 594e0b1..0000000 --- a/ios-sdk-api-reference-07.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - - - - Empatica iOS SDK API Reference - - - - - - - - - - - - - -
    -
    -
    -

    < back to Empatica for Developers

    -

    Empatica iOS SDK API Reference

    -
    - -
    -

    EmpaLink is a library that allows to:

    - -
      -
    • Connect to and manage one or more Empatica E3 devices via Bluetooth Low Energy (BLE)
    • -
    • Receive realtime raw data from the connected devices, such as Galvanic Skin Response (GSR), Blood Volume Pulse (BVP), and accelerometers
    • -
    • Receive computed data derived from raw data, such as interbeat intervals (IBI)
    • -
    - - -

    EmpaticaAPI is the main singleton class that handles API authentication and devices discovery. EmpaticaDeviceManager is the class that handles the connection the communication with a single E3 device.

    - -

    EmpaticaAPI Class

    - -

    Authentication

    - -

    - + authenticateWithAPIKey:completionHandler:
    -

    - -

    Device discovery

    - -

    - + discoverDevicesWithDelegate:
    -

    - -

    Background communication handling

    - -

    - + prepareForBackground
    - + prepareForResume
    -

    - -

    EmpaticaDelegate

    - -

    - - didUpdateBLEStatus:
    - - didDiscoverDevices:
    - BLEStatus
    -

    - -

    Class Methods

    - -

    authenticateWithAPIKey:completionHandler:

    - -

    Authenticate the user with the given API key.
    - + (void)authenticateWithAPIKey:(NSString *)key completionHandler:(void (^)(BOOL success, NSString *description))handler;

    - -

    Discussion

    - -

    It is mandatory to call this method before using the EmpaLink API. If the key is not set or it results invalid, the connection to an E3 device will not be available and an exception will be raised at discovery time. It is recommended to call the method in the app delegate. The completion handler allows you to understand if authentication succeeded (and you can start invoking the API methods) or failed (the description argument will help you understand why).

    - -
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    -	    [EmpaticaAPI authenticateWithAPIKey:@"HERE_GOES_YOUR_API_KEY" completionHandler:^(BOOL success, NSString *description) {
    -	        // Handle success/failure
    -	    }];
    -	    return YES;
    -	}
    -	
    - -

    discoverDevicesWithDelegate:

    - -

    Ask the BLE manager to scan for Empatica E3 devices.
    - + (void)discoverDevicesWithDelegate:(id) empaticaDelegate

    - -

    Parameters

    - -

    empaticaDelegate
    -    The object implementing EmpaticaDelegate that will receive notifications about discovered devices and BLE manager status.

    - -
    Discussion
    - -

    During the scan, the BLE status is set to kBLEStatusScanning.
    -After a successful scan, the BLE status is set to kBLEStatusReady and the list of peripherals is notified to the empaticaDelegate with a call to didDiscoverDevices:. If no devices are available, didDiscoverDevices: will be called with an empty array of devices.
    -  - 

    - -

    prepareForBackground

    - -

    Ask the BLE manager to optimize the transmission for background activity.
    -+ (void)prepareForBackground

    - -

    Discussion

    - -

    It is mandatory to implement this method in the app delegate. If not implemented, an exception will be raised at discovery time.

    - -
    - (void)applicationDidEnterBackground:(UIApplication *)application {
    -  [[EmpaticaAPI sharedInstance] prepareForBackground];
    -}
    -
    - -

    prepareForResume

    - -

    Ask the BLE manager to resume the normal transmission for foreground activity.
    -+ (void) prepareForResume

    - -

    Discussion

    - -

    It is mandatory to implement this method in the app delegate. If not implemented, an exception will be raised at discovery time.

    - -
    - (void)applicationDidBecomeActive:(UIApplication *)application {
    -  [[EmpaticaAPI sharedInstance] prepareForResume];
    -}
    -
    - - -

    EmpaticaDelegate Protocol

    -

    didDiscoverDevices:

    - -

    - (void) didDiscoverDevices:(NSArray*)devices

    - -

    Parameters

    - -

    devices
    -   The list of discovered devices. - 

    - -

    didUpdateBLEStatus:

    - -

    Notify when the status property of the BLE manager changes. -

    - -

    - (void)didUpdateBLEStatus:(BLEStatus)status

    - -

    Parameters

    - -

    status
    -   The current status of the BLE manager - 

    - -

    BLEStatus

    - -

    Defines the possible status of the BLE manager.

    - -
    typedef enum {
    -  kBLEStatusNotAvailable,
    -  kBLEStatusReady,
    -  kBLEStatusScanning
    -} BLEStatus;
    -
    - -

    Constants

    -

    kBLEStatusNotAvailable
    -   The iOS device does not support Bluetooth LE, or the Bluetooth LE module is not active.
    -kBLEStatusReady
    -   The BLE central manager is ready to scan for devices.
    -kBLEStatusScanning
    -   The BLE central manager is scanning for E3 devices.
    - - -

    EmpaticaDeviceManager Class

    - -

    Device Connection

    - -

    -- connectWithDeviceDelegate:
    -- connectWithDeviceDelegate:andConnectionOptions:
    -

    - -

    Device Disconnection

    - -

    -- disconnect
    -

    - -

    EmpaticaDeviceDelegate

    - -

    - -- didReceiveTagAtTimestamp:fromDevice:
    -- didReceiveIBI:withTimestamp:fromDevice:
    -- didReceiveGSR:withTimestamp:fromDevice:
    -- didReceiveBVP:withTimestamp:fromDevice:
    -- didReceiveTemperature:withTimestamp:fromDevice:
    -- didReceiveAccelerationX:y:z:withTimestamp:fromDevice:
    -- didReceiveBatteryLevel:withTimestamp:fromDevice:
    - -- didUpdateDeviceStatus:forDevice:
    -DeviceStatus

    - -

    Instance Methods

    - -

    connectWithDeviceDelegate:

    - -

    Ask the device manager to estabilish a connection to the corresponding E3 device.
    -- (void) connectWithDeviceDelegate:(id)deviceDelegate; -

    -

    Parameters

    - -

    deviceDelegate
    -   The object implementing EmpaticaDeviceDelegate that will receive data from the connected device and notifications about the connection status of the device.

    - -

    Discussion

    -

    During the connection attempt, the device manager status is set to kDeviceStatusConnecting.
    -After a successful connection, the device manager status is set to kDeviceStatusConnected.
    -If the connection fails, the device manager status is set to kDeviceStatusDisconnected.
    -

    When connecting to multiple devices, it is recommended to instantiate, for each device, one object implementing the EmpaticaDeviceDelegate protocol.


    - -

    connectWithDeviceDelegate:andConnectionOptions:

    - -

    This method is reserved for future implementation.

    -  - 

    - -

    disconnect

    - -

    Ask the device manager to disconnect to the currently connected device. It has no effect if no device is connected.
    -- (void) disconnect

    - -

    Discussion

    - -

    After a successful disconnection, the device manager status is set to kDeviceStatusDisconnected.
    -  - 

    - - - -

    EmpaticaDeviceDelegate Protocol

    - - -

    didReceiveTagAtTimestamp:fromDevice:

    - -

    Receives a Tag notification when the button on the E4 is pressed at a given timestamp.

    - -

    -(void)didReceiveTagAtTimestamp:(double) timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -

    Parameters

    - -

    ibi
    -   The timestamp of the button press in seconds defined as time interval between the button press and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - -

    Discussion

    - -

    Tags are available with latest version of E4 firmware. - 

    - - -

    didReceiveIBI:withTimestamp:fromDevice:

    - -

    Receives an Inter Beat Interval (IBI) sample detected at the given timestamp.

    - -

    -(void)didReceiveIBI:(float) ibi withTimestamp:(double) timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    ibi
    -   The value of the IBI sample. The value is the distance from the previous detected heartbeat in seconds.
    -timestamp
    -   The timestamp for the IBI sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - -

    Discussion

    - -

    IBIs are calculated in real time, using the latest samples of raw data from the optical sensor. An algorithm filters out data affected by movements. After an initialization period of about 20 seconds, IBIs are sent as soon as heart beats are detected. - 

    - -

    didReceiveGSR:withTimestamp:fromDevice:

    - -

    Receives a GSR sample acquired at the given timestamp.

    - -

    - (void) didReceiveGSR:(float) gsr withTimestamp:(double) timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    gsr
    -   The value of the GSR sample. The value is expressed in microsiemens.
    -timestamp
    -   The timestamp for the GSR sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - -

    didReceiveTemperature:withTimestamp:fromDevice:

    - -

    Receives an temperature value acquired at the given timestamp.

    - -

    - (void) didReceiveTemperature:(float) temp withTimestamp:(double) timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    temp
    -   The value of the temperature sample expressed in Celsius degree. The value is derived from the optical temperature sensor placed on the wrist.
    -timestamp
    -   The timestamp for the temperature sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - - -

    didReceiveBVP:withTimestamp:fromDevice:

    - -

    Receives an IBI value acquired at the given timestamp.

    - -

    - (void) didReceiveBVP:(float) bvp withTimestamp:(double) timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    bvp
    -   The value of the BVP sample. The value is derived from the light absorbance of the arterial blood. The raw signal is filtered to remove movement artifacts.
    -timestamp
    -   The timestamp for the BVP sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - - - - -

    didReceiveAccelerationX:y:z:withTimestamp:fromDevice:

    - -

    Receives an acceleration sample acquired at the given timestamp.

    - -

    - (void) didReceiveAccelerationX:(char)x y:(char)y z:(char)z withTimestamp:(double)timestamp fromDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    x
    -   The acceleration value for x axis. The x axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the USB slot.
    -y
    -   The acceleration value for y axis. The y axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the shorter strap.
    -z
    -   The acceleration value for z axis. The x axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the bottom of the device.
    -timestamp
    ƒ -   The timestamp for the acceleration sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - -

    Discussion

    - -

    The values of acceleration include the gravitational acceleration on each of the 3 axis. Accelerometer sensitivity is +-2g and values goes from -127 to +128 where -127 correspond to an acceleration of -2g and +128 correspond of an acceleration of to +2g.

    - - -

    didReceiveBatteryLevel:withTimestamp:fromDevice:

    - -

    - (void)didReceiveBatteryLevel :(float)level withTimestamp:(double)timestamp fromDevice:(EmpaticaDeviceManager*) device

    -Notify when the batteryLevel property of the connected device changes. -
    Parameters
    - -

    level
    -   The battery level of the device. Values: [0.0 - 1.0]
    -timestamp
    -   The timestamp for the battery sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT. -device
    -   The device of type EmpaticaDeviceManager that acquired the sample.

    - - -

    didUpdateDeviceStatus:forDevice:

    - -

    Notify when the status property of the connected device changes. -

    - -

    - (void)didUpdateDeviceStatus:(DeviceStatus)status forDevice:(EmpaticaDeviceManager*) device

    - -
    Parameters
    - -

    status
    -   The current status of the device -device
    -   The device of type EmpaticaDeviceManager that updated its status.

    - - -

    DeviceStatus

    - -

    Defines the possible status of the E3 device

    - -
    typedef enum {
    -  kDeviceStatusDisconnected,
    -  kDeviceStatusConnecting,
    -  kDeviceStatusConnected,
    -  kDeviceStatusDisconnecting
    -} DeviceStatus;
    -
    - -

    Constants

    - -

    kDeviceStatusDisconnected
    -   The E3 device is not connected.
    -kDeviceStatusConnecting
    -   A connection with the E3 device is in progress
    -kDeviceStatusConnected
    -   The E3 device is connected.
    -kDeviceStatusDisconnecting
    -   A disconnection with the E3 device is in progress.
    - - -

    - - - -
    -
    - - diff --git a/ios-sdk-tutorial-072.html b/ios-sdk-tutorial-072.html deleted file mode 100644 index c1df0b3..0000000 --- a/ios-sdk-tutorial-072.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - Empatica iOS SDK for Developers - - - - - - - - - - - - -
    -
    - -
    -

    < back to Empatica for Developers

    -

    Empatica iOS SDK

    -
    - -
    - -

    The steps described below assume you are adding the Empatica API to an existing project, or you can also create a new project based on the available example projects.

    - -

    Download our Xcode example projects, already configured for use with the Empatica API, and start using your Empatica E4 in a matter of minutes:

    - -
  • Download the single device example Xcode project.
  • -
  • Download the multiple devices example Xcode project.
  • - -

    While using our sample projects, you are just required to use your Empatica API key in the AppDelegate.m source file and remember to delete the line starting with "#error"

    - -

    -Add to your own project -

    -

    -Step 1: Setup -

    - -

    -Add Empalink API

    - -
      -
    1. Download the EmpaLink Framework for iOS from your Developer Area in Empatica Connect.

    2. -
    3. Open your existing project.

    4. -
    5. Drag the EmpaLink Framework into your project's "Frameworks" folder.

    6. -
    - -

    - -

    Note: Make sure the "Copy items into destination group's folder (if needed)" checkbox is checked. -

    - -

    - -

    -Add background communication support

    - -

    EmpaLink communicates with the Empatica device even while the app is in the background. Your app requires the authorization to run CoreBluetooth service in the background to work.

    - -

    In order to enable background communications, you need to check the right "Background Modes" option in the iOS Target Properties.

    - -
      -
    1. In the Project Target, select the "Capabilities" tab.

    2. -
    3. Enable "Background Modes" by clicking on the switch.

    4. -
    5. Check "Uses Bluetooth LE accessories".

    6. -
    - -

    - -

    -Step 2: Initialize the API

    - -

    The final steps to set up the API require adding a few lines of code to your main app delegate. Being the class where you include iOS required methods like applicationDidFinishLaunching.

    - -

    -Import the Empatica API header

    - -

    At the top of your app delegate source file - and anywhere you invoke the DeviceManager class, you’ll need to include the correct EmpaLink header.

    - -

    If you downloaded the full version, simply add this line:

    - -
     // AppDelegate.h
    -#import <EmpaLink-ios-0.7-full/EmpaticaAPI-0.7.h>
    - -

    Otherwise, add the following line:

    - -
     // AppDelegate.h
    -#import <EmpaLink-ios-0.7-full/EmpaticaAPI-0.7.h>
    - -

    -Set Your Empatica API Key

    - -

    The EmpaLink API requires your developer key in order to make any requests to the API. Call this method with your API key when launching your app, adding the following code to your app delegate source file usually AppDelegate.m:

    - -
    // AppDelegate.h
    -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    -    [EmpaticaAPI authenticateWithAPIKey:@"HERE_GOES_YOUR_API_KEY"
    -      andCompletionHandler:^(BOOL success, NSString *description)
    -{
    -  NSLog(@"Empatica API authentication successful: %d", success);
    -}];
    -  return YES;
    -}
    - -

    In your app delegate source file, you also need to implement the following methods:

    - -
    // AppDelegate.h
    -- (void)applicationDidEnterBackground:(UIApplication *)application {
    -  [EmpaticaAPI prepareForBackground];
    -}
    - -
    - (void)applicationDidBecomeActive:(UIApplication *)application {
    -  [EmpaticaAPI prepareForResume];
    -}
    - -

    -Step 3: Use the EmpaLink API

    - -

    Now you are ready to start using the EmpaLink API in your project. If your app will connect to one E4 device at time, read the Single device section below. If your app needs to connect to multiple E4 devices at the same time, please jump to the Multiple Devices section.

    - -

    -Single device

    - -

    Your main view controller - for example, in the default single view app, ViewController.m must implement the EmpaticaDelegate and EmpaticaDeviceDelegate protocols.

    - -
    // ViewController.m
    -@interface ViewController () <EmpaticaDelegate, EmpaticaDeviceDelegate>
    - -

    Ask the API to scan for devices, e.g., when you press a button

    - -
    // ViewController.m
    -- (IBAction)ScanForDevicesButtonPressed:(id)sender {
    - [EmpaticaAPI discoverDevicesWithDelegate:self];
    -}
    - -

    Connect to a device

    - -
    // ViewController.m
    -- (void)didDiscoverDevices:(NSArray *)devices {
    -if (devices.count > 0) {
    -  // Connecting to first available device
    -  EmpaticaDeviceManager *firstDevice = [devices objectAtIndex:0];
    -  [firstDevice connectWithDeviceDelegate:self];
    -} else {
    -        NSLog(@"No device found in range");
    -  }
    -}
    - -

    Start receiving samples by implementing EmpaticaDeviceDelegate methods

    - -
    // ViewController.m
    -  - (void)didReceiveGSR:(float)gsr withTimestamp:(double)timestamp fromDevice:(EmpaticaDeviceManager *)device {
    -  // Do something with the received sample
    -  NSLog(@"GSR value received: %f at timestamp: %lf", gsr, timestamp);
    -  }
    - -

    -Multiple devices

    - -

    Your main view controller (for example, in the default single view app, ViewController.m) must implement EmpaticaDelegate protocol.

    - -
    // ViewController.m
    -@interface ViewController () <EmpaticaDelegate>
    - -

    Ask the API to scan for devices

    -
    - (IBAction)ScanForDevicesButtonPressed:(id)sender {
    -  [EmpaticaAPI discoverDevicesWithDelegate:self];
    -}
    - -

    Create the E4 device manager

    - -

    To allow your app to handle multiple devices, you will need to create a class (e.g., E4DeviceManager) implementing EmpaticaDeviceDelegate protocol. Each connected device will have, as a delegate, a different instance of E4DeviceManager class.

    - -
    // E4DeviceManager.m
    -@interface E4DeviceManager : NSObject 
    - -

    Connect to all discovered devices

    - -
    // ViewController.m
    -  @property (nonatomic, strong) NSMutableArray *E4DeviceManagers;
    -    // ViewController.m
    -  - (void)didDiscoverDevices:(NSArray *)devices {
    -    if (devices.count > 0) {
    -        for (EmpaticaDeviceManager *device in devices) {
    -           NSLog(@"Device %@ Discovered", device.name);
    -
    -            // Create a DeviceManager for each device
    -            E4DeviceManager *manager = [[E4DeviceManager alloc] init];
    -            [_E4DeviceManagers addObject:manager];
    -
    -            // Connect to E4 device
    -            [device connectWithDeviceDelegate:manager];
    -        }
    -    } else {
    -        NSLog(@"No devices found in range");
    -      }
    -  }
    - -

    Start receiving samples by implementing EmpaticaDeviceDelegate methods in E4DeviceManager.

    - -
     // E4DeviceManager.m
    -  - (void)didReceiveGSR:(float)gsr withTimestamp:(double)timestamp fromDevice:(EmpaticaDeviceManager *)device {
    -    // Do something with the received GSR
    -    NSLog(@"[%@] GSR received: %f at timestamp %f", device.name, gsr, timestamp);
    -  }
    -
    - - - -
    -
    - - diff --git a/javascripts/main.js b/javascripts/main.js deleted file mode 100644 index d8135d3..0000000 --- a/javascripts/main.js +++ /dev/null @@ -1 +0,0 @@ -console.log('This would be the main JS file.'); diff --git a/params.json b/params.json deleted file mode 100644 index aa6c21b..0000000 --- a/params.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Empatica for Developers","tagline":"Empatica Developer`s Documentation","body":"# Empatica Developer's page\r\nThe place where you will find documentation and tutorials tailored for developers.\r\n\r\n## Mobile Platforms\r\nEmpatica provides developers with SDK for mobile development, both for Android and iOS platforms.\r\n\r\n### iOS\r\n\r\n**v0.7**\r\n\r\nYou can find info about our latest API version for iOS [here](ios-sdk-tutorial-072.html)\r\n\r\n**v0.6**\r\n\r\n### Android\r\n\r\n**v2.0**\r\n\r\n**v1.3**\r\n\r\n## Streaming servers\r\nEmpatica provides developers with Bluetooth streaming software for desktop environments, both for Windows and Mac OSX.\r\n\r\n### Windows\r\n\r\n#### BLE client/server\r\nInstructions and client source-code available at: [Empatica BLE client](https://github.com/empatica/ble-server-client-windows)\r\n\t\r\n### Mac OSX\r\n\r\n####TCP Server Mac\r\n\r\n#### Support or Contact\r\nHaving trouble with Empatica developer`s software? [Contact support](support@empatica.com) and we’ll help you sort it out.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file diff --git a/stylesheets/github-dark.css b/stylesheets/github-dark.css deleted file mode 100644 index 0c393bf..0000000 --- a/stylesheets/github-dark.css +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright 2014 GitHub Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -.pl-c /* comment */ { - color: #969896; -} - -.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */, -.pl-s .pl-v /* string variable */ { - color: #0099cd; -} - -.pl-e /* entity */, -.pl-en /* entity.name */ { - color: #9774cb; -} - -.pl-s .pl-s1 /* string source */, -.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ { - color: #ddd; -} - -.pl-ent /* entity.name.tag */ { - color: #7bcc72; -} - -.pl-k /* keyword, storage, storage.type */ { - color: #cc2372; -} - -.pl-pds /* punctuation.definition.string, string.regexp.character-class */, -.pl-s /* string */, -.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, -.pl-sr /* string.regexp */, -.pl-sr .pl-cce /* string.regexp constant.character.escape */, -.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */, -.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ { - color: #3c66e2; -} - -.pl-v /* variable */ { - color: #fb8764; -} - -.pl-id /* invalid.deprecated */ { - color: #e63525; -} - -.pl-ii /* invalid.illegal */ { - background-color: #e63525; - color: #f8f8f8; -} - -.pl-sr .pl-cce /* string.regexp constant.character.escape */ { - color: #7bcc72; - font-weight: bold; -} - -.pl-ml /* markup.list */ { - color: #c26b2b; -} - -.pl-mh /* markup.heading */, -.pl-mh .pl-en /* markup.heading entity.name */, -.pl-ms /* meta.separator */ { - color: #264ec5; - font-weight: bold; -} - -.pl-mq /* markup.quote */ { - color: #00acac; -} - -.pl-mi /* markup.italic */ { - color: #ddd; - font-style: italic; -} - -.pl-mb /* markup.bold */ { - color: #ddd; - font-weight: bold; -} - -.pl-md /* markup.deleted, meta.diff.header.from-file */ { - background-color: #ffecec; - color: #bd2c00; -} - -.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { - background-color: #eaffea; - color: #55a532; -} - -.pl-mdr /* meta.diff.range */ { - color: #9774cb; - font-weight: bold; -} - -.pl-mo /* meta.output */ { - color: #264ec5; -} - diff --git a/stylesheets/github-light.css b/stylesheets/github-light.css deleted file mode 100644 index 872a6f4..0000000 --- a/stylesheets/github-light.css +++ /dev/null @@ -1,116 +0,0 @@ -/* - Copyright 2014 GitHub Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -*/ - -.pl-c /* comment */ { - color: #969896; -} - -.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */, -.pl-s .pl-v /* string variable */ { - color: #0086b3; -} - -.pl-e /* entity */, -.pl-en /* entity.name */ { - color: #795da3; -} - -.pl-s .pl-s1 /* string source */, -.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ { - color: #333; -} - -.pl-ent /* entity.name.tag */ { - color: #63a35c; -} - -.pl-k /* keyword, storage, storage.type */ { - color: #a71d5d; -} - -.pl-pds /* punctuation.definition.string, string.regexp.character-class */, -.pl-s /* string */, -.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, -.pl-sr /* string.regexp */, -.pl-sr .pl-cce /* string.regexp constant.character.escape */, -.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */, -.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ { - color: #183691; -} - -.pl-v /* variable */ { - color: #ed6a43; -} - -.pl-id /* invalid.deprecated */ { - color: #b52a1d; -} - -.pl-ii /* invalid.illegal */ { - background-color: #b52a1d; - color: #f8f8f8; -} - -.pl-sr .pl-cce /* string.regexp constant.character.escape */ { - color: #63a35c; - font-weight: bold; -} - -.pl-ml /* markup.list */ { - color: #693a17; -} - -.pl-mh /* markup.heading */, -.pl-mh .pl-en /* markup.heading entity.name */, -.pl-ms /* meta.separator */ { - color: #1d3e81; - font-weight: bold; -} - -.pl-mq /* markup.quote */ { - color: #008080; -} - -.pl-mi /* markup.italic */ { - color: #333; - font-style: italic; -} - -.pl-mb /* markup.bold */ { - color: #333; - font-weight: bold; -} - -.pl-md /* markup.deleted, meta.diff.header.from-file */ { - background-color: #ffecec; - color: #bd2c00; -} - -.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { - background-color: #eaffea; - color: #55a532; -} - -.pl-mdr /* meta.diff.range */ { - color: #795da3; - font-weight: bold; -} - -.pl-mo /* meta.output */ { - color: #1d3e81; -} - diff --git a/stylesheets/normalize.css b/stylesheets/normalize.css deleted file mode 100644 index 30366a6..0000000 --- a/stylesheets/normalize.css +++ /dev/null @@ -1,424 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/stylesheets/print.css b/stylesheets/print.css deleted file mode 100644 index 4b19b67..0000000 --- a/stylesheets/print.css +++ /dev/null @@ -1,228 +0,0 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - padding: 0; - margin: 0; - font: inherit; - font-size: 100%; - vertical-align: baseline; - border: 0; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-spacing: 0; - border-collapse: collapse; -} -body { - font-family: 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 13px; - line-height: 1.5; - color: #000; -} - -a { - font-weight: bold; - color: #d5000d; -} - -header { - padding-top: 35px; - padding-bottom: 10px; -} - -header h1 { - font-size: 48px; - font-weight: bold; - line-height: 1.2; - color: #303030; - letter-spacing: -1px; -} - -header h2 { - font-size: 24px; - font-weight: normal; - line-height: 1.3; - color: #aaa; - letter-spacing: -1px; -} -#downloads { - display: none; -} -#main_content { - padding-top: 20px; -} - -code, pre { - margin-bottom: 30px; - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal; - font-size: 12px; - color: #222; -} - -code { - padding: 0 3px; -} - -pre { - padding: 20px; - overflow: auto; - border: solid 1px #ddd; -} -pre code { - padding: 0; -} - -ul, ol, dl { - margin-bottom: 20px; -} - - -/* COMMON STYLES */ - -table { - width: 100%; - border: 1px solid #ebebeb; -} - -th { - font-weight: 500; -} - -td { - font-weight: 300; - text-align: center; - border: 1px solid #ebebeb; -} - -form { - padding: 20px; - background: #f2f2f2; - -} - - -/* GENERAL ELEMENT TYPE STYLES */ - -h1 { - font-size: 2.8em; -} - -h2 { - margin-bottom: 8px; - font-size: 22px; - font-weight: bold; - color: #303030; -} - -h3 { - margin-bottom: 8px; - font-size: 18px; - font-weight: bold; - color: #d5000d; -} - -h4 { - font-size: 16px; - font-weight: bold; - color: #303030; -} - -h5 { - font-size: 1em; - color: #303030; -} - -h6 { - font-size: .8em; - color: #303030; -} - -p { - margin-bottom: 20px; - font-weight: 300; -} - -a { - text-decoration: none; -} - -p a { - font-weight: 400; -} - -blockquote { - padding: 0 0 0 30px; - margin-bottom: 20px; - font-size: 1.6em; - border-left: 10px solid #e9e9e9; -} - -ul li { - list-style-position: inside; - list-style: disc; - padding-left: 20px; -} - -ol li { - list-style-position: inside; - list-style: decimal; - padding-left: 3px; -} - -dl dd { - font-style: italic; - font-weight: 100; -} - -footer { - padding-top: 20px; - padding-bottom: 30px; - margin-top: 40px; - font-size: 13px; - color: #aaa; -} - -footer a { - color: #666; -} - -/* MISC */ -.clearfix:after { - display: block; - height: 0; - clear: both; - visibility: hidden; - content: '.'; -} - -.clearfix {display: inline-block;} -* html .clearfix {height: 1%;} -.clearfix {display: block;} diff --git a/stylesheets/stylesheet.css b/stylesheets/stylesheet.css deleted file mode 100644 index d58131a..0000000 --- a/stylesheets/stylesheet.css +++ /dev/null @@ -1,373 +0,0 @@ -/* http://meyerweb.com/eric/tools/css/reset/ - v2.0 | 20110126 - License: none (public domain) -*/ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video { - padding: 0; - margin: 0; - font: inherit; - font-size: 100%; - vertical-align: baseline; - border: 0; -} -/* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, -footer, header, hgroup, menu, nav, section { - display: block; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -table { - border-spacing: 0; - border-collapse: collapse; -} - -/* LAYOUT STYLES */ -body { - font-family: 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 1em; - line-height: 1.5; - color: #6d6d6d; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); - background: #e7e7e7 url(../images/body-bg.png) 0 0 repeat; -} - -a { - color: #d5000d; -} -a:hover { - color: #c5000c; -} - -header { - padding-top: 35px; - padding-bottom: 25px; -} - -header h1 { - font-family: 'Chivo', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 48px; font-weight: 900; - line-height: 1.2; - color: #303030; - letter-spacing: -1px; -} - -header h2 { - font-size: 24px; - font-weight: normal; - line-height: 1.3; - color: #aaa; - letter-spacing: -1px; -} - -#container { - min-height: 595px; - background: transparent url(../images/highlight-bg.jpg) 50% 0 no-repeat; -} - -.inner { - width: 620px; - margin: 0 auto; -} - -#container .inner img { - max-width: 100%; -} - -#downloads { - margin-bottom: 40px; -} - -a.button { - display: block; - float: left; - width: 179px; - padding: 12px 8px 12px 8px; - margin-right: 14px; - font-size: 15px; - font-weight: bold; - line-height: 25px; - color: #303030; - background: #fdfdfd; /* Old browsers */ - background: -moz-linear-gradient(top, #fdfdfd 0%, #f2f2f2 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f2f2f2)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* IE10+ */ - background: linear-gradient(top, #fdfdfd 0%,#f2f2f2 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f2f2f2',GradientType=0 ); /* IE6-9 */ - border-top: solid 1px #cbcbcb; - border-right: solid 1px #b7b7b7; - border-bottom: solid 1px #b3b3b3; - border-left: solid 1px #b7b7b7; - border-radius: 30px; - -webkit-box-shadow: 10px 10px 5px #888; - -moz-box-shadow: 10px 10px 5px #888; - box-shadow: 0px 1px 5px #e8e8e8; - -moz-border-radius: 30px; - -webkit-border-radius: 30px; -} -a.button:hover { - background: #fafafa; /* Old browsers */ - background: -moz-linear-gradient(top, #fdfdfd 0%, #f6f6f6 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fdfdfd), color-stop(100%,#f6f6f6)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #fdfdfd 0%,#f6f6f6 100%); /* IE10+ */ - background: linear-gradient(top, #fdfdfd 0%,#f6f6f6, 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fdfdfd', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */ - border-top: solid 1px #b7b7b7; - border-right: solid 1px #b3b3b3; - border-bottom: solid 1px #b3b3b3; - border-left: solid 1px #b3b3b3; -} - -a.button span { - display: block; - height: 23px; - padding-left: 50px; -} - -#download-zip span { - background: transparent url(../images/zip-icon.png) 12px 50% no-repeat; -} -#download-tar-gz span { - background: transparent url(../images/tar-gz-icon.png) 12px 50% no-repeat; -} -#view-on-github span { - background: transparent url(../images/octocat-icon.png) 12px 50% no-repeat; -} -#view-on-github { - margin-right: 0; -} - -code, pre { - margin-bottom: 30px; - font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal; - font-size: 14px; - color: #222; -} - -code { - padding: 0 3px; - background-color: #f2f2f2; - border: solid 1px #ddd; -} - -pre { - padding: 20px; - overflow: auto; - color: #f2f2f2; - text-shadow: none; - background: #303030; -} -pre code { - padding: 0; - color: #f2f2f2; - background-color: #303030; - border: none; -} - -ul, ol, dl { - margin-bottom: 20px; -} - - -/* COMMON STYLES */ - -hr { - height: 1px; - padding-bottom: 1em; - margin-top: 1em; - line-height: 1px; - background: transparent url('../images/hr.png') 50% 0 no-repeat; - border: none; -} - -strong { - font-weight: bold; -} - -em { - font-style: italic; -} - -table { - width: 100%; - border: 1px solid #ebebeb; -} - -th { - font-weight: 500; -} - -td { - font-weight: 300; - text-align: center; - border: 1px solid #ebebeb; -} - -form { - padding: 20px; - background: #f2f2f2; - -} - - -/* GENERAL ELEMENT TYPE STYLES */ - -h1 { - font-size: 32px; -} - -h2 { - margin-bottom: 8px; - font-size: 22px; - font-weight: bold; - color: #303030; -} - -h3 { - margin-bottom: 8px; - font-size: 18px; - font-weight: bold; - color: #d5000d; -} - -h4 { - font-size: 16px; - font-weight: bold; - color: #303030; -} - -h5 { - font-size: 1em; - color: #303030; -} - -h6 { - font-size: .8em; - color: #303030; -} - -p { - margin-bottom: 20px; - font-weight: 300; -} - -a { - text-decoration: none; -} - -p a { - font-weight: 400; -} - -blockquote { - padding: 0 0 0 30px; - margin-bottom: 20px; - font-size: 1.6em; - border-left: 10px solid #e9e9e9; -} - -ul li { - list-style-position: inside; - list-style: disc; - padding-left: 20px; -} - -ol li { - list-style-position: inside; - list-style: decimal; - padding-left: 3px; -} - -dl dt { - color: #303030; -} - -footer { - padding-top: 20px; - padding-bottom: 30px; - margin-top: 40px; - font-size: 13px; - color: #aaa; - background: transparent url('../images/hr.png') 0 0 no-repeat; -} - -footer a { - color: #666; -} -footer a:hover { - color: #444; -} - -/* MISC */ -.clearfix:after { - display: block; - height: 0; - clear: both; - visibility: hidden; - content: '.'; -} - -.clearfix {display: inline-block;} -* html .clearfix {height: 1%;} -.clearfix {display: block;} - -/* #Media Queries -================================================== */ - -/* Smaller than standard 960 (devices and browsers) */ -@media only screen and (max-width: 959px) { } - -/* Tablet Portrait size to standard 960 (devices and browsers) */ -@media only screen and (min-width: 768px) and (max-width: 959px) { } - -/* All Mobile Sizes (devices and browser) */ -@media only screen and (max-width: 767px) { - header { - padding-top: 10px; - padding-bottom: 10px; - } - #downloads { - margin-bottom: 25px; - } - #download-zip, #download-tar-gz { - display: none; - } - .inner { - width: 94%; - margin: 0 auto; - } -} - -/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ -@media only screen and (min-width: 480px) and (max-width: 767px) { } - -/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ -@media only screen and (max-width: 479px) { } diff --git a/windows-ble-server.html b/windows-ble-server.html deleted file mode 100644 index a9f5093..0000000 --- a/windows-ble-server.html +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - - - Empatica BLE Server for Windows (Beta) - - - - - - - - - - - - -
    -
    - -
    -

    < back to Empatica for Developers

    -

    Empatica BLE Server for Windows (Beta)

    -
    - -
    - -

    This is a reference guide for the communication protocol supported by the Empatica TCP Server.

    - -

    Empatica TCP server allows to receive realtime data from multiple Empatica E4 devices.

    - -

    Please note that for each TCP connection it is allowed to connect one Empatica Device at time. To connect to multiple devices, multiple TCP connections are required. The server accepts TCP sockets connections.

    - -

    After a succesful connection from a client, the server waits for command messages.

    - -

    The general message structure is described in the following section, while details on the client commands and server responses are described in the commands and data section.

    - -

    To get a glance of the communication protocol, visit the protocol example section.

    - - -

    - General message structure -

    - - -

    Messages are ASCII strings terminated with a newline (in Windows '\r\n') character. Some commands have parameters, which are separated by spaces.

    - -

    Client requests are in the following format:

    - -
    -	Client request format
    -		<COMMAND> <ARGUMENT_LIST>
    -	Example
    -		device_subscribe gsr ON
    -	
    - -

    Messages from server containing responses to commands are in the following format:

    - -
    -	Server responses
    -		R <COMMAND> <ARGUMENT_LIST>
    -	Example
    -		R device_subscribe acc ON
    -	
    - -

    Messages from server containing data from device are in the following format:

    - -
    -	Stream Data Format
    -		<STREAM_TYPE> <TIMESTAMP> <DATA>
    -	Example
    -		G 123345627891.123 3.129
    -	
    - -

    - Commands and Responses Details -

    - -

    - Server status -

    - -

    The client requires the current status of the server. The server status is OK when the server is fully functional and ready to connect to Empatica E4 devices. The server status is ERR if something is wrong (often, problems are related to Bluetooth low energy adapter).

    - -

    Possible server status:

    - -
  • OK: the server is fully functional an d ready to connect to Empatica E4 devices.
  • -
  • ERR: something is wrong (often, problems are related to the Bluetooth low energy adapter).
  • -

    - -
    Client Request
    -	server_status
    -
    - -
    Server Response
    -	R server_status OK
    -	R server_status ERR <reason>
    -Example:
    -	R server_status ERR Bluetooth low energy not available on server`
    -
    - -

    - List of available devices -

    - -

    The client requires the list of Empatica E4 devices in range and available for connection. The server responds with the number of available devices and a list of devices info.

    - -
    Client Request
    -	device_list
    - -
    Server Response
    -	R device_list <NUMBER_OF_DEVICES> | <DEVICE_INFO_1> | <DEVICE_INFO_2>
    -Example
    -	R device_list 2 | 9ff167 Empatica_E4 available | 740163 Empatica_E4 available
    - -

    The format of the device info is the following:

    - -
    DEVICE_INFO format
    -	<DEVICE_ID> <DEVICE_NAME> <AVAILABILITY>
    -Example
    -	9ff167 Empatica E4 available
    - -DEVICE_ID - -

    The device id is unique for every device. It is used by the client during a connect request.

    - -DEVICE_NAME - -

    The device name being used.

    - -AVAILABILITY - -

    Availability parameter is always available. Other values are reserved for future implementation.

    - -

    - Connect to a Device -

    - -
    1. The client sends a connection request to a specific device.
    2. -
    3. Each TCP connection is allowed to connect to one Empatica Device at time.
    4. -
    5. To connect to multiple devices, multiple TCP connections are required.
    - -
    Client Request
    -	device_connect <DEVICE_ID>
    -Example:
    -device_connect 9ff167
    - -DEVICE_ID - -

    The device id is returned from the server after a device_list command.

    - -
    Server Response
    -	R device_connect OK
    -	R device_connect ERR <reason>
    -Example:
    -	R device_connect ERR The device requested for connection is not available.
    - -

    - Disconnect from a Device -

    - -

    The client sends a device disconnection request. It will be disconnected from the currently connected device.

    - -
    Client Request
    -	device_disconnect
    - -
    Server Response
    -	R device_disconnect OK
    -	R device_disconnect ERR <reason>
    -Example:
    -	R device_disconnect ERR No connected device.
    - -

    In case of device disconnection (e.g., the user switch off the device, or the battery runs out) the server sends the following packet

    - -
    Device Disconnection
    -	X device_disconnect
    - - -

    - Subscribe to Receive Data -

    - -

    To start receiving data from a given stream, the client sends a data subscription request specifying the desired stream.

    - -
    Client Request
    -	device_subscribe <STREAM> ON
    -Example:
    -	device_subscribe gsr ON
    - -
    Server Response
    -	R device_subscribe <STREAM> ON
    -	R device_subscribe <STREAM> ERR <REASON>
    -Example:
    -	R device_subscribe gsr OK
    - -STREAM - -

    The streams available are the following:

    - - -
  • acc - 3-axis acceleration
  • -
  • bvp - Blood Volume Pulse
  • -
  • gsr - Galvanic Skin Response
  • -
  • ibi - Interbeat Interval
  • -
  • tmp - Skin Temperature
  • -
  • bat - Device Battery
  • - -

    -

    -Unsubscribe from Receive Data -

    - -

    To stop receiving data from a given stream, the client sends a data unsubscription request specifying the desired stream.

    - -
    Client Request
    -	device_subscribe <STREAM> OFF
    -Example:
    -	device_subscribe gsr OFF`
    - -
    Server Response
    -	R device_subscribe <STREAM> OFF
    -	R device_subscribe <STREAM> ERR <REASON>
    -Example:
    -	R device_subscribe gsr OFF
    - -STREAM - -

    The streams available are the following:

    - -
  • acc - 3-axis acceleration
  • -
  • bvp - Blood Volume Pulse
  • -
  • gsr - Galvanic Skin Response
  • -
  • ibi - Interbeat Interval
  • -
  • tmp - Skin Temperature
  • -
  • bat - Device Battery
  • -
  • tag - Tag taken from the device (by pressing the button)
  • -

    - -

    - Suspend data streaming -

    - -

    To temporarily suspend the data streaming (without disconnecting or switching off the device), the client sends a pause request

    - -
    Client Request
    -	pause ON
    - -
    Server Response
    -	R pause ON
    -	R pause ERR <REASON>
    -Example:
    -	R pause ERR You are not connected to any device`
    - -

    - Resume data streaming -

    - -

    To resume the data streaming, the client sends a resume request

    - -
    Client Request
    -	pause OFF
    - -
    Server Response
    -	R pause OFF
    -	R pause ERR <REASON>
    -Example:
    -	R pause ERR You are not connected to any device
    - -

    - Data Streaming Packets -

    - -

    After a succesful connection and stream subscription to an Empatica Device, the client starts receiving sensor's data from the server.

    - -
    Stream Data Format
    -	<STREAM_TYPE> <TIMESTAMP> <DATA>
    -Example
    -	G 123345627891.123 3.129
    - -STREAM_TYPE - -

    The streams available are the following:

    - -
  • E4_Acc - 3-axis acceleration
  • -
  • E4_Bvp - Blood Volume Pulse
  • -
  • E4_Gsr - Galvanic Skin Response
  • -
  • E4_Temp - Skin Temperature
  • -
  • E4_Ibi - Interbeat Interval
  • -
  • E4_Battery - Device Battery
  • -
  • E4_Tag - Device Battery
  • -

    - -TIMESTAMP - -

    The timestamp for the sample in seconds defined as time interval between the sample received and the reference date, 1 January 1970, GMT.

    - -DATA - -

    Each stream type has different data format as described below:

    - -Acceleration data -

    -
  • The acceleration value for x axis. The x axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the USB slot.
  • -
  • The acceleration value for y axis. The y axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the shorter strap.
  • -
  • The acceleration value for z axis. The x axes is defined by the vector whose starting point is set to the center of the device and whose direction points towards the bottom of the device.
  • -

    - -
    -Acceleration data
    -	E4_Acc 123345627891.123 51 -2 -10
    - -

    Blood Volume Pulse data

    - -

    The value of the BVP sample. The value is derived from the light absorbance of the arterial blood. The raw signal is filtered to remove movement artifacts.

    - -
    Blood Volume Pulse data
    -	E4_Bvp 123345627891.123 31.128
    - -

    Galvanic Skin Response data

    - -

    The value of the GSR sample. The value is expressed in microsiemens.

    - -
    Galvanic Skin Response data
    -	E4_Gsr 123345627891.123 3.129`
    - -

    Temperature data

    - -

    The value of the temperature sample in Celsius degrees. The value is derived from the optical temperature sensor placed on the wrist.

    - -
    Temperature data
    -	E4_Temperature 123345627891.123 35.82`
    - -

    Interbeat Interval data

    - -

    The value of the IBI sample. The value is the distance from the previous detected heartbeat in seconds.

    - -
    Interbeat Interval data
    -	E4_Ibi 123345627891.123 0.822
    - -

    Battery level data

    - -

    The battery level of the device. Values: [0.0 - 1.0]

    - -
    Battery level data
    -E4_Battery 123345627891.123 0.2
    - -

    Tag data

    - -

    The tags taken from the device

    - -
    Battery level data
    -E4_Tag 123345627891.123
    - -

    - Protocol Example -

    - -

    Please find below an example of messages exchange between client and server during a brief acquisition session.

    - -
    [OPEN TCP CONNECTION]
    -==> server_status
    -<== R server_status OK
    -
    -==> device_list
    -<== R device_list 2 | 9ff167 Empatica E4 available | 7a3166 Empatica E4 available
    -
    -==> device_connect ffffff
    -<== R device_connect ERR the requested device is not available
    -
    -==> device_connect 9ff167
    -<== R device_connect OK
    -
    -==> device_subscribe bvp ON
    -<== R device_subscribe bvp OK
    -
    -<== B 123345627891.123 3.212
    -<== B 123345627891.327 10.423
    -<== B 123345627891.472 12.665
    -
    -==> device_disconnect
    -<== R device_disconnect OK
    -[EOF]
    - -

    - Using Empatica BLE Server for Windows (Beta) -

    - -

    NOTE: this part of the documentation is still under development

    - -

    - Requirements -

    - -
  • Windows PC running Windows 7 or Windows 8 with Visual C++ Redistributable Package installed (download from [here](http://www.microsoft.com/en-us/download/details.aspx?id=40784))
  • -
  • The app is currently working only with [Bluegiga Bluetooth Smart Dongle](https://www.bluegiga.com/en-US/products/bled112-bluetooth-smart-dongle/), Driver/Installation guide [here](https://www.bluegiga.com/en-US/products/bled112-bluetooth-smart-dongle/#login-modal -)
  • -
  • Empatica E4 Sensor with firmware build 0.0.1.505+ installed (If you've bought your E4 after May 2015 the firmware should be already updated)
  • -
  • Empatica E4’s must be registered to the API key owner to be accessible via the server application
  • -

    -

    - Installation -

    - -

    Download the latest release of the Empatica BLE Server for Windows (Beta) from [here](http://get.empatica.com/win/EmpaticaBLEServer.html)

    - -

    - Configuration -

    - -

    The first time you start the server, you will see the settings panel that allows you to set:

    - -
  • Your Empatica API Key (you can find yours [here](https://www.empatica.com/connect/developer.php), if you don't have one check this [support article](https://www.empatica.com/docs/support.empatica.com/hc/en-us/articles/203296395))
  • -
  • The listening IP address of the server (is the address where the Empatica BLE Server will listen towhere you have to connect to send commands and receive data, e.g. 127.0.0.1)
  • -
  • The listening port of the server
  • - -

    -

    After configuration set click the "Save" button.

    - -

    - Using the server -

    - -

    You will see the default view of the server, click the "Start" button.

    - -

    If the dongle is not connected (or your PC can't communicate with it, i.e. because you didn't install the dongle's drivers), the discovery won't start and the message "Dongle not connected" is displayed at the bottom.

    - -

    If the dongle was not connected, plug it to your PC and press the "Refresh" button placed in the bottom left corner of the app.

    - -

    If the dongle is connected, the server will start:

    - -
    1. Discovery and connection to the E4 device within Bluetooth range and will start listening to commands on the address and port specified in the settings panel.
    2. -
    3. You can see the label under the button that tells that the app is discovering for E4.
    4. -
    5. You can now switch on your E4 and the led will start to blink green.
    -

    -When the connection is established the led will become light blue and then blue, meaning that the connection was completed. - -

    After a while (around 40 seconds), the led will be switched off in order to save battery. - -When any device is connected, the device ID and the list of the current TCP connections are displayed.

    -

    -When you want to stop streaming from a device, simply switch off your E4 and it will be disconnected from the app.

    - -

    If you want to connect another E4 device, wait when the previous E4 is connected, then press the "Discover other E4 devices" button, the app will start to discover other devices.

    - -

    Make sure to keep the devices not too close because the radios might saturate when the antennas are too close, resulting in lack of communication over-the-air.

    - -

    - Troubleshooting -

    - -When I click "Save" in settings panel, I see the "Invalid Api key" message - -

    Please try to insert again your API Key (you can find your API key here. If you have still the issue, please contact our support

    - -When I click "Start", I can't get my E4 connected - -

    Try to follow these steps in order to get your E4 connected:

    - -
  • Launch the app
  • -
  • Check that the dongle is connected (you should see a "Dongle connected" label) at the bottom of the app's window
  • -
  • Click the "Start" button
  • -
  • Switch on your E4
  • -

    -

    If the app can't connect to your E4 before the led becomes red (and memory mode starts) please contact our support writing us your Api key and the serial number of the device you're using (placed close to sensor's led)

    - - -
    -
    - -