Skip to content

TakayukiHoshi1984/DeviceConnect-Docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About DeviceConnect WebAPI

"DeviceConnect WebAPI" is WebAPI which operates as a virtual server on a smart phone. It can use easily various wearable devices and an IoT device by unific description from a web browser or an application.

Introduction

Device Connect system is a multi-OS, on the run-time environment of multi-platform, provides API (RESTful) for connection to a smart device.
Thus, it is intended to improve the convenience of the connection and cooperation method between the smart device.


Function list Device Connect system provides is as follows.

  • Service discovery
  • Connection I/F eliminate (Bluetooth, BLE, Wi-Fi, NFC) a descriptive difficulty of the difference of
  • Uniform API provided by equipment profiles
  • Application authorization by users

<a href="https://raw.githubusercontent.com/wiki/DeviceConnect/DeviceConnect-Android/DevicePluginManual/studio1_en.png" style="text-align:center" ">

Security

Device Connect system implements the security features that are defined in OMA GotAPI v1.0.

Application approval feature

It is the feature to block accesses from applications which are not authorized by user.

When a Device Connect application accesses the Device Connect system for the first time, the application should get an access token with user’s authorization. If the application tries to access the device without access token, the Device Connect system will return error to the application.

In addition, this feature can be turned OFF on the setting window of Device Connect Manager.

Server spoofing detection

NOTE: This feature is currently supported by only Android version. It is the feature to allow the application to detect whether Device Connect system is spoofed by other applications or not.

The following is summary of the sequence of this feature. First, the application requests the Device Connect system to set a signature to response message. The request should be sent as URL scheme. In addition, the request contains a string which is key to generate signature of response message.

If the response message does not have a valid signature the application subsequently received, the application judges that the response message should not be sent from genuine Device Connect system.

Please refer the specifications of the OMA GotAPI v1.0 for details of sequence.

Access restrictions

It is the feature to prohibit accesses from applications which are not included in the white list.

If this feature is turned ON, the Device Connect system checks Origin header of the request message received from the application. If 'Origin' is not included in the white list, the Device Connect system will return error to the application.

User can configure to accept accesses from the specific Origins in the settings of Device Connect Manager.

In addition, this feature can be turned OFF on the setting window of Device Connect Manager.

#Application Requirements

Application must specify the origin of requests

In accordance with OMA GotAPI v1.0, the access from a Device Connect application is authorized by the Device Connect system only if the application itself is the Origin of the HTTP request. The Device Connect system returns error response for HTTP request without specified Origin. Device Connect applications should specify its Origin when HTTP request.

For HTML Applications

HTML application must specify Origin header defined by RFC6454 in HTTP request header.

Example:

GET /gotapi/availability HTTP/1.1
Host: 127.0.0.1:4035
Origin: http://xxx.example.com/

The Origin header is specified automatically by Chrome, Safari and Firefox browsers, except for cases that GET request is sent from the address bar.

For OS-native Applications

OS-native application must specify the identifier of the application (its package name) in X-GotAPI-Origin header.

Example:

GET /gotapi/availability HTTP/1.1
Host: 127.0.0.1:4035
X-GotAPI-Origin: com.example.android.app

Connecting to Device Connect

The basic sequence of Device Connect is shown below.


Repository of DeviceConnect

  • DeviceConnect-Android
    It is a repository that sample implement DeviceConnect platform on Android.
    In Android terminal, if you want to operate the DeviceConnect, please check out from this repository.

* [DeviceConnect-iOS](https://github.com/DeviceConnect/DeviceConnect-iOS)
It is a repository that sample implement DeviceConnect platform on iOS.
In iOS terminal, if you want to operate the DeviceConnect, please check out from this repository.

* [DeviceConnect-JS](https://github.com/DeviceConnect/DeviceConnect-JS)
It is a repository that implements the SDK for calling DeviceConnect from HTML.

Example for Android

Updated some package names of the sample for Android at 2014/10/15. Please reinstall by following procedure if you would check this sample again.

  1. Delete files that are related to the demoWebSite.zip on internal storage.
  2. Uninstall a APK of old Manager and plugins.
  3. Choose "CLEAR BROWSING DATA..." in "history" on Chrome Browser menu.
  4. Choose "Clear" button with "Clear the cache" check box.
  5. Refer to the procedure for "Example for Android" in "Readme.md".

1.Make this Folder to Android's internal Storage.

Android root
   └── mnt
       └── sdcard
           └── demoWebSite

2.Access the internal file URI with Firefox browser.

  [例] file:///sdcard/demoWebSite/index.html

3.Install the Manager APK and the Android Host APK from "Download APK". If you have other supported gadgets , install other APKs.

4.Go back to the top page.

5.Try the prototype GotAPI behavior from "Launch UI-App".

##About access from the external devices

By adding the parameter of the IP address to the demoWebSite URL, can control the external device by DeviceConnect WebAPI at a local network. However, the following settings are required for terminal on the operation side.

*Please do not use at network that can not be trusted because there is a security risk.

  1. By the procedure as above , set up the DeviceConnect WebAPI to the terminal of the operation target.

  2. Start the DeviceConnectManager from the launcher of Android,and turn off the slide toggle for DeviceConnectManager service.

  3. Enable "Allow External IP" checkbox, and turn on the slide toggle for DeviceConnectManager service.

  4. Add the IP address of the operation target in URL of demoWebSite on the operation side terminal.

 e.g. file:///C:/demoWebSite/demo/index.html?ip=192.168.13.3#demo

#Supported devices

Manufacturer Product name Device type Plug-in Android iOS Remarks
SONY SmartWatchMN2 Watch MN2/SW2 × Need the app launch on SmartWatch
SONY SmartWatchSW2 Watch MN2/SW2 × Need the app launch on SmartWatch
Orbotix Sphero 2.0 Toy Sphero
Game Technologies DICE+ Toy DICE+ Need the firmware for development
Philips hue Light hue
Philips Bloom Lamp スマートライト hue
Philips LightStrips Light hue
IRKit IRKit Infrared remote control IRKit
Epson Moverio BT-200 Glasses AndroidHost × The future works; Support the extension
Vuzix M100 Smart Glass Glasses AndroidHost × The future works; Support the extension
WESTUNITIS Inforod Glasses AndroidHost × The future works; Support the extension
SONY DSC-QX100 Camera SonyCamera
SONY DSC-QX10 Camera SonyCamera
SONY ActionCam Camera SonyCamera
Pebble Pebble Watch Pebble
- Android Ver4.2 or later Android AndroidHost × Ver4.2 or later
LG G Watch Android Wear Wear × Provisional support
Samsung Gear Live Android Wear Wear × Provisional support
Google ChromeCast ChromeCast ChromeCast Need to register the Receiver Apps and device on Google Cast SDK Developer Console.
Google NexusPlayer AndroidTV ChromeCast Need to register the Receiver Apps and device on Google Cast SDK Developer Console.
Polar H7 Heart rate meter BLE HeartRate ×
Mio Global Mio Alpha Heart rate meter BLE HeartRate ×
Mio Global Mio Fuse Heart rate meter BLE HeartRate ×
EPSON Pulsense PS-500 Heart rate meter BLE HeartRate ×
EPSON Pulsense PS-100 Heart rate meter BLE HeartRate ×
NTT DOCOMO Hitoe Heart rate meter Hitoe Now under development
A&D UT-201BLE Thermometer x
OMRON HVC-C Human Vision Components HVC ×
OMRON HVC-C2W Human Vision Components HVC2W ×
OMRON HVC-P Human Vision Components HVCP ×
FUJITSU F-PLUG SmartMeter F-PLUG ×
RICOH THETA m15 Omnidirectional Camera THETA Need to register developer and download SDK at RICHO THETA Developers.
RICOH THETA S Omnidirectional Camera THETA Need to register developer and download SDK at RICHO THETA Developers.
LIFX White 800 Light AllJoyn No color change.
LIFX Color 1000 Light AllJoyn
EchonetLite Standard-compliant equipment in general Home control EchoneLite × Standard-compliant equipment in general
Linking Tomoru BLE Linking Now under development
UVC(USB Video Class) USBCamera UVC ×
Mobile camera TV conference,Remote work support WebRTC ×
Infinitegra OWLIFT Thermal camera ×
FaBo FaBo IoT HW Prototype kit FaBo ×
  • This project is not a formal service provision as NTT docomo. It is an experimental source code disclosure. The purpose is consideration of specifications and security.
  • Each manufacturer does not guarantee the operation.
  • Available functions vary with each device.
  • The source code of the plug-in will be disclosed about some equipment by convenience of development for the library to be used.
  • We will advance sequentially that updating documents and expanding enabled devices.
  • Specifications may be changed by improvement of security or other reasons.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 98.9%
  • Other 1.1%