Git Product home page Git Product logo

seemoo-wearable-sensing's Introduction

Gear S3 Data Collector (Tizen)

This folder contains the source code of the Samsung Gear S3 app (Tizen) used for data collection (audio, sensor data, WiFi and BLE beacons) in the paper "Perils of Zero-Interaction Security in the Internet of Things", by Mikhail Fomichev, Max Maass, Lars Almon, Alejandro Molina, Matthias Hollick, in Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, vol. 3, Issue 1, 2019.

The Samsung Gear S3 app consists of two parts: the native service is used for actual data collection and the web app is used to invoke the native service.

In our experimetns we used Samsung Gear S3 (both Classic and Frontier) watches with Tizen Version 3.0.0.2 to collect the following sensor modalities:

Hardware Sensors Sampling rate Comments
Gear S3 Barometric pressure (hPa), luminosity (lux); movement -> accelerometer (m/s^2), gyroscope (deg/s), magnetometer (uT) 10 Hz / 50 Hz 10 Hz for pressure and lux, 50 Hz for movement sensors
Gear S3 Bluetooth low energy (BLE) and WiFi beacons 0.1 Hz Scan visible BLE and WiFi access points (APs) for 10 seconds
Gear S3 Raw audio stream 16 kHz The audio is stored in a *.WAV file

Getting Started

Requirements

SDK Wearable 3.0               # Necessary for the native app (Main SDK)
SDK Wearable 2.3.2             # Necessary for the web app (Main SDK)
Samsung Certificate Extension  # Extension SDK 
Samsung Wearable Extension     # Extension SDK 

Tizen version >= 3.0.0.2 

Setting Up the Environment

  1. Download and install Tizen Studio (https://www.tizen.org/).
  2. Use the Tizen Package Manager (press Alt+Shift+P to open in Tizen Studio) to install the necessary SDKs and Extensions mentioned above.
  3. Enable debugging on the Gear S3 watch and connect it to the Tizen Studio as described here (see the section "Running on a Target Device").
  4. Create a Samsung Certificate using the Certificate Manager (press Alt+Shift+P to open in Tizen Studio) as described here.
  5. Import native and web projects by using File -> Import -> Tizen -> Tizen Project and following the wizzard instructions.

Notes:

  • This app can only be tested on a real device and will not work on the emulator.
  • To connect the Tizen Studio and the targer Gear S3 device make sure they are in the same WiFi network.
  • For each Gear S3 watch a new Samsung Certificate MUST be created in order to install the app!
  • For app installation it is required (!) to set up up-to-date time on a smartwatch (can be done automatically via pairing with a smartphone or the time can be manually set on a smartwatch)

Running the App

  1. Make sure the correct Samsung Certificate is selected (one device – one certificate) and the watch is connected to the Tizen Studio.
  2. First, run the native service on the watch by right clicking on the ServiceSensor project and selecting Run As -> Tizen Native Application (the service automatically gets built and executed on the watch).
  3. Second, run the web app on the watch by right clicking on the HelloAccessoryProvider project and selecting Run As -> Tizen Web Application.
  4. The app automatically starts on the watch and it also appears in the list of installed apps (clik on the icon to start the app). The data collection is started/stopped by pressing the START/STOP button in the center of the screen.

Notes:

  • Each time the data collection is started it overwrites the data collected before!
  • The native service functionality is implemented in native-app/src/servicesensor.c, the web app UI is implemented using web-app/index.html and web-app/js/app.js.

Data Extraction and Structure

The collected sensor data is stored internally on the watch (keep in mind the space requirements, especially for audio data) under /home/owner/media/Others. The data is extracted using the Device Manager in Tizen Studio (opens via Alt+Shift+V)β€”the watch must be connected to the Tizen Studio. In the Device Manager select the required watch and navigate to the /home/owner/media/Others folder, then right click on the Others folder and select the "Pull" option.

The collected data is stored in the following structure (use structure-gear-data.py to reformat the data):

+ Others/ 
| + accData.txt
| + audio.wav
| + audio.time
| + barData.txt
| + ble.txt
| + gyrData.txt
| + luxData.txt
| + wifi.txt

Authors

Timm Lippert and Mikhail Fomichev

License

The code is licensed under the GNU GPLv3. See LICENSE.txt for details.

seemoo-wearable-sensing's People

Contributors

fommike avatar gongxter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

seemoo-wearable-sensing's Issues

Sending gear s3 data to smartphone

Hey! Thank you for sharing your code, it is being quite useful to me. I want to record green LED and IMU data from the gear s3. Although the green LED data was not included in your code i managed to add it and it is working fine.

I saw in your web app js code that there are some functions created for sending the streamed data to the smartphone. However i'm not really sure if they are used at all. I was interested in sending the data to my smartphone, is it possible to do so with your app?

Cheers,
Alex

Cannot import "ServiceSensor" project

Hi,

I tried to import the native projekt (ServiceSensor) according to the readme (Import native and web projects by using File -> Import -> Tizen -> Tizen Project and following the wizzard instructions.) But this way, just the HelloAccessoryProvider-project can be importet. I tried importing the project by clicking on File -> Import -> Existing Projects into Workspace but in this case, I can't run the project! Whenever I click on Run As, I just have the option to Run Configurations and I can't run the project.

Tizen-version (of my watch): 4.0.0.2
Tizen-studio version: 3.1

Hopefully, you can help me :)
Schabolon

Battery life estimation with app running

Thank you very much for open sourcing your application. Have you done any measurements regarding the battery life of the watch when the service is continuously running ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.