Download  Print this page

Epson Moverio Pro BT-2000 Developer's Manual

Hide thumbs

Advertisement

BT-2000/2200
Developer's Guide
SEIKO EPSON CORPORATION
Revision history
MOVERIO Pro Developer's Guide (Rev.1.4)

Advertisement

Table of Contents
loading

  Also See for Epson Moverio Pro BT-2000

  Related Manuals for Epson Moverio Pro BT-2000

  Summary of Contents for Epson Moverio Pro BT-2000

  • Page 1 BT-2000/2200 Developer's Guide SEIKO EPSON CORPORATION Revision history MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 2 Revision Item Mainly revised content Rev.1.3 Adding caution when changing key assign Adding EDof mode and auto exposure function Adding GPS Assist Rev.1.4 Adding description to support BT-2200 Cautions  BT-2000 and BT-2200 use common system software. This document will be described hereafter by only BT-2000, but please be aware that it is also common to BT-2200.
  • Page 3 Note the following points when using this guide. The content of this guide may change without prior notice. 1. Reprinting part or all of this guide without prior permission from Seiko Epson, or reprinting for any other purposes is strictly prohibited.
  • Page 4: Table Of Contents

    2.4. ADB driver settings _______________________________________________________________ 12 2.5. Connecting the BT-2000 to a computer _______________________________________________ 18 2.6. Including the SDK provided by EPSON ______________________________________________ 20 3. Display control ___________________________________________ 24 3.1. Display control summary___________________________________________________________ 25 3.2. Full screen display function ________________________________________________________ 26 3.3.
  • Page 5 5.6. Sample code ______________________________________________________________________ 55 5.7. Others ___________________________________________________________________________ 57 6. Camera control ___________________________________________ 64 6.1. Pre-cautions for developing camera Apps_____________________________________________ 65 6.2. Function summary ________________________________________________________________ 66 6.3. Available parameters ______________________________________________________________ 67 6.4. Image organization and format _____________________________________________________ 68 6.5. Depth data characteristics _________________________________________________________ 69 6.6.
  • Page 6 10.Self-diagnostic function ___________________________________ 181 10.1. Self-diagnostic function _________________________________________________________ 182 11. GPS Assist ______________________________________________ 185 11.1. GPS Assist function summary ___________________________________________________ 186 11.2. Precaution and limitation of using /developing GPS Assist function __________________ 187 11.3. How to use ____________________________________________________________________ 188 11.4. Setting method ________________________________________________________________ 189 11.5.
  • Page 7: Introduction

    1. Introduction MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 8: Product Summary And Functions

    1.1. Product Summary and Functions The BT-2000/2200 is a smart headset for business use. The same optical see-through technology as the consumer orientated MOVERIO BT-200 has been adopted. This allows information to be displayed across a wide viewing area while keeping eye movement to a minimum, thereby reducing fatigue and making it suitable for use at work.
  • Page 9: Main System Specifications

    1.2. Main System Specifications Item Specifications Model number MOVERIO Pro BT-2000/2200 Main processor OMAP4460 (dual core ARM Cortex A9) System clock Max 1.2 GHz (Auto adjusts according to the system load and temperature) System software Android 4.0.4 Internal storage (emmc)
  • Page 10: Basic Information For App Development

    1.3. Basic Information for App Development Item Description CPU/ABI ARMv7 armeabi Android API level Device screen density mdpi Screen type Tablet UI Screen orientation Fixed at Landscape (without sensor rotation) USB vendor ID 0x04B8 ■ HOME, MENU, and BACK keys are supported by hardware keys ■...
  • Page 11: Other Main Functions

    9.Power control ✔ 10.Self-Diagnostic ✔ 11.GPS Assist ✔ The following chapters explain how to use these from an app. For EPSON original API that needs special caution, please refer Chapter 2.1. Pre-Caution for Developing Apps. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 12: Developing Apps

    2. Developing Apps MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 13: Pre-Caution For Developing Apps

    BT-2000 is using Android platform, but considering the product’s use purpose, it is applying own functions. Therefore it is necessary to control by EPSON own API. There are some cases that Android emulator or Android applications that operated with Android Smartphones may not operate.
  • Page 14: Summary Of Developing Apps

    This chapter explains the following procedures necessary to develop apps for the BT-2000. ■ Introduction to the Android SDK ■ ADB driver settings ■ Connecting the BT-2000 to a computer ■ Including the SDK provided by EPSON MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 15: Introduction To The Android Sdk

    2.3. Introduction to the Android SDK The introduction to the Android SDK assumes the following steps will be performed in a Windows7 environment. 2.3.1. Acquiring Android Studio Download Android Studio from the following Website. https://developer.android.com/sdk/index.html 2.3.2. Acquiring and installing JDK Download the JDK (7 or later) from the following Website, and then install.
  • Page 16 2.3.4. Installing Platform-tools, SDK Platform, and USB Driver Execute "C:\Users\User name\AppData\Local\Android\sdk\SDK Manager.exe". * When you start SDK Manager, the dialog "No packages found" may be displayed. This occurs when the proxy is not set correctly, and information cannot be updated. Close all dialogs except for "Android SDK Manager", and then set the proxy in [Tools] - [Options].
  • Page 17 Select the following necessary files in the SDK Manager, and then install. ■ [Tools] - [Android SDK Platform-tools] ■ [Android 4.0.3] - [SDK Platform] ■ [Extras] - [Google USB Driver」 Select the above, click [Install], and then select ‘Accept’ all. This completes the introduction to the Android SDK.
  • Page 18: Adb Driver Settings

    2.4. ADB driver settings Here we will explain how to connect the BT-2000 to the app development computer, and set the ADB driver. When using Windows8 OS or later, it is required to operate by test mode to install ADB driver. When using Windows7 OS or before, proceed to “2.4.2 When using Windows7 OS or before”.
  • Page 19 5) It will reboot after selecting Windows [Startup Settings]. Select→ 6) [Startup Settings] screen will show after reboot, so select [Disable Driver Signature Enforcement]. For procedure from here, please proceed to next chapter“2.4.2When using When using Windows 7 OS or before”. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 20 2.4.1.2. When failing test mode command Test mode command failure is due to lock by Secure Boot. Please disable Secure Boot by below method. 1)Select 「Settings」→「Change PC Settings」 from charm. Select→ Select→ 2)Select 「Update and recovery」→「Recovery」→「Restart now」. Select→ 3)Select 「Trouble shoot」→「Advanced options」→「UEFI firmware Settings」. Select→...
  • Page 21 5) Save the change and reboot 6) After PC rebooted, operate command prompt by Administrator privileges and run test mode command. To make Secure Boot on again, please set by below procedure. Proceed procedure 1) ~ 3) when disabled the setting. Find Secure Boot control and change to Enabled.
  • Page 22 6 lines to 2 points in the [Google.NTx86] and the [Google.NTamd64]. ;EPSON MOVERIO BT-2 series MTP %SingleAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C06 %CompositeAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C06&MI_01 ; EPSON MOVERIO BT-2 series PTP %SingleAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C07 %CompositeAdbInterface% = USB_Install, USB¥VID_04B8&PID_0C07&MI_01 MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 23 Omit Omit 2.4.2.2. Vendor ID setting Set ADB as the vendor ID. Start the command prompt, run " cd C:\Users\User name\AppData\Local\Android\sdk\tools " and change the work folder. Execute the android.bat, and handle the "update adb" argument as shown below. The file is created in [C:\Users\User name\.android\adb_usb.ini] Open this file (adb_usb.ini) in notepad, and add the vendor ID (0x04B8) as shown below.
  • Page 24: Connecting The Bt-2000 To A Computer

    2.5. Connecting the BT-2000 to a computer This section explains how to connect the BT-2000 to a computer after the ADB driver setting has been completed. 2.5.1.1. BT-2000 settings Start the BT-2000, and then select "Settings" - "Developer options" - "USB debugging". 2.5.1.2.
  • Page 25 Select [Browse my computer for driver software]. Select the driver from the following path. “C:\Users\User name\AppData\Local\Android\sdk\extras\google\usb_driver” When [Android Composite ADB Interface] is displayed in [Android Device] as shown below, ADB connection is available. 2.5.1.3. Checking the connection You can check if the computer and the BT-2000 are connected by using the ADB check command.
  • Page 26: Including The Sdk Provided By Epson

    2.6. Including the SDK provided by EPSON 2.6.1. Cautions for using SDK provided by EPSON Please make sure to confirm the version of SDK provided by EPSON and the version of system software inside BT-2000. If the version of SDK provided by EPSON used for Apps development and the version of system software is not matching, due to the difference of API included, developed Apps may not operate.
  • Page 27 2.6.2. How to use SDK provided by EPSON The following procedures assume app development in Android Studio. 1) Display Project View of Android Studio, and then create “libs” folder from [File]-[New]-[Directory]. 2) C:\Users\<user name>\AndroidStudioProjects\<application name>\app\libs will be created, and put H725Ctrl.jar to this folder.
  • Page 28 5) Once, run Clean Project from Build items of AndroidStudio. SDK settings are completed by above. On edit display, EPSON original API like getSupportedEpsonCameraModes() are still not solved, but please ignore and run app, and install application to the equipment. Unsolved method will operate normally.
  • Page 29 ■Limited items Due to AndroidStudio specification, after running like rebuild and update gradle contents, app.iml will be updated too and EPSON original API will return to unsolved situation. Please proceed above 1), 2) again. Run after build will not be affected.
  • Page 30: Display Control

    3. Display control MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 31: Display Control Summary

    3.1. Display control summary This chapter explains the display control function for the BT-2000. The BT-2000 is a smart headset with an optical see-through function. You can overlay information on the display using an optical technique that provides clear images, without disturbing the view of the user's surroundings.
  • Page 32: Full Screen Display Function

    3.2. Full screen display function The MOVERIO Pro BT-2000 is based on Android 4.0 Tablet UI. This specification does not normally allow full display in applications in Android 4.0 Tablet UI; however, you can follow the steps below to enable full display by specifying a unique flag in the app.
  • Page 33: Switch Between 2D/3D Display Function

    Right eye image Left eye image You can use the following interface to separate images for the left and right eyes in the side by side system, and output each display. ■Inport file jp.epson.moverio.H725.DisplayControl ■Constructor DisplayControl(Context context) MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 34 ■ Interface int setMode(int DisplayMode, Boolean toast) ■ Parameter DisplayMode : 2D/3D mode situation 2D Mode : DisplayControl.DISPLAY_MODE_2D 3D Mode : DisplayControl. DISPLAY_MODE_3D toast : Switch display/un-display of OSD of 2D/3D Display : true Un-display : false MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 35: Backlight Control

    When changing the backlight display built-into the headset, you can change the transparency of the displayed image. When the brightness is low, the image is more transparent, and when the brightness is high, the image is more opaque. ■Import file jp.epson.moverio.H725.DisplayControl ■Constructor DisplayControl(Context context) ■ Interface Display brightness settings...
  • Page 36: Mute Function

    3.5. Mute function 3.5.1. Display mute The mute function allows you to temporarily stop displaying images. Use the following interface to activate and then deactivate mute. ■ Import file jp.epson.moverio.H725.DisplayControl ■Constructor DisplayControl(Context context) ■ Interface int setMute(boolean mute) ■ Parameter mute: Mute ON (TRUE)/OFF (FALSE) ■...
  • Page 37 3.5.2. Audio mute The audio mute function allows you to temporarily stop outputting audio. Use the following interface to activate and then deactivate mute. ■ Import file jp.epson.moverio.H725. AudioControl ■ Interface int setMute(boolean mute) ■ Parameter mute: Mute ON (TRUE)/OFF (FALSE) ■...
  • Page 38: See-Through Function

    3.6. See-through function MOVERIO Pro is a device that uses projection technology. Projection is displayed by reflecting light through an Active Matrix LCD panel into a light-guided panel. It is possible to create a half-mirror version (whereby not all the pixels are needed) allowing images to be arranged over a real-life scene giving a sense of transparency, and creating a more vivid augmented reality experience.
  • Page 39: Ui Control

    4. UI control MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 40: Ui Control Summary

    4.1. UI control summary The user interface for the BT-2000 is composed of 11 hardware buttons; power, key lock, A, B, X, Y, D-pad (up, down, left, right), and the select/OK key. This section explains the functions called when these buttons are pressed, as well as the key assignment change function that is unique to the BT-2000.
  • Page 41 Table 4-2: MultiFunctionOSD display function MultiFunction operations Number of times Function Adjustment method button pressed Press once adjust volume D-pad up/right: Volume Up D-pad down/left: Volume Down Press twice Adjust brightness D-pad up/right: Increase screen brightness D-pad down/left: Decrease screen brightness Press three times Switch between 2D/3D...
  • Page 42 4.1.3. BT-2000 change key assignment function The BT-2000 allows you to change the functions assigned to the hardware buttons mentioned above. The standard hardware button assignments are applied in Default mode, the changed hardware button assignments are applied in User mode. Default mode User mode Button name...
  • Page 43 ■Using the change function for key assignments By changing the key assignments, the key codes called when you press the A, B, X, or Y buttons are not the standard Back, Home, or Menu buttons in Android, instead, the key codes are changed to F1 to F4.
  • Page 44: Application Interface List

    4.2. Application interface list Tables 4-3 provide a list of application interfaces for changing key assignments. You also need to import the following models to use each API. android.btutil.KeyAssign 3 android.btutil.KeyAssign for application interface list Table Function name Function summary Notes getKeyAssignMode Acquires the mode for the current key...
  • Page 45: Application Interface Details

    4.3. Application interface details 4.3.1. getKeyAssignMode Function  Acquire the mode for the current key assignment. Format  static int getKeyAssignMode (void); Parameter  None. Return value  Model Explanation - KEYASSIGN_MODE_DEFAULT: Default mode - KEYASSIGN_MODE_USER: User mode Usage procedure ...
  • Page 46 4.3.2. setKeyAssignMode Function  Set key assignment mode and apply to the system. Format  boolean setKeyAssignMode(int mode); Parameter  Model name Explanation  int mode Key assignment mode to be set. You can specify the value using a macro for the following android.btutil.KeyAssign classes.
  • Page 47: Voice Commands

    5. Voice commands MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 48: Pre-Cautions For Developing Voice Commands Apps

    5.1. Pre-cautions for developing Voice commands Apps Please make sure to confirm the version of SDK provided by EPSON and the version of system software inside BT-2000. If the version of SDK provided by EPSON used for Apps development and the version of system software is not matching, due to the difference of API included, developed Apps may not operate.
  • Page 49: Voice Commands Summary

    5.2. Voice commands summary The BT-2000 voice command will select the voice information file(lms file), and recognizes the voice included in this information, and returns the corresponding ID. Voice is inputted using a microphone, and the device recognizes the voice that has been registered*. By mounting a process in the application for each ID acquired by callback, voice input can be used as a trigger.
  • Page 50: Application Interface Function Summary

    5.3. Application interface function summary You can use the following functions by using audio command API. (1) Connect to a service class that provides audio command functions. (2) Disconnect from a service class that provides audio command functions. (3) Acquire an interface to control audio commands. (4)...
  • Page 51: Application Interface List

    Acquire the setting for the amplitude of the current input voice. start Enable voice input. stop Disable voice input. 2 android.media.epson. VoiceCommandClient for application interface list Table Function name Function summary registerCallback Register a callback to acquire the recognition results for a voice command.
  • Page 52 Table5-3 android.media.epson. VoiceCommandClientCallbacks application interface list Function name Function summary onServiceConnected Called after connection to service class implementing callback of voice command function has completed. onServiceDisconnected Called when service controlling voice command is stopped for some reasons. onVoiceCommand Callback for receiving voice command recognition result.
  • Page 53: Application Interface Details

    5.5. Application interface details 5.5.1. setSnr Function  Set parameters used for the voice recognition start conditions. Set the recognition start conditions according to the amount (S/N ratio) of voice (noise) being input in the usage environment. Format  boolean setSnr (float snr) throws RemoteException; Parameter ...
  • Page 54 5.5.3. setAmp Function  Set parameters used for the voice recognition start conditions. Set the amplitude value as one of the recognition start conditions. Format  boolean set Amp (int amp) throws RemoteException; Parameter  Value of the amplitude to be set. Minimum: 0, Maximum: 32767, default: 1024 If the value is too large, the app should not be influenced by surrounding noise, however the user will need to talk loudly to trigger a response.
  • Page 55 5.5.4. getAmp Function  Acquire the set amplitude value. Format  int getAmp() throws RemoteException; Parameter  None. Return value  Model Explanation Receive the value for the amplitude as the input voice recognition start condition. 5.5.5. start Function  Enable voice input status.
  • Page 56 5.5.6. stop Function  Disable voice input. Format  boolean stop(void) throws RemoteException; Parameter  None. Return value  Model Explanation boolean Success: true, Failure: false 5.5.7. registerCallback Function  Register a callback to acquire the recognition results for a voice command. Format ...
  • Page 57 5.5.8. unRegisterCallback Function  Cancel a callback to acquire the recognition results for a voice command. Format  void unRegisterCallback() Parameter  None. Return value  None. 5.5.9. getVoiceCommandSystemInterface Function  Acquire a class as the interface to control voice commands. Format ...
  • Page 58 5.5.10. bindToRemoteRunningService Function  Connect to a service class that provides voice command functions. Format  void bindToRemoteRunningService(Activity activity); Parameter  An Activity object connected to the voice command service. Return value  None. 5.5.11. unBindFromRemoteRunningService Function  Disconnect from a voice command service. Format ...
  • Page 59 5.5.12. onVoiceCommand Function  When detecting word that voice command system detected, callback returning ID of the word and character string. Format  void onVoiceCommand(int id, String word) Parameter  Model Explanation int id ID number of the detected word String word Character string of the detected word Return value...
  • Page 60 5.5.13. onSpeakable Function  Callback noticed when voice command system voice receiving situation has changed. Format  void onSpeakable(boolean on) Parameter  Model Explanation boolean on true: Voice input acceptable situation false: Voice input not acceptable situation Return value  None MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 61: Sample Code

    5.6. Sample code package com.epson.moverio.bt2pro.sample.vcmd; import android.media.epson.IVoiceCommandInterface; import android.media.epson.VoiceCommandClient; import android.media.epson.VoiceCommandClientCallbacks; import android.os.Bundle; import android.os.RemoteException; import android.app.Activity; import android.content.Context; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends Activity implements VoiceCommandClientCallbacks { private Context mContext = null; private Button mStartButton = null;...
  • Page 62 super.onPause(); mVoiceCommandClient.unRegisterCallback(); @Override protected void onDestroy() { super.onDestroy(); mVoiceCommandClient.unBindFromRemoteRunningService(this); @Override public void onServiceConnected() { mVoiceCommandSystem = mVoiceCommandClient.getVoiceCommandSystemInterface(); @Override public void onServiceDisconnected() { @Override public void onVoiceCommand(int id, String word) { Toast.makeText(MainActivity.this, "MainActivity ID:"+id+" "+word, Toast.LENGTH_SHORT).show(); @Override public void onSpeakable(boolean speakable){ Toast.makeText(MainActivity.this, "RA: "...
  • Page 63: Others

    5.7. Others 5.7.1. Timing for reflecting the setting for the voice recognition start conditions When audio input recognition switches from disabled to enabled, the voice recognition start conditions are reflected in the system. Therefore, if you change the recognition start conditions when audio input is enabled, once call IVoiceCommandInterface.stop(), disable audio input and call IVoiceCommandInterface.setSnr() to set the voice recognition starting condition.
  • Page 64 5.7.3. Running voice command and video recording together Due to Android 4.0 specification, voice command and video recording cannot run together. For video recording, please finish voice command. 5.7.4. Voice information files (lms file) list and vocabulary list - /system/vendor/bin/epe_au01_E1.lms default lms file(For English) - /system/vendor/bin/epe_au01_E2.lms ・epe_au01_E1.lms IDnumber Voice input...
  • Page 65 By showing this period as GUI, it can improve voice command convenience. In details, , implement VoiceCommandClientCallbacks interface of Android.media.epson.VoiceCommandClientCallbacksand define onSpeakable(), then can receive speech acceptable timing. ■Application to set S/N ratio and amplitude(AMP value) accorded to the environment If onSpeakable is called when there is no speech situation, three is a possibility of reacting to surround noise.
  • Page 66 5.7.7. Sample App This chapter explains about voice command sample App that is pre-installed inBT-2000. 1. App information App name:VoiceCommandSample.apk Icon image 2. Summary BT-2000 has function to recognize voice inputted from voice input equipment like headset microphone included, judge applicable word exist or not inside registered voice information file(lms), and notice ID and character string to App according to the judgment.
  • Page 67 3. Function ⅰ.Voice information(lms)file change BT-2000 has voice information file written in 5.7.4 Voice information file(lms file) list and vocabulary list inside the system.By specifying these, it is available to detect registered word of selected file from inputted voice. ⅱ.Voice detection, receiving detected word and ID by App When voice is inputted by microphone and applicable voice is detected, ID number related to the detected word will be noticed to the App.
  • Page 68 4. Sample App operation method ① ⑦ ③ ② ⑧ ④ ⑤ ⑥ ① S/N ratio setting Display S/N ratio setting value that is currently applied. ② S/N ratio changing UI Can set value by selecting up arrow or down arrow or the value Left 3 figures are integer figure, right 2 figures are decimal figure.
  • Page 69 ・Remarks At timing of Start button pressed, data necessary for system operation like S/N ratio and lms file will be applied to the system. While voice command is in operation(When voice detection is available), setting value like S/N ratio that changed by the App does not apply when pressing the Start button.
  • Page 70: Camera Control

    6. Camera control MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 71: Pre-Cautions For Developing Camera Apps

    6.1. Pre-cautions for developing camera Apps As BT-2000 is adopting own camera function, take below cautions for developing App using camera. To use BT-2000 camera function of 5M、Depth、Side-by-Side and EDof, it is required to switch camera settings. Therefore, different from normal Android equipment, it is adopting concept of camera mode. Available setting of camera resolution and frame rate is different by each camera mode.
  • Page 72: Function Summary

    6.2. Function summary This chapter explains the available camera functions for the BT-2000. The headset section of the BT-2000 is equipped with a stereo camera which offers a wide variety of uses including the following three types of camera image. 1) Standard camera images 2) Stereo images using the compound camera 3) Depth (distance) images using the compound camera...
  • Page 73: Available Parameters

    6.3. Available parameters A list of available parameters is provided in table 6-2 and 6-3. Table 6 2 List of available parameters Parameter name Setting region Default value Camera Mode single-through-vga single-through-720p Single-through-720p single-through-1080p / single-through-5m / depth-only / side-by-side / EDof Preview resolution 1080p / 720p / VGA 720p...
  • Page 74: Image Organization And Format

    6.4. Image organization and format You can acquire the following three types of data using API in the BT-2000. ・ Standard images (NV21) ・ Side by Side images (NV21) ・ Depth (distance) data (8bit Gray Scale) Figure 6 1 Example of standard images Figure 6 2 Example of side by side images Depth data is explained in the next section.
  • Page 75: Depth Data Characteristics

    6.5. Depth data characteristics Depth data is managed using 8 bit gray scale data, whereby the data values (brightness) indicate the distance. The higher the depth value brings the depth data distance closer, and reducing the value makes it further away. When converting the brightness as gray scale data, the highest value of 255 brings the distance closer, and the lowest value of 0 makes it further away.
  • Page 76 For the relationship between the distance and depth data, see the following table. Note that changes and calculation errors in the shooting environment for the depth data may also occur. Equation 6-1 Distance: Distance = 10 × 255 �������������� ⁄ [����] ※As Depth data is received by Java byte type, it is shown by -128~127.
  • Page 77: Application Interface Function Summary

    6.6. Application interface function summary The following explains how to use API to achieve the following three functions. 1) Set the camera mode, frame rate, preview resolution, and camera resolution for the BT-2000, and display a preview. 2) Process the image data in the app. 3) Acquire depth information with the application.
  • Page 78: Application Interface List

    Table 6 4 Camera.Parameters application interface list Function name Function summary Notes getSupportedEpsonCameraMod Acquire a list of modes supported by the Epson original API camera. setEpsonCameraMode Set the camera mode. Epson original API getEpsonCameraMode Acquire the current camera mode setting.
  • Page 79 By using the API provided by the BT-2000, you can display a preview and handle image data. In either situation, you need to set the camera parameters. You can change the camera mode, frame rate, preview resolution, and camera resolution. However, when setting the camera parameters, you need to stop the previews temporarily by using stopPreview.
  • Page 80: Application Interface Details

    6.8. Application interface details 6.8.1. getSupportedEpsonCameraModes Function  Acquire a list of camera modes supported by the BT-2000 camera. Format  List<String> getSupportedEpsonCameraMode (void); Parameter  None. Return value  Model Explanation List<String> Acquire the current camera mode set in the BT-2000. Camera mode list Camera mode Explanation...
  • Page 81 Procedure (camera is a Camera class object)  /*Start camera*/ camera = Camera.open(); /*Acquire current parameters*/ Camera.Parameters params = camera.getParameters(); /*Acquire provided camera mode*/ List<String> Supported = params.getSupportedEpsonCameraMode(); MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 82 6.8.2. setEpsonCameraMode Function  Set the BT-2000 camera mode. Format  void setEpsonCameraMode ( String mode Parameter  Model name in/out Explanation String mode Set camera mode. Set using macros for the following seven Camera.Parameters classes. - EPSON_CAMERA_MODE_SIDE_BY_SIDE - EPSON_CAMERA_MODE_SINGLE_THROUGH_VGA - EPSON_CAMERA_MODE_SINGLE_THROUGH_720P - EPSON_CAMERA_MODE_SINGLE_THROUGH_1080P - EPSON_CAMERA_MODE_SINGLE_THROUGH_5M...
  • Page 83 Use procedure 1 (when side by side is set) /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters(); /*Set camera mode to side by side*/ params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MO DE_SIDE_BY_SIDE); /*Reflect camera setting in camera device*/ camera.setParameters(params); /*Start preview*/ camera.startPreview();...
  • Page 84 6.8.3. getEpsonCameraMode Function  Acquire the current camera mode. Format  String getEpsonCameraMode (void); Parameter  None. Return value  Model Explanation String You can acquire the current camera mode as a return value. ”side-by-side” ”single-through-vga” “single-through-720p” “single-through-1080p” “single-through-5m” ”depth-only” “edof”...
  • Page 85 6.8.4. setPreviewFpsRange Function  Set the minimum and maximum values for the frame rate. You need to set the maximum and minimum values to same values that can be acquired in getSupportedPreviewFpsRange(). Table 6-3 List of main parameter combinations shows the framerate that can be set for each camera mode.
  • Page 86 Use procedure 2 (when preview has already started) /*Stop preview*/ camera.stopPreview(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters(); /*From here on, use procedure 1*/ Remarks  After setting the frame rate in setPreviewFpsRange, be sure to perform ...
  • Page 87 6.8.5. setPreviewSize Function  Set the preview resolution. Table 6-3 List of main parameter combinations shows the preview resolutions that can be set for each camera mode. Format  void setPreviewSize ( int width, int height Parameter  Model name in/out Explanation int width Width of preview image...
  • Page 88 Use procedure 1 (Set the camera mode to single-through-5m and the preview resolution to VGA) In this example, the width and height of the image are reduced to approximately 1/4 and displayed in a preview. /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters();...
  • Page 89 6.8.6. getSupportedSharpnessMin/getSupportedSharpnessMax Function  Acquire the minimum/maximum available sharpness value. Format  int getSupportedSharpnessMin (); int getSupportedSharpnessMax (); Parameter  None. Return value  Model Explanation Return the minimum/maximum available sharpness value. For the BT-2000, these are -3 and +3. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 90 6.8.7. getSharpness Function  Acquire the current sharpness value. Format  int getSharpness (); Parameter  None. Return value  Model Explanation Return the current sharpness value. For the BT-2000, this is -3 to +3. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 91 6.8.8. setSharpness Function  Set the sharpness value. Format  void setSharpness (int); Parameter  None. Return value  Model Explanation Set the sharpness value. For the BT-2000, you can set -3 to +3. Usage procedure /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters();...
  • Page 92 6.8.9. getSupportedContrastMin/getSupportedContrastMax Function  Acquire the minimum/maximum available contrast value. Format  int getSupportedContrastMin (); int getSupportedContrastMax (); Parameter  None. Return value  Model Explanation Return the minimum/maximum available contrast value. For the BT-2000, these are -3 and +3. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 93 6.8.10. getContrast Function  Acquire the current contrast value. Format  int getContrast (); Parameter  None. Return value  Model Explanation Return the current contrast value. For the BT-2000, this is -3 to +3. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 94 6.8.11. setContrast Function  Set the contrast value. Format  void setContrast (int); Parameter  None. Return value  Model Explanation Set the contrast value. For the BT-2000, you can set -3 to +3. Usage procedure  /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters();...
  • Page 95 6.8.12. onPreviewFrame Function  Use the standard Android API. Describe processing content when acquiring image data. Format  void onPreviewFrame ( byte[] data Camera camera Parameter  Model name in/out Explanation byte[] data Image data acquired from a camera. The default is NV21 format.
  • Page 96 Remarks  PreviewCallback cannot guarantee the actual time of image acquisition. If there  are a high volume of calculations being performed in onPreviewFrame, and these are not completed by the time of the next image data acquisition, the next image data will be corrupted.
  • Page 97 6.8.13. setPreviewCallback Function  When the callback method described in 6.8.12 is registered, it is called each time image data is acquired. The registered callback method is executed repeatedly while previewing. Format  void setPreviewCallback ( Camera.PreviewCallback cb Parameter  Model name in/out Explanation Camera.PreviewCallback cb...
  • Page 98 6.8.14. setOneShotPreviewCallback Function  When the callback method described in 6.8.12 is registered, it is called when image data is acquired. This registered callback method is only executed once. Format  void setOneShotPreviewCallback ( Camera.PreviewCallback cb Parameter  Model name in/out Explanation Camera.PreviewCallback Callback object that receives a preview image.
  • Page 99 6.8.15. setPreviewCallbackWithBuffer Function  When the callback method described in 6.8.12 is registered, it is called when image data is acquired. The registered callback method is executed repeatedly while previewing. You can secure buffer processing by specifying a dedicated buffer for image data processing.
  • Page 100 Usage procedure  // App developer applies processing when acquiring image data private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte data[], Camera camera) { Log.d(TAG, "Save preview image"); synchronized (lockObject) { savePreviewData(data); // Register the buffer to be used camera.addCallbackBuffer(mPreviewData);...
  • Page 101 6.8.16. addCallbackBuffer Function  The API for registering the buffer used in setPreviewCallbackWithBuffer. Format  void setPreviewCallbackWithBuffer ( byte[] callbackBuffer Parameter  Model name in/out Explanation byte[] Buffer to be registered callbackBuffer Return value  None. Usage procedure  // App developer applies processing when acquiring image data private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override...
  • Page 102 Remarks  Only necessary when using setPreviewCallbackWithBuffer. Buffers  automatically secured for setPreviewCallback and setOneShotPreviewCallback. If the buffer size you register is smaller than the image data, null is returned for  data. If a registered buffer region is not secured in the application, an error log is output ...
  • Page 103 6.8.17. startDepthStreaming Function  Start depth information acquisition. Format  void startDepthStreaming() Parameter  None. Return value  None. Exception  Exception Explanation occurred RuntimeException An exception occurs under the following two conditions. (1) A preview has not started. (2) The camera is in a mode that does not output depth information (side by side or single through).
  • Page 104 Usage procedure  /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters(); /*Set the camera mode to depth-only*/ params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MODE_DEP TH_ONLY); /*Reflect camera setting in camera device*/ camera.setParameters(params); /*Start preview*/ camera.startPreview(); /*Start depth information acquisition*/ camera.startDepthStreaming();...
  • Page 105 6.8.18. stopDepthStreaming Function  Stop depth information acquisition. Format  void stopDepthStreaming() Parameter  None. Return value  None. Usage procedure  /*Start camera*/ camera = Camera.open(); /*Acquire current parameter (or default value)*/ Camera.Parameters params = camera.getParameters(); /*Set the camera mode to depth-only*/ params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MODE_DEP TH_ONLY);...
  • Page 106 6.8.19. onDepthMap Function  The process executed is written during depth information acquisition. Format  void onDepthMap( byte[] data, Camera camera Parameter  Model name in/out Explanation byte[] data Depth information. VGA size, RAW 8 format, 300 K byte data. Camera Camera service object camera...
  • Page 107 Remarks:  To use the depth information application, you need to describe the process in  onDepthMap. To execute onDepthMap, you need to meet all of the following conditions.  (1) The camera mode is set by either EdoF mode or depth-only mode. (2) startPreview is executed.
  • Page 108 6.8.20. setDepthCallback Function  Register the callback method executed during depth information acquisition. Format  void setDepthCallback( Camera.DepthCallback cb Parameter  Model name in/out Explanation Camera.DepthCallback Callback object that processes depth information. Return value  None. Usage procedure  // App developer applies processing when acquiring depth information private Camera.DepthCallback mDepthCB = new Camera.DepthCallback() { @Override public void onDepthMap(byte data[], Camera camera) {...
  • Page 109 Remarks  To cancel depth information acquisition, set null as the callback method.  This method can be executed regardless of the preview status or camera mode,  you can execute by selecting your own timing. Registration is only canceled if null is registered as the callback method, or the ...
  • Page 110: Depth Information Acquisition Flow Details

    6.9. Depth Information Acquisition Flow Details Figure 6-6 shows the mechanical status for the camera application (camera app) when acquiring depth information. You need to perform the following five steps to acquire depth information. (1) Set the camera mode to depth-only. (2) The preview starts after step (1).
  • Page 111 previewing not ready exception set parameters Receiving depth inactive ready to preview start preview Exit preview start to receive stop to receive Exit preview Receiving depth active Receiving and treating depth data Figure 6 6 Mechanical status figure for depth information acquisition For depth-only mode, preview display is unavailable.
  • Page 112: Sample Code

    6.10. Sample Code This sample code is for preview data acquisition while displaying a preview at 1080p in single-through-5m mode. package jp.epson.moverio.bt2pro.sample.cameratest; import android.app.Activity; import android.hardware.Camera; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView;...
  • Page 113 /* Image data acquisition callback */ private Camera.PreviewCallback mPreviewCB = new Camera.PreviewCallback() { @Override public void onPreviewFrame(byte data[], Camera camera) { synchronized (lockObject) { mPreviewData = data; camera.addCallbackBuffer(mPreviewBuf); private SurfaceHolder.Callback previewCallback = new SurfaceHolder.Callback() { @Override public void surfaceDestroyed(SurfaceHolder holder) { Log.d(TAG, "surfaceDestroyed");...
  • Page 114 params.setEpsonCameraMode(Camera.Parameters.EPSON_CAMERA_MODE_SINGLE_THROUGH_5M); /* Set preview resolution to 1080p */ params.setPreviewSize(1920, 1080); /* Set frame rate to 7.5fps */ params.setPreviewFpsRange(7500, 7500); /* Reflect parameter change to camera device */ camera.setParameters(params); camera.addCallbackBuffer(mPreviewData); camera.setPreviewCallbackWithBuffer(mPreviewCB); try { camera.startPreview(); } catch (RuntimeException e) { e.printStackTrace(); @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu;...
  • Page 115: Remarks

    6.11. Remarks 1) After closing the camera app, the system executes reallocation processing in the background for the camera. If the camera is used again soon after, an error may occur. Make sure that the camera is not reconnected within three seconds of camera reallocation. 2) After setting the camera mode, frame rate, preview resolution, sharpness value, and contrast value, be sure to perform setParameters.
  • Page 116: Android Standard Camera Api Camera.parameters Class

    6.12. Android standard camera API Camera.Parameters Class Below shows Android standard camera API (Camera.Parameters Class) that can use in BT-2000 For details of each API, please refer to Android API level 15 specifications. Android standard API(Camera.Parameters) Can use in BT-2000 flatten() get(String key) getAntibanding()
  • Page 117 Can use in BT-2000 Android standard API(Camera.Parameters) getSupportedFlashModes() ✔ getSupportedFocusModes() ✔ getSupportedJpegThumbnailSizes() ✔ getSupportedPictureFormats() ✔ getSupportedPictureSizes() ✔ getSupportedPreviewFormats() ✔ getSupportedPreviewFpsRange() ✔ getSupportedPreviewFrameRates() ✔ getSupportedPreviewFrameRates() ✔ getSupportedPreviewSizes() ✔ getSupportedSceneModes() ✔ getSupportedVideoSizes() getSupportedWhiteBalance() getVerticalViewAngle() getVideoStabilization() getWhiteBalance() getZoom() ✔ getZoomRatios() isAutoExposureLockSupported() ✔ isAutoWhiteBalanceLockSupported() ✔...
  • Page 118 Android standard API(Camera.Parameters) Can use in BT-2000 setGpsLatitude(double latitude) setGpsLongitude(double longitude) setGpsProcessingMethod(String processing_method) setGpsTimestamp(long timestamp) setJpegQuality(int quality) ✔ setJpegThumbnailQuality(int quality) ✔ setJpegThumbnailSize(int width, int height) ✔ setMeteringAreas(List<Camera.Area> meteringAreas) setPictureFormat(int pixel_format) ✔ setPictureSize(int width, int height) ✔ setPreviewFormat(int pixel_format) ✔ setPreviewFpsRange(int min, int max) ✔...
  • Page 119: Sensor Control

    7. Sensor control MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 120: Sensor Control Summary

    7.1. Sensor control summary The BT-2000 is equipped with an IMU (high precision, high stability inertia measurement unit), a geomagnetic sensor, and an ALS (ambient light sensor). Tap detection and azimuth detection are also available. 7.1.1. IMU and the geomagnetic sensor The BT-2000 is equipped with an IMU and a geomagnetic sensor.
  • Page 121 7.1.2. ALS The BT-2000 is equipped with an ALS (ambient light sensor). This sensor allows the device to acquire the ambient light for the user's surroundings. Also, the BT-2000 is equipped by standard with automatic optics that auto adjust the display brightness according to the user's surroundings. To activate, open [Settings] apps and [Display][Screen brightness], and check the [Brightness automatically control].
  • Page 122 7.1.3. Headset tap detection The headset for the BT-2000 is equipped with a tap detection function. The headset's tap detection function acts as an input device for the user. For example, this can be used to change screen information. Sensor to detect tap is installed by headset headpad parts. So when using, tap below point by finger.
  • Page 123: Using The Sensor

    7.2. Using the sensor The sensor uses the standard Android API, SensorEventListener. The following lists the available sensor types and usage examples. 7.2.1. Sensor type The BT-2000 can use the following sensors. The following sensor types are also defined in the Android Sensor class.
  • Page 124: Using Sensoreventlistener

    7.3. Using SensorEventListener It is necessary to implement SensorEventListener for sensors using Activity or Service. Example: Implementing SensorEventListener in Activity public class SampleActivity extends Activity implements SensorEventListener 7.3.1. Registering sensors being used When using a sensor, you need to register a sensor listener. Example) Registering an accelerometer //System sensor service acquisition SensorManager sm = (SensorManager)getSystemService(SENSOR_SERVICE);...
  • Page 125 Sensor value that can be received by onSensorChanged is different by sensor type used. SensorEvent array element numbers supporting each sensor type are shown below. Sensor type Unit Sensor value SensorEvent Array index TYPE_ACCELEROMETER X axis Y axis Z axis TYPE_GYROSCOPE rad/s X axis...
  • Page 126: Sample Code

    7.4. Sample code Sample code of using sensor type TYPE_HEADSET_TAP, and show Toast when tap is detected. package jp.epson.moverio.bt2pro.sample.TapSample; import android.app.Activity; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.widget.Toast; public class MainActivity extends Activity implements SensorEventListener {...
  • Page 127: Bluetooth/Ble

    8. Bluetooth/BLE MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 128: Pre-Cautions For Developing Apps Using Ble

    8.1. Pre-cautions for developing Apps using BLE BT-2000 is adopting EPSON original BLE control API, so you cannot use BLE control API provided by Google. Therefore you cannot divert App or source code that is operating with other Android equipment. For detail limited items, please refer to chapter 8.4.Remarks & Restrictions for BLE App Development MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 129: Summary

    8.2. Summary This chapter explains the Bluetooth/BLE function built into the MOVERIO Pro BT-2000. The BT-2000 supports Bluetooth 4.0 LE, and in addition to the conventional Bluetooth 3.0+HS function, it also supports LowEnergy. For convenience, this section describes the Bluetooth 3.0+HS Bluetooth Legacy and the LowEnergy BLE.
  • Page 130 8.2.1.2. BLE specifications This describes the BLE specifications for the BT-2000. Table 8-3 BLE protocol stack specifications Item Specifications Protocol stack specifications Based on Core Spec Version 4.1 (Low Energy Host) Table 8-4 BLE protocol support Profile Role Version Find Me Profile(FMP) Locator Proximity Profile(PXP)...
  • Page 131: Usage Method

    8.3. Usage method This section describes how to use Bluetooth Legacy and BLE. 8.3.1. Using Bluetooth Legacy You can use Bluetooth Legacy for the BT-2000 from [Bluetooth] in the [Settings] app. ON/OFF switch (1) ON/OFF switch (2) Figure 8-2 Bluetooth Legacy Settings screen 8.3.1.1.
  • Page 132 8.3.2. Using BLE To test the BLE function for the BT-2000, sample BLEBeacon and PXP/FMP applications have been preinstalled. Refer to these sample applications when developing a BLE application for the user. The following explains how to use the sample applications. 8.3.2.1.
  • Page 133 decide whether or not ("Use" or "Do not use") to use the distance determination based on Measured Power supplied by the company identifier in the BLEBeacon app. Distance is determined from the Measured Power and RSSI value as shown below. Table 8-6 Determining distance for the BLEBeacon app Determination result RSSI value (when Measured Power for the Beacon is set to -70)
  • Page 134 8.3.2.2. Using the FMP_PXP sample application Select the FMP_PXP icon from the app list. *This application still includes some Japanese language. Please reference the following translation notes as your reference when you use this application. Figure 8-5 FMP_PXP icon Check the ON/OFF status for the BLE when the app starts, and then displays a confirmation dialog if BLE is not ON.
  • Page 135 Please push “Scan Start” button. Target service selection Target connection device Authentication method Figure 8-7 FMP_PXP app Scan screen composition Table 8-7 FMP_PXP app Scan screen composition Item Explanation Scan Start Starts scanning for the BLE device. Scan Stop Stops scanning for the BLE device. Connect Starts connecting.
  • Page 136 Authenticating using Passkey Entry When connecting to a BLE device that requires password authentication, execute Connect in Passkey Entry. One of the following pairing dialogs is displayed depending on the Passkey Entry connection. Pairing setting request of BLE If you want the next device to pair, 6-digit number (000000-999999) is If you want to set the PasskeyInput PasskeyDisplay DeviceName...
  • Page 137: Remarks & Restrictions For Ble App Development

    BLE. In applications that use BLE on the BT-2000, design so that the BLE function can be turned ON/OFF using EPSON original API. ■ BLE API access from multiple applications Avoid designs that allow multiple BLE applications to access the BLE API at the same time.
  • Page 138: Import Module

    8.5. Import module To use EPSON original BLE control API, use SDK for BT-2000 provided by EPSON, and import the following modules. import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeChipCode; import android.bluetooth.BluetoothLeErrorCodeDescription; import android.bluetooth.BluetoothLeGapCallback; import android.bluetooth.BluetoothLeGapCallback.AddrType; import android.bluetooth.BluetoothLeGapCallback.AuthType; import android.bluetooth.BluetoothLeGapEvtAuthStatus; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback;...
  • Page 139: Application Interface List

    8.6. Application interface list Tables 8-9, 8-10, and 8-11 provide a list of application interfaces. Table 8-9 android.bluetooth.BluetoothLeAdapterManager for application interface list Function name Function summary getInstance Acquires instance. isEnable Acquires enable/disable status for BLE. enable Enables BLE. disable Disables BLE. startScan Starts scanning for the BLE.
  • Page 140 Table 8-10 android.bluetooth.BluetoothLeGapCallback for application interface list Callback function Function summary name. onScanResult Callback function for scan results (Advertise data) reception. onConnectResult Callback function for connection results reception. onDisconnectResult Callback function for disconnection results reception. onPasskeyInput Callback function for Pass Key input results reception. onPasskeyDisplay Callback function for Pass Key display results reception.
  • Page 141: Supported Gatt Procedure Table

    8.7. Supported GATT procedure table The following shows a list of Bluetooth GATT procedures and supported BLE API procedures. Table 8-12 Supported GATT procedure for BLE API table GATT Procedure GATT Sub-Procedure Functions that support BLE API Server Configuration Exchange MTU Not supported Discover All Primary Services discPriSrv(char)
  • Page 142: Application Interface Details

    8.8. Application interface details 8.8.1. getInstance Function  Acquire instances in the BluetoothLeAdapterManager class. Format  BluetoothLeAdapterManager BluetoothLeAdapterManager getInstance(void); Parameters  None Return value  Model Explanation BluetoothLeAdapterManager Except for NULL: Instances in the BluetoothLeAdapterManager class. NULL: Fails to acquire instance. 8.8.2.
  • Page 143 8.8.3. enable Function  Enable BLE. Format  boolean enable(void); Parameters  None Return value  Model Explanation boolean true: success false: fail 8.8.4. disable Function  Disable BLE. Format  boolean disable(void); Parameters  None Return value  Model Explanation boolean true: success...
  • Page 144 8.8.5. startScan Function  Start the BLE scan (Advertise reception). Format  void startScan(void); Parameters  None Return value  None Usage method  To receive scan results (Advertise data), you need to register the callback function in setGapCallback in advance. The following callback function sends a notification for received Advertise data.
  • Page 145 8.8.7. getDeviceName Function  Acquire the local device name. Format  String getDeviceName(void); Parameters  None Return value  Model Explanation String Except for NULL: local device name. NULL: Fail 8.8.8. getBdAddress Function  Acquire the local BD device. Format ...
  • Page 146 8.8.9. connect Function  Specify the partner BD address (remote BD address), connection timeout, and the number of times to retry, and then connect. Format  int connect(AddrType addrType, String addr, int timeout, int retryReconnect); Parameter  Model name Explanation AddrType addrType Remote BD address classification *See "BD address classification"...
  • Page 147 8.8.10. connectCancel Function  Connection canceled while connecting to the BLE device. Format  int connectCancel(void); Parameter  Model name Explanation ― None Return value  Model Explanation BluetoothLeChipCode.SUCCESS: success BluetoothLeChipCode.BaseError.INVALID_STATE: invalid status MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 148 8.8.11. disconnect Function  Specify the partner BD address (remote BD address), connection timeout, and the number of times to retry, and then connect. Format  int disconnect(char connectedHandle , byte hci_status_code) Parameter  Model name Explanation char connectedHandle Connection handle * Specify the connection handle (ConnectedHandle) in the connected status (connStatus) acquired in onConnectResult.
  • Page 149 8.8.12. setAuthType Function  Set authentication classification. Format  boolean setAuthType(AuthType authType); Parameter  Model name Explanation AuthType authType Authentication classification Return value  Model Explanation BluetoothLeChipCode.SUCCESS: success BluetoothLeChipCode.BaseError.INVALID_PARAM: invalid parameter BluetoothLeChipCode.BaseError.INVALID_STATE: invalid status BluetoothLeChipCode.STKError.INVALID_CONN_HANDLE: invalid connection handle Authentication classification ...
  • Page 150 8.8.13. notifyInputPasskey Function  Register a pass key. Format  int notifyInputPasskey(PassKeyType passKeyType, String passKey); Parameter  Model name Explanation PassKeyType passKeyType Passkey type String passKey Key string Return value  Model Explanation BluetoothLeChipCode.SUCCESS: success BluetoothLeChipCode.BaseError.INVALID_PARAM: invalid parameter BluetoothLeChipCode.BaseError.INVALID_STATE: invalid status BluetoothLeChipCode.BaseError.INVALID_ADDR: invalid memory address BluetoothLeChipCode.STKError.INVALID_CONN_HANDLE: invalid connection handle...
  • Page 151 8.8.14. setGapCallback Function  Register the BluetoothLeGapCallback class where the callback function used for GAP functions is mounted. Format  void setGapCallback(BluetoothLeGapCallback callback); Parameter  Model name Explanation BluetoothLeGapCallback callback Callback class Return value  None Callback function used for GAP functions ...
  • Page 152 8.8.15. discPriSrv Function  Start searching the connected BLE device for a Primary Service. Use format -2 when specifying a UUID and searching for the Primary Service. Format -1  int discPriSrv(char connectedHandle, char findStartHandle); Format -2  int discPriSrv(char connectedHandle, char findStartHandle, byte[] uuid); Parameter ...
  • Page 153 8.8.16. discChar Function  Start searching the connected BLE device for Characteristics. Format  int discChar(char connectedHandle, char startHandle, char endHandle); Parameter  Model name Explanation char connectedHandle Connection handle char startHandle Handle location for starting the search char endHandle Handle location for ending the search Return value ...
  • Page 154 8.8.17. discCharDesc Function  Start searching the connected BLE device for Characteristic Descriptors. Format  int discCharDesc(char connectedHandle, char startHandle, char endHandle); Parameter  Model name Explanation char connectedHandle Connection handle char startHandle Handle location for starting the search char endHandle Handle location for ending the search Return value ...
  • Page 155 8.8.18. readGatt Function  Start acquiring Characteristic Values/Characteristic Descriptors for the connected BLE device. Use format -2 when handling Characteristic Values/Characteristic Descriptors with a long data length. Format -1  int readGatt(char connectedHandle, char handle); Format -2  int readGatt(char connectedHandle, char handle, char offset); Parameter ...
  • Page 156 8.8.19. readUuidGatt Function  Start acquiring Characteristic Values for the connected BLE device according to the specified UUID. Format  int readUuidGatt(char connectedHandle,byte[] uuid, char startHandle, char endHandle); Parameter  Model name Explanation char connectedHandle Connection handle byte[] uuid UUID for acquisition target Characteristic char startHandle Handle location for starting the search char endHandle...
  • Page 157 8.8.20. writeWithoutRspGatt Function  Write to for the Characteristic Value specified with the handle. No result notification through a callback. Format  int writeWithoutRspGatt(char connectedHandle, char handle, byte[] value); Parameter  Model name Explanation char connectedHandle Connection handle char handle Handle location for Characteristic Value byte[] value Written value...
  • Page 158 8.8.21. writeGatt Function  Write to for the Characteristic Value specified with the handle. Format  int writeGatt(char connectedHandle, char handle, byte[] value); Parameter  Model name Explanation char connectedHandle Connection handle char handle Handle location for Characteristic Value byte[] value Written value Return value ...
  • Page 159 8.8.22. confirmation Function  Response to Indication. Format  int confirmation(char connectedHandle, char handle); Parameter  Model name Explanation char connectedHandle Connection handle char handle Handle location for Characteristic Value Return value  Model Explanation BluetoothLeChipCode.SUCCESS: success BluetoothLeChipCode.BaseError.INVALID_STATE: invalid status BluetoothLeChipCode.STKError.INVALID_CONN_HANDLE: invalid connection handle BluetoothLeChipCode.STKError.INVALID_ATTR_HANDLE: invalid attribute...
  • Page 160 8.8.23. setGattCallback Function  Register the BluetoothLeGattCallback class where the callback function used for GATT functions is mounted. Format  void setGattCallback(BluetoothLeGattCallback callback); Parameter  Model name Explanation BluetoothLeGattCallback callback Callback class Return value  None Callback function for the GATT function ...
  • Page 161 8.8.24. BluetoothLeGapCallback.onScanResult Function  Provide an interface for the callback function to receive scan results (Advertise data). Use format -2 to acquire the scan response and the advertise type. Related API: startScan/stopScan  Format -1  void onScanResult(AddrType addrType, String addr, int rssi, byte[] adv_data); Format -2 ...
  • Page 162 8.8.25. BluetoothLeGapCallback.onConnectResult Function  Provide an interface for the callback function to receive connection results for BLE. Related API: connect  Format  void onConnectResult(byte response, BluetoothLeGapEvtConnected connStatus, BluetoothLeGapEvtAuthStatus authStatus); Parameter  Model name Explanation byte response Connection information BluetoothLeGapEvtConnected Connection complete status connStatus Since connection fails if a CONNECTION_TIMEOUT...
  • Page 163 Connection complete status (class BluetoothLeGapEvtConnected)  Member's name Explanation char connectedHandle Connection handle byte addrType BD address classification byte[] addr BD address BleConnectParams params Connection parameter MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 164 8.8.26. BluetoothLeGapCallback.onDisconnectResult Function  Provide an interface for the callback function to receive disconnection results for BLE. Related API: disconnect  Format  void onDisconnectResult(char connectedHandle, byte response, boolean reconnecting); Parameter  Model name Explanation char connectedHandle Connection handle byte response Disconnection reason boolean reconnecting Flag during reconnecting...
  • Page 165 8.8.27. BluetoothLeGapCallback.onPasskeyInput Function  Provide an interface for the callback function to confirm pass key input reception. Format  void onPasskeyInput(PassKeyType passKeyType); Parameter  Model name Explanation PassKeyType passKeyType Pass key type Pass key type  Value Explanation BluetoothLeGapCallback.PassKeyType.NONE None BluetoothLeGapCallback.PassKeyType.PASSKEY PIN code 8.8.28.
  • Page 166 8.8.29. BluetoothLeGattCallback.onDiscPriSrvResult Function  Provide an interface for the callback function to receive search results for the Primary Service. Related API: discPriSrv  Format  void onDiscPriSrvResult(char connectedHandle, int status , BluetoothLeGattService[] data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results...
  • Page 167 /** ATT Error: Attribute cannot be read or written using read/write blob requests. */ public static final int BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_LONG = 0x010B; /** ATT Error: Encryption key size used is insufficient. */ public static final int BLE_GATT_STATUS_ATTERR_INSUF_ENC_KEY_SIZE = 0x010C; /** ATT Error: Invalid value size. */ public static final int BLE_GATT_STATUS_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D;...
  • Page 168 8.8.30. BluetoothLeGattCallback.onDiscCharResult Function  Provide an interface for the callback function to receive search results for the Characteristic. Related API: discChar  Format  void onDiscCharResult(char connectedHandle, int status, BluetoothLeGattChar[] data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results Returns...
  • Page 169 8.8.31. BluetoothLeGattCallback.onDiscCharDescResult Function  Provide an interface for the callback function to receive search results for the Characteristic Descriptor. Related API: discCharDesc  Format  void onDiscCharDescResult(char connectedHandle, int status, BluetoothLeGattDesc[] data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results * Returns the value defined in...
  • Page 170 8.8.32. BluetoothLeGattCallback.onReadGattResult Function  Provide an interface for the callback function for acquisition results reception of Characteristic Value using readGatt API. Related API: readGatt  Format  void onReadGattResult(char connectedHandle, int status, BluetoothLeGattEvtReadRsp data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results...
  • Page 171 8.8.33. BluetoothLeGattCallback.onReadUuidGattResult Function  Provide an interface for the callback function for acquisition results reception of Characteristic Value using readUuidGatt API. Related API: readUuidGatt  Format  void onReadUuidGattResult(char connectedHandle, int status, byte[] data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results...
  • Page 172 8.8.34. BluetoothLeGattCallback.onWriteGattResult Function  Provide an interface for the callback function for writing results reception of Characteristic Value using writeGattRes API. Related API: writeGattRes  Format  void onWriteGattResult(char connectedHandle, int status, BluetoothLeGattEvtWriteRsp data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results...
  • Page 173 8.8.35. BluetoothLeGattCallback.hvxEvt Function  Provide an interface for the callback function to receive Indication/Notification using confirmation API. Related API: confirmation  Format  void hvxEvt(char connectedHandle, int status, char handle, hvxEvtType type, byte[] data); Parameter  Model name Explanation char connectedHandle Connection handle int status Search results...
  • Page 174: Ble Processing Sample Code

    8.9. BLE Processing Sample Code When developing a BLE app, describe the sample code used in the BLE API. 8.9.1. Enabling BLE Call isEnable() and acquire the current status. Since BLE is disabled when this function returns false, call enable() to enable BLE. // Instance acquisition for the BLE manager class BluetoothLeAdapterManager mManager = BluetoothLeAdapterManager.getInstance();...
  • Page 175 8.9.3. Registering scan start and callback To start the Beacon function, register the callback function using setGapCallback() to receive Advertise from the Beacon device, and start scanning using startScan(). import android.widget.Toast; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager; @Override protected void onCreate(Bundle savedInstanceState) { //Instance acquisition for the BLE manager class...
  • Page 176 8.9.4. Connecting and Disconnecting BLE The following provides an example of the processing for connecting and disconnecting BLE. Connecting: Enable GAP callback registration and scanning before connecting. Connect using information in (addrType, addr) in the scan results (onScanResult()). Disconnecting: Disconnect using the connection handle (connStatus.connectedHandle) in the connection results (onConnectResult()).
  • Page 177 Use the following callback to output logs when connecting and disconnecting. private BluetoothLeGapCallback mLeGapCallback = new BluetoothLeGapCallback() { @Override public void onConnectResult(byte response, final BluetoothLeGapEvtConnected connStatus, BluetoothLeGapEvtAuthStatus authStatus) { Log.i(“DEBUG”, “connectedHandle=“ + connStatus.connectedHandle); @Override public void onDisconnectResult(char connectedHandle, byte response, boolean reconnecting) { Log.i(“DEBUG”, “Disconnect“);...
  • Page 178 8.9.5. Searching for Primary Service You can search for the Primary Service on a connected BLE device by executing the callback function setGattCallback() and Primary Service search using discPriSrv(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager;...
  • Page 179 8.9.6. Searching for Characteristic You can search for the Characteristics on a connected BLE device by executing the callback function setGattCallback() and Characteristic search using discChar(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager; @Override protected void onCreate(Bundle savedInstanceState) { Instance acquisition for the BLE manager class...
  • Page 180 8.9.7. Searching for Characteristic Descriptor You can search for the Characteristic Descriptor on a connected BLE device by executing the callback function setGattCallback() and Characteristic Descriptor search using discCharDesc(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager;...
  • Page 181 8.9.8. Acquiring Characteristic Value by Specifying a Handle You can acquire the Characteristic Value on a connected BLE device byexecuting the callback function setGattCallback() and Characteristic Value acquisition using readGatt(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager;...
  • Page 182 8.9.9. Acquiring Characteristic Value by Specifying a UUID You can acquire the Characteristic Value on a connected BLE device by specifying a UUID. To do this execute the callback function registration using setGattCallback() and Characteristic Value acquisition using readUuidGatt(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected;...
  • Page 183 8.9.10. Writing a Characteristic Value You can write the Characteristic Value to a connected BLE device by executing the callback function setGattCallback() and Characteristic Value writing using writeGatt(). import android.bluetooth.BluetoothLeAdapterManager; import android.bluetooth.BluetoothLeGapEvtConnected; import android.bluetooth.BluetoothLeGattCallback; public class MainActivity extends Activity { private BluetoothLeAdapterManager mManager;...
  • Page 184: Power Control

    9. Power control MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 185: Power Control Summary

    9.1. Power control summary You have two batteries in the BT-2000 and acquire power supply information. ■ Power supply information The following power supply information types are defined in the Android BatteryManager class. Power supply type Battery Constant information type Power status Overall status of batteries EXTRA_STATUS...
  • Page 186: Acquiring Battery Information

    9.2. Acquiring Battery Information Use the Filter intent broadcast by the operating system, and acquire the battery information. Usage examples are displayed below. ■ Register the receiver of the battery information broadcast by the app IntentFilter filter = IntentFilter(); filter.addAction(Intent.ACTION_BATTERY_CHANGED); registerReceiver(mBroadcastReceiver, filter);...
  • Page 187: Self-Diagnostic Function

    Self-diagnostic function MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 188: Self-Diagnostic Function

    10.1. Self-diagnostic function 10.1.1. Self-diagnostic function summary The BT-2000 is equipped with a self-diagnostic function to check the status of internal devices. You can check the following devices and content using the self-diagnostic function. Table 10 1 Confirmation items using the self-diagnostic function Device type Display name Diagnostic method...
  • Page 189 10.1.2. Using the self-diagnostic function The self-diagnostic function is provided as an app. Start "SelfDiagnosis" from the app list. Figure 10 Start SelfDiagnosis app When the app starts, click the "Start" button at the top of the screen to start the diagnostic procedure.
  • Page 190 When the diagnosis has been performed, the results for each device are displayed. See table 10-1 above for details about the target items and the checking method. Figure 10 SelfDiagnosis check results MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 191: Gps Assist

    GPS Assist MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 192: Gps Assist Function Summary

    11.1. GPS Assist function summary BT-2000 has GPS assist function to reduce initial positioning time (Time To First Fix: TTFF) of cold start when it takes long GPS positioning time. By downloading GPS satellite orbit prediction data in advance and write in the BT-2000, it will reduce download time of satellite data and reduce TTFF as a result.
  • Page 193: Precaution And Limitation Of Using /Developing Gps Assist Function

    To set EPO data delivery server in BT-2000, write delivery server URL at ”internal storage\agps\agps.conf”. ■GPS assist function API BT-2000 GPS assist function API is using EPSON own API. To develop an App using GPS assist function, install SDK provided by EPSON and use EPSON own API. MOVERIO Pro Developer's Guide (Rev.1.4)
  • Page 194: How To Use

    11.3.1. Downloading EPO data ・ Turn Wi-Fi function ON to access to EPO delivery server. Internet environment is required to access to EPSON EPO data delivery server. When placing EPO data to intranet, connection to intranet is required. ・ Open [Setting] App and select [Position information service].
  • Page 195: Setting Method

    Use ”\:” to write colon Table 11-1 Setting items in agps.conf Item Explanation EPO_URL Set URL of EPO data delivery server. Default value is” https://tech.moverio.epson.com/epo/data.bin” EPO_NUM_SEGS Set EPO writing segment number(1~28). 1 segment =6 hours. Default value is 28(6 hours ×28=7 days) LAST_MOD Shows download time of last time.
  • Page 196: Application Interface Function Summary

    Table 11-2 Interface list of AGPSControl class Function name Function summary Note downloadEpo Download EPO data by setting according to EPSON original agps.conf setting file. downloadEpo_url Download EPO data from URL specified by EPSON original argument writeEpo Write EPO data to BT-2000 by setting EPSON original according to agps.conf setting file.
  • Page 197: Application Interface Detail

    11.6. Application interface detail 11.6.1. downloadEpo Function  Download EPO data according to setting written in Setting file (/sdcatd/agps.conf). EPO data will be delivered from EPSON data delivery server(Update every day at 0 :10 UTC) Format  int downloadEpo(void); Parameter ...
  • Page 198 11.6.2.1. writeEpo Function  Write EPO data to BT-2000 GPS module by agps.conf setting. Format  int writeEPpo(); Parameter  None Return value  Always 0 Broadcast Intent  Intent Status AGPS_WRITE_COMPLETED write the data completed AGPS_WRITE_ERROR Write the data error AGPS_CONF_ERROR agps.conf error (No agps.conf, or the number of EPO_NUM_DAYS is not crrect)
  • Page 199: How To Use Api For Gps Assist

    11.7. How to use API for GPS assist 11.7.1. Download of EPO data Create the instance of AGPSControl and call API for download. ■Implementation example for download public void execDownload(View view) { Log.d(TAG, "exec Download"); try { AGPSControl ctl = new AGPSControl(); ctl.downloadEpo();...
  • Page 200 11.7.2. Intent reception method As download and writing process are done asynchronously, return value cannot be referred directly. So, receive the process result by using Broadcast Intent. For each Broadcast Intent value issued by each API, refer to the item of Broadcast intent of each API.
  • Page 201 ■Intent receiver example class MyReceiver extends BroadcastReceiver { public MyReceiver() { super(); @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(AGPSControl.AGPS_CONF_ERROR)) { Toast.makeText(getApplicationContext(), "AGPS_CONF_ERROR", Toast.LENGTH_LONG).show(); Log.d(TAG, "Intent Received | AGPS Conf Error"); if (intent.getAction().equals(AGPSControl.AGPS_DOWNLOAD_COMPLETED)) { Toast.makeText(getApplicationContext(), "AGPS_DOWNLOAD_COMPLETED", Toast.LENGTH_LONG).show(); Log.d(TAG, "Intent Received | AGPS Download Completed"); ~~~~~(Omit other intent)~~~~~...
  • Page 202 ― Memo ― MOVERIO Pro Developer's Guide (Rev.1.4)

This manual is also suitable for:

Moverio pro bt-2200