background image

MOVERIO Pro Developer's Guide (Rev.1.4)

                                                                                                     

 

 

 

 

 

 

 

 

 

 

BT-2000/2200

 

 

 

 

Developer's Guide 

 

 

 

 

 

Revision history 

SEIKO EPSON CORPORATION 

Summary of Contents for Moverio Pro BT-2000

Page 1: ...MOVERIO Pro Developer s Guide Rev 1 4 BT 2000 2200 Developer s Guide Revision history SEIKO EPSON CORPORATION ...

Page 2: ...hen changing key assign 6 Adding EDof mode and auto exposure function 11 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: ...his guide are for reference only Seiko Epson cannot be held responsible for any infringements including industrial property rights or damage caused to third parties Furthermore this guide does not imply consent to licensing for third parties or industrial property rights for Seiko Epson 3 This document does not relate to products that require a high level of reliability such as life support equipm...

Page 4: ...______________________________________________________ 25 3 2 Full screen display function ________________________________________________________ 26 3 3 Switch between 2D 3D display function______________________________________________ 27 3 4 Backlight control__________________________________________________________________ 29 3 5 Mute function__________________________________________________...

Page 5: ...___________ 110 7 Sensor control ___________________________________________ 113 7 1 Sensor control summary __________________________________________________________ 114 7 2 Using the sensor _________________________________________________________________ 117 7 3 Using SensorEventListener _______________________________________________________ 118 7 4 Sample code ________________________________...

Page 6: ...86 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 Application interface function summary __________________________________________ 190 11 6 Application interface detail_...

Page 7: ...MOVERIO Pro Developer s Guide Rev 1 4 1 1 Introduction ...

Page 8: ...tion 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 This also allows you to view your surroundings while projecting an image which adds an aspect of safety The weight of the product is supported by the entire head allowing you to work for long periods of time without feeling fatigued You can work wh...

Page 9: ...Virtual screen size 80 for virtual viewing distance of 5 m Color reproduction 24 bit full color 16 770 000 colors 3D display Available only for side by side User interface Audio commands supports Japanese and English Hardware keys Power lock D pad OK key and A B X Y keys Others Headset tap input function Camera Built in headset stereo camera Sensor IMU Gyro acceleration geomagnetic built in headse...

Page 10: ...hout sensor rotation USB vendor ID 0x04B8 HOME MENU and BACK keys are supported by hardware keys Touch screen and track pad are not used Except for Wi Fi data communication such as 3G is not supported This is not a Google Certified device meaning the following services which require Google Certification are not available Google Play Google location information service Additional services only avai...

Page 11: ...rt1 4 1 Table of each function and which API to use Function Android standard API EPSON original API 3 Display control 4 UI control 5 Voice command 6 Camera control 7 Sensor control 8 Bluetooth BLE 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 De...

Page 12: ...MOVERIO Pro Developer s Guide Rev 1 4 6 2 Developing Apps ...

Page 13: ...y to control by EPSON own API There are some cases that Android emulator or Android applications that operated with Android Smartphones may not operate Please take attention when transplanting APK or diverting source code Below API needs attention specially please refer details at each chapter Module lists that need attention for developing Apps Camera Chapter 6 Camera control BLE Chapter 8 Blueto...

Page 14: ...pps for Android smartphones However when connecting the BT 2000 with the app development computer or when using functions unique to the BT 2000 you need to have the PC settings compatible with BT 2000 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 pro...

Page 15: ... 2 3 2 Acquiring and installing JDK Download the JDK 7 or later from the following Website and then install http www oracle com technetwork java javase downloads jdk8 downloads 2133151 html Not sure if it s a good idea to include the link above as it may change over time 2 3 3 Installing Android Studio Follow the directions provided by the installer to install Android Studio Example C Users User n...

Page 16: ...e 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 When Proxy settings are unknown please contact network administrator for Connecting method to external network using Proxy ...

Page 17: ...stall 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 Next we will explain how to connect the BT 2000 to the app development computer and setting up the ADB driver ...

Page 18: ...fore proceed to 2 4 2 When using Windows7 OS or before 2 4 1 When using Windows8 OS or later 2 4 1 1 Operate by test mode 1 Run the command prompt as administrator and run below command When below error occur by running above command please refer to 2 4 1 2 When failing test mode command 2 Select Setting Change PC Setting from the charm 3 Select Update and recovery Recovery Restart now 4 Select Tr...

Page 19: ...eboot after selecting Windows Startup Settings 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 Select ...

Page 20: ... due to lock by Secure Boot Please disable Secure Boot by below method 1 Select Settings Change PC Settings from charm 2 Select Update and recovery Recovery Restart now 3 Select Trouble shoot Advanced options UEFI firmware Settings 4 Find Secure Boot Control and change to Disabled Select Select Select Select ...

Page 21: ...e command prompt by Administrator privileges and run test mode command To make Secure Boot on again please set by below procedure 1 Proceed procedure 1 3 when disabled the setting 2 Find Secure Boot control and change to Enabled 3 Save the change and reboot 7 Execute the procedure of 2 4 1 1 agin ...

Page 22: ...droid sdk extras google usb_driver android_winusb inf in a text editor and then add the following 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 CompositeAd...

Page 23: ...date 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 This completes setting up the ADB driver in the app development environment The next section explains how to connect the BT 2000 to a computer ANDROID 3RD PARTY USB VENDOR ID LIST DO NOT EDIT USE android update adb TO GENERA...

Page 24: ...oper options USB debugging 2 5 1 2 Install the BT 2000 driver Connect a USB cable to the computer on which the BT 2000 is running and the ADB driver settings are complete If the computer does not respond disconnect the USB cable restart the BT 2000 and then reconnect the USB cable When New device detected is displayed on the computer select Control Panel Hardware and Sound Device Manager Right cli...

Page 25: ...lable 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 Start the command prompt run cd C Users User name AppData Local Android sdk tools and move the folder It is useful to maintain the environment variable path mentioned above When you execute adb devices the message 0123456789ABCDEF2 device is displayed ADB connection is c...

Page 26: ...oftware is not matching due to the difference of API included developed Apps may not operate User using system software version R1 0 4 When updating OS from R1 0 4 to R1 2 1 or later adding callback API process which is newly added is required This phenomenon may occur in below Apps Apps using Voice command class VoiceCommandClientCallbacks If it happens please solve by below procedure 1 Change th...

Page 27: ...er is C Users user name AndroidStudioProjects Explanation from now on is based on that project is at C Users user name AndroidStudioProjects application name 3 Press Sync Project with Gradle Files button where it is above of AndroidStudio reflect Gradle change to the project 4 Open build gradle Project application name in the left window of AndroidStudio and then edit as below allprojects reposito...

Page 28: ...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: ...me H725Ctrl level project to the line above orderEntry type jdk jdkName Android API 23 Platform jdkType Android SDK This will increase the priority of H725Ctrl jar in AndroidStudio and can solve the unsolved situation temporary and use code completion function Limited items Due to AndroidStudio specification after running like rebuild and update gradle contents app iml will be updated too and EPSO...

Page 30: ...MOVERIO Pro Developer s Guide Rev 1 4 24 3 Display control ...

Page 31: ... through system allowing images to be projected for both eyes as opposed to the single image one eye type The advantage with this device is that eye movement is kept to a minimum thereby reducing fatigue and making it suitable for use at work You can also flip up the MOVERIO Pro display which allows you to set the display section by holding it with one hand when you want to superimpose video or im...

Page 32: ... a unique flag in the app Executing full screen in applications Execute the following process in onCreate for each Activity Window win getWindow WindowManager LayoutParams winParams win getAttributes winParams flags 0x80000000 win setAttributes winParams For apps with multiple Activities execute the above process for each Activity Add an import definition import android view Window import android ...

Page 33: ...em with QHD size screen you need to arrange images from left to right by reducing 960 x 540 by half 480 x 540 pixels to create one frame of a QHD 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 Left eye image Right e...

Page 34: ...rface 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 ...

Page 35: ...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 int setBacklight int backlight Display brightness acquisition int getBacklight Parameter backlight Brightness level 0 dark to 20 bright Return value Run result 0...

Page 36: ...y 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 Return value Execution result 0 normal value any other value error ...

Page 37: ...ivate mute Import file jp epson moverio H725 AudioControl Interface int setMute boolean mute Parameter mute Mute ON TRUE OFF FALSE Return value Execution result 0 normal value any other value error Attentions When using int setMute boolean mute designate below permission to the Manifest file of App uses permission android name android permission MODIFY_AUDIO_SETTINGS uses permission ...

Page 38: ...fect so visual elements text graphics stand out vividly the background will need to be set to black when drawing on the projection so you display the target section overlapping with the actual images In this situation we recommend that you do not use the shade The following steps allow you to create this AR effect using the see through function 1 Execute full screen support To reduce the feeling o...

Page 39: ...MOVERIO Pro Developer s Guide Rev 1 4 33 4 UI control ...

Page 40: ...T 2000 comes with the hardware buttons shown in figure 4 1 The functions for each button are shown in table 4 1 Figure 4 1 BT 2000 built in hardware button Table 4 1 Button name and its function Button name Function Power Turn the device ON OFF Key lock Enable disable button input A button Back B button Home X button Menu Y button MultiFunctionOSD display See table 4 2 D pad up Upper input D pad d...

Page 41: ...st brightness D pad up right Increase screen brightness D pad down left Decrease screen brightness Press three times Switch between 2D 3D D pad up right Set 2D D pad down left Set 3D 4 1 2 Software keyboard BT 2000 has iWnnIME as standard character input function When inputting character below keyboard will be displayed and can control by D pad key English keyboard Limited items SYM key cannot be ...

Page 42: ...ton F3 Y button Multi Function OSD Display Y button F4 D pad up Move up D pad up Move up D pad down Move down D pad down Move down D pad left Move left D pad left Move left D pad right Move right D pad right Move right select OK key Confirm select OK key Confirm Events called when buttons are pressed The following key events are generated Hardware button Default mode Key event User mode Key event ...

Page 43: ... for status transitions in key assignment mode when using iWnnIME The BT 2000 is equipped with a standard iWnnIME text input system This system uses the Back Menu and D pad keys for input and automatically changes the key assignments to Default mode when starting up the BT 2000 When closing an app the key assignment mode changes to the mode set in iWnnIME for the last app that was started however ...

Page 44: ...ing key assignments You also need to import the following models to use each API android btutil KeyAssign Table 4 3 android btutil KeyAssign for application interface list NO Function name Function summary Notes 1 getKeyAssignMode Acquires the mode for the current key assignment 2 setKeyAssignMode Set and apply a key assignment mode ...

Page 45: ... mode for the current key assignment Format Parameter None Return value Model Explanation Int KEYASSIGN_MODE_DEFAULT Default mode KEYASSIGN_MODE_USER User mode Usage procedure static int getKeyAssignMode void int mode Acquire the current mode mode KeyAssign getKeyAssignMode if mode KeyAssign KEYASSIGN_MODE_USER Process ...

Page 46: ... int mode Key assignment mode to be set You can specify the value using a macro for the following android btutil KeyAssign classes KEYASSIGN_MODE_DEFAULT or 0 KEYASSIGN_MODE_USER or 1 Return value true setting succeeded false setting failed Use procedure 1 boolean setKeyAssignMode int mode Set user mode KeyAssign setKeyAssignMode KeyAssign KEYASSIGN_MODE_USER ...

Page 47: ...MOVERIO Pro Developer s Guide Rev 1 4 41 5 Voice commands ...

Page 48: ...tching due to the difference of API included developed Apps may not operate User using system software version R1 0 4 When updating OS from R1 0 4 to R1 2 1 or later adding callback API process which is newly added is required This phenomenon may occur in below Apps Apps using Voice command class VoiceCommandClientCallbacks If it happens please solve by below procedure 1 Change the SDK of Apps dev...

Page 49: ...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 Only vocabulary that is included in the voice information file can be recognized this differs from the standard sound recognition software that uses network access to con...

Page 50: ...e audio recognition start conditions 7 Enable audio input status 8 Disable audio input status 9 Receive the recognition result of voice commands 10 Receive the situation of if voice commands can receive the input To use API execute VoiceCommandClient bindToRemoteRunningService first and connect to a service class that provides a voice command function Next execute VoiceCommandClient registerCallba...

Page 51: ... voice 2 getSnr Acquire the current value for the set S N ratio 3 setAmp Set parameters used for the voice recognition start conditions Set the recognition start conditions according to the amplitude for the input voice 4 getAmp Acquire the setting for the amplitude of the current input voice 5 start Enable voice input 6 stop Disable voice input Table 5 2 android media epson VoiceCommandClient for...

Page 52: ...nnected Called after connection to service class implementing callback of voice command function has completed 2 onServiceDisconnected Called when service controlling voice command is stopped for some reasons 3 onVoiceCommand Callback for receiving voice command recognition result 4 onSpeakable Callback for receiving if voice command system is accepting voice input or not ...

Page 53: ...10 0 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 For recommended value refer to 5 7 2 Recommended value of voice recognition starting condition Return value Model Explanation boolean Success true Failure false 5 5 2 getSnr Function Acquire the set S N ratio Format Parameter None Return value Model E...

Page 54: ... 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 For recommended value refer to 5 7 2 Recommended value of voice recognition starting condition Return value Model Explanation boolean Success true Failure false boolean set Amp int amp throws...

Page 55: ... 5 5 start Function Enable voice input status Format Parameter Absolute path to the lms file When null is specified the lms file stored in the system is automatically selected and set the default lms file will be used based on the region information for the operating system of the BT 2000 Return value Model Explanation boolean Success true Failure false int getAmp throws RemoteException boolean st...

Page 56: ...Explanation boolean Success true Failure false 5 5 7 registerCallback Function Register a callback to acquire the recognition results for a voice command Format Parameter VoiceCommandClientCallbacks class object Return value None boolean stop void throws RemoteException void registerCallback VoiceCommandClientCallbacks cb ...

Page 57: ...ue None 5 5 9 getVoiceCommandSystemInterface Function Acquire a class as the interface to control voice commands Format Parameter None Return value Model Explanation IVoiceCommandInterface Interface for voice command control Cautions Execute inside or after VoiceCommandClientCallbacks onServiceConnected void unRegisterCallback IVoiceCommandInterface getVoiceCommandSystemInterface ...

Page 58: ...ter An Activity object connected to the voice command service Return value None 5 5 11 unBindFromRemoteRunningService Function Disconnect from a voice command service Format Parameter An Activity object connected to the voice command service Return value None void bindToRemoteRunningService Activity activity void unBindFromRemoteRunningService Activity activity ...

Page 59: ...ecting word that voice command system detected callback returning ID of the word and character string Format Parameter Model Explanation int id ID number of the detected word String word Character string of the detected word Return value None void onVoiceCommand int id String word ...

Page 60: ...Function Callback noticed when voice command system voice receiving situation has changed Format Parameter Model Explanation boolean on true Voice input acceptable situation false Voice input not acceptable situation Return value None void onSpeakable boolean on ...

Page 61: ...ll private IVoiceCommandInterface mVoiceCommandSystem Override protected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout activity_main mContext getApplicationContext mVoiceCommandClient new VoiceCommandClient mVoiceCommandClient bindToRemoteRunningService this mStartButton Button findViewById R id start mStartButton setOnClickListener new View OnCl...

Page 62: ...ride 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 speakable Toast LENGTH_SHOR...

Page 63: ... 5 7 2 Recommended value of voice recognition starting condition When recognition errors occur often due to noise of using environment recognition errors can be reduced by changing the voice recognition starting condition according to the noisiness noise level Recommended value for each noise level is as below This parameter is a setting value to have better voice recognition under white noise or ...

Page 64: ...e_au01_E2 lms epe_au01_E1 lms IDnumber Voice input IDnumber Voice input IDnumber Voice input 2 Menu 19 Display Off 33 Action 3 3 Next 21 Blue 34 Action 4 4 Return 22 Red 35 Action 5 5 Enter 23 Green 51 Zoom In 6 Start 24 Yellow 52 Zoom Out 7 Stop 31 Action1 101 Version 18 Display On 32 Action 2 epe_au01_E2 lms IDnumber Voice input IDnumber Voice input IDnumber Voice input 1 Home 15 Go Left 42 Item...

Page 65: ... period that cannot accept voice input 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...

Page 66: ...p 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 This App is a sample App using this voce command function ...

Page 67: ...noticed to the App App will display ID and character string of the detected word to the display by toast ⅲ Voice command parameter setting Voice command function has a threshold as a parameter to decide whether inputted voice is am speech by human or a noise Parameter has 2 series S N ratio and AMP value By adjusting these it is available to use voice command function where noise level is high S N...

Page 68: ...mand system Start button Stop button Start button Apply S N ratio value AMP value voice information lms to the voice command system and make voice detection effective Stop button Invalid voice detection Display voice information lms file Display voice information lms file that currently selected When App started it displays lms file name In this situation when you make voice detection effective it...

Page 69: ...tion is available setting value like S N ratio that changed by the App does not apply when pressing the Start button In this situation press Stop button once stop the voice command and then change again the setting value and press the Start button 5 Voice information lms file Use Voice information lms that is stored inside BT 2000 system For detail refer to chapter 5 7 4 Voice information file lms...

Page 70: ...MOVERIO Pro Developer s Guide Rev 1 4 64 6 Camera control ...

Page 71: ...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 Please specify resolution and frame rate which the applied camera mode is supporting For details refer to 6 3 Available parameters ...

Page 72: ...e through vga Normal still image shooting mode by 640x480 resolution single through 720p Normal still image shooting mode by 1280x720 resolution single through 1080p Normal still image shooting mode by 1920x1080 resolution single through 5m Normal still image shooting mode by 2576x1936 resolution depth only Mode to receive depth information only side by side Mode for host to create depth informati...

Page 73: ...e mode See table 6 3 for more information 2 Auto exposure works from system software version R1 4 0 and will automatically change the exposure setting according to surround brightness If the result of auto exposure is too bright or toodark please compensate the brightness by exposure compensation 3 White balance is set manually Make setting according to your usage environment Table 6 3 List of mai...

Page 74: ...u 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: ... 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 Figure 6 3 Shooting depth images Furthermore use data inferred in this way as the correct value is not provided in the product specifications for depth data with a 50 pixel edge Figure 6 4 Available range for depth data Far Near Exce...

Page 76: ...s 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 So to handle Depth data as Density it is required to cast to int type and convert to 0 255 Java Code ex int intDencity byteDepthData 0xFF ...

Page 77: ...dware Camera and therefore cannot be used at the same time for multiple threads The following 13 APIs are used in 1 1 1 getSupportedEpsonCameraMode 1 2 setEpsonCameraMode 1 3 getEpsonCameraMode 1 4 setPreviewFpsRange 1 5 setPreviewSize 1 6 getSupportedSharpnessMin 1 7 getSupportedSharpnessMax 1 8 getSharpness 1 9 setSharpness 1 10 getSupportedContrastMin 1 11 getSupportedContrastMax 1 12 getContra...

Page 78: ...n original API 8 getSharpness Acquire the current sharpness value Epson original API 9 setSharpness Set the sharpness value Epson original API 10 getSupportedContrastMin Acquire the minimum available contrast value Epson original API 11 getSupportedContrastMax Acquire the maximum available contrast value Epson original API 12 getContrast Acquire the current contrast value Epson original API 13 set...

Page 79: ...ethod Figure 6 5 shows an example of the flow for the API used in this guide After starting the camera the camera mode is set and the preview starts During a preview you can register the image acquisition callback method as necessary and acquire images Execute processing for the acquired images in the app Because the API in this guide does not comply with the android hardware Camera specifications...

Page 80: ...esolution single through 720p Normal still image shooting mode by 1280x720 resolution single through 1080p Normal still image shooting mode by 1920x1080 resolution single through 5m Normal still image shooting mode by 2576x1936 resolution depth only Mode to receive depth information only side by side Mode for host to create depth information Can receive the image together from 2 camera sensors by ...

Page 81: ...4 75 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 ...

Page 82: ...MODE_SINGLE_THROUGH_1080P EPSON_CAMERA_MODE_SINGLE_THROUGH_5M EPSON_CAMERA_MODE_DEPTH_ONLY EPSON_CAMERA_MODE_EDOF Return value None Measurement table for macro and camera mode Macro Camera mode EPSON_CAMERA_MODE_SIDE_BY_SIDE side by side EPSON_CAMERA_MODE_SINGLE_THROUGH_VGA single through vga EPSON_CAMERA_MODE_SINGLE_THROUGH_720P single through 720p EPSON_CAMERA_MODE_SINGLE_THROUGH_1080P single th...

Page 83: ...solutions will not change even if you set the camera mode in setEpsonCameraMode Application developers should set these parameters using appropriate combinations before executing setParameters Please refer to Table 6 4 for available setting parameters Capturing resolution is fixed by each mode Change setting by using setPictureSize which is Android standard API is not available Start camera camera...

Page 84: ...cquire 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 Usage procedure String getEpsonCameraMode void Start camera camera Camera open Acquire current parameters Camera Parameters params camera getParameters Acquire the current camera mode String mode params getEpsonCameraMode ...

Page 85: ...ut Explanation int min in Minimum value for preview FPS Set the value in multipliers of 1000 so 7 5 fps would be 7500 int max in Maximum value for preview FPS Set the value in multipliers of 1000 Return value None Use procedure 1 set the fps to 7 5 void setPreviewFpsRange int min int max Start camera camera Camera open Acquire current parameter or default value Camera Parameters params camera getP...

Page 86: ...l setParameters is executed When the preview has already started use stopPreview to temporarily stop the preview Each frame rate has a limited combination of preview resolutions and camera modes Note that a run time exception will occur in setParameters for combinations that exceed the limit Stop preview camera stopPreview Acquire current parameter or default value Camera Parameters params camera ...

Page 87: ...ion Table 6 3 List of main parameter combinations shows the preview resolutions that can be set for each camera mode Format Parameter Model name in out Explanation int width in Width of preview image int height in Height of preview image Return value None void setPreviewSize int width int height ...

Page 88: ...hat exceed the limit You cannot set single through 5m or side by side as the preview resolution If you want to acquire images in single through 5M or side by side perform shooting by using takePicture The resolution set for preview resolution uses image data acquired in PreviewCallback Start camera camera Camera open Acquire current parameter or default value Camera Parameters params camera getPar...

Page 89: ...rtedSharpnessMax Function Acquire the minimum maximum available sharpness value Format Parameter None Return value Model Explanation int Return the minimum maximum available sharpness value For the BT 2000 these are 3 and 3 int getSupportedSharpnessMin int getSupportedSharpnessMax ...

Page 90: ... s Guide Rev 1 4 84 6 8 7 getSharpness Function Acquire the current sharpness value Format Parameter None Return value Model Explanation int Return the current sharpness value For the BT 2000 this is 3 to 3 int getSharpness ...

Page 91: ...etParameters Changed content is not reflected until setParameters is executed void setSharpness int Start camera camera Camera open Acquire current parameter or default value Camera Parameters params camera getParameters Acquire the current sharpness value int sharpness params getSharpness sharpness When the sharpness value enters an available setting range it is set if sharpness params getSupport...

Page 92: ...portedContrastMax Function Acquire the minimum maximum available contrast value Format Parameter None Return value Model Explanation int Return the minimum maximum available contrast value For the BT 2000 these are 3 and 3 int getSupportedContrastMin int getSupportedContrastMax ...

Page 93: ...r s Guide Rev 1 4 87 6 8 10 getContrast Function Acquire the current contrast value Format Parameter None Return value Model Explanation int Return the current contrast value For the BT 2000 this is 3 to 3 int getContrast ...

Page 94: ...tParameters Changed content is not reflected until setParameters is executed void setContrast int Start camera camera Camera open Acquire current parameter or default value Camera Parameters params camera getParameters Acquire the current contrast value int contrast params getContrast contrast When the contrast value enters an available setting range it is set if contrast params getSupportedContra...

Page 95: ...format Camera camera in Camera service object Return value None Usage procedure void onPreviewFrame byte data Camera camera 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 c...

Page 96: ...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 We recommend acquiring image data through a sub thread You can use the following three APIs as the API that registers the callback method ...

Page 97: ...ue None Usage procedure Remarks To cancel image data acquisition register null as the callback method void setPreviewCallback Camera PreviewCallback cb 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 savePre...

Page 98: ...ired This registered callback method is only executed once Format Parameter Model name in out Explanation Camera PreviewCallback cb in Callback object that receives a preview image Return value None Usage procedure The same as the previous section However setOneShotPreviewCallback is used as the registered callback method void setOneShotPreviewCallback Camera PreviewCallback cb ...

Page 99: ...ta 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 Format Parameter Model name in out Explanation Camera PreviewCallback cb in Callback object that receives image data Return value None void setPreviewCallbackWithBuffer Camera PreviewCallback cb ...

Page 100: ... the height should both be higher than their respective resolutions Each time onPreviewFrame is called you need to re register the buffer If no buffer is registered the frame is corrupted and is not called by the callback method You can register multiple buffers App developer applies processing when acquiring image data private Camera PreviewCallback mPreviewCB new Camera PreviewCallback Override ...

Page 101: ...te callbackBuffer 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 Register the buffer to be used camera addCallbackBu...

Page 102: ...utomatically 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 when addCallbackBuffer is executed Errors and exceptions do not occur ...

Page 103: ...sition Format Parameter None Return value None Exception Exception occurred Explanation 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 void startDepthStreaming ...

Page 104: ...re make sure you execute this method to resume depth information acquisition You need to restart the application if the application closes in a RuntimeException 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 ca...

Page 105: ...w process void stopDepthStreaming 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...

Page 106: ...data Camera camera in Camera service object Return value None Usage procedure void onDepthMap byte data Camera camera App developer applies processing when acquiring depth information private Camera DepthCallback mDepthCB new Camera DepthCallback Override public void onDepthMap byte data Camera camera Log d TAG Save depth map synchronized lockObject saveDepthMap data Register the callback method a...

Page 107: ...is set by either EdoF mode or depth only mode 2 startPreview is executed 3 startDepthStreaming is executed 4 A callback method is registered in setDepthCallback In EDof mode receiving depth information display preview and receiving preview data can be executed in parallel For depth only mode preview display is unavailable To display depth data as an image you need to convert the data captured to i...

Page 108: ...lue None Usage procedure void setDepthCallback Camera DepthCallback cb App developer applies processing when acquiring depth information private Camera DepthCallback mDepthCB new Camera DepthCallback Override public void onDepthMap byte data Camera camera Log d TAG Save depth map synchronized lockObject saveDepthMap data Register the callback method at the optimal time camera setDepthCallback mDep...

Page 109: ...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 object is removed Note that the callback method is not canceled by canceling the preview or depth information acquisition ...

Page 110: ...ing to transfer to the depth information acquisition status The depth information acquisition can be used when the camera is in the mode that can receive depth information In EDof mode or depth only mode If the camera is in a mode that cannot acquire depth information side by side or single through an exception is generated If depth callback has already been registered during depth information acq...

Page 111: ...n acquisition Preview display Preview data acquisition Notes single through vga Preview only single through 720p single through 1080p single through 5m depth only Depth information only side by side Preview only EDof Simultaneous processing available Indicates that preview display may not be available depending on the resolution not ready previewing Receiving depth active Receiving and treating de...

Page 112: ...o IOException public class CameraTestActivity extends Activity private String TAG this getClass getName private Camera camera null private SurfaceHolder mHolder null private byte mPreviewData new byte 1920 1080 3 2 private byte mPreviewBuf new byte 1920 1080 3 2 private Object lockObject new Object Override protected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setCont...

Page 113: ... SurfaceHolder holder Log d TAG surfaceDestroyed camera stopPreview camera release camera null Override public void surfaceCreated SurfaceHolder holder Log d TAG surfaceDestroyed try camera Camera open camera setPreviewDisplay holder catch RuntimeException e e printStackTrace catch IOException e e printStackTrace camera addCallbackBuffer mPreviewBuf camera setPreviewCallbackWithBuffer mPreviewCB O...

Page 114: ...ra startPreview catch RuntimeException e e printStackTrace Override public boolean onCreateOptionsMenu Menu menu Inflate the menu this adds items to the action bar if it is present getMenuInflater inflate R menu menu_camera_test menu return true Override public boolean onOptionsItemSelected MenuItem item Handle action bar item clicks here The action bar will automatically handle clicks on the Home...

Page 115: ...re executing setParameters 5 When the preview has already started use stopPreview to temporarily stop the preview and then execute setParameters 6 Each camera mode has a limited combination of preview resolutions and frame rates Note that a run time exception will occur in setParameters for combinations that exceed the limit 7 You cannot set single through 5m or side by side as the preview resolut...

Page 116: ...tion 8 getExposureCompensationStep 9 getFlashMode 10 getFocalLength 11 getFocusAreas 12 getFocusDistances float output 13 getFocusMode 14 getHorizontalViewAngle 15 getInt String key 16 getJpegQuality 17 getJpegThumbnailQuality 18 getJpegThumbnailSize 19 getMaxExposureCompensation 20 getMaxNumDetectedFaces 21 getMaxNumFocusAreas 22 getMaxNumMeteringAreas 23 getMaxZoom 24 getMeteringAreas 25 getMinE...

Page 117: ...8 getVerticalViewAngle 49 getVideoStabilization 50 getWhiteBalance 51 getZoom 52 getZoomRatios 53 isAutoExposureLockSupported 54 isAutoWhiteBalanceLockSupported 55 isSmoothZoomSupported 56 isVideoSnapshotSupported 57 isVideoStabilizationSupported 58 isZoomSupported 59 remove String key 60 removeGpsData 61 set String key int value 62 set String key String value 63 setAntibanding String antibanding ...

Page 118: ...78 setJpegThumbnailSize int width int height 79 setMeteringAreas List Camera Area meteringAreas 80 setPictureFormat int pixel_format 81 setPictureSize int width int height 82 setPreviewFormat int pixel_format 83 setPreviewFpsRange int min int max 84 setPreviewFrameRate int fps 85 setPreviewSize int width int height 86 setRecordingHint boolean hint 87 setRotation int rotation 88 setSceneMode String...

Page 119: ...MOVERIO Pro Developer s Guide Rev 1 4 113 7 Sensor control ...

Page 120: ...geomagnetic sensor The IMU can detect tri axis acceleration and tri axis angular velocity The IMU allows high precision stance detection There is also a built in tri axis geomagnetic sensor which combined with the IMU allows for azimuth calculations IMU sensor data can be received same as normal sensors by using Android standard API The following shows the specifications for the IMU and the geomag...

Page 121: ... 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 The following shows the specifications for the ALS Sampling rate Range ALS Approx 1 Hz 0 to 65528 lx ...

Page 122: ...th 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 For sample code to detect tap refer to 7 4 sample code ...

Page 123: ...nsor type ID Hex Constant name IMU Accelerometer 0x00000001 TYPE_ACCELEROMETER Gyroscope 0x00000004 TYPE_GYROSCOPE Geomagnetic sensor Geomagnetic sensor 0x00000002 TYPE_MAGNETIC_FIELD ALS Sensor Illumination 0x00000005 TYPE_LIGHT Others Tap detection 0x00002001 TYPE_HEADSET_TAP Azimuth detection 0x00000003 TYPE_ORIENTATION You can acquire the above from the Android Sensor class 7 2 2 Import module...

Page 124: ... acquisition SensorManager sm SensorManager getSystemService SENSOR_SERVICE Registering an accelerometer TYPE_ACCELEROMETER Sensor s sm getDefaultSensor Sensor TYPE_ACCELEROMETER sm registerListener this s SensorManager SENSOR_DELAY_NORMAL 7 3 2 Acquiring a sensor value You can use the sensor value by acquiring a sensor event in onSensorChanged for SensorEventListener Example Acquiring a sensor va...

Page 125: ...Sensor type Unit Sensor value SensorEvent Array index TYPE_ACCELEROMETER m s2 X axis 0 Y axis 1 Z axis 2 TYPE_GYROSCOPE rad s X axis 0 Y axis 1 Z axis 2 TYPE_MAGNETIC_FIELD uT X axis 0 Y axis 1 Z axis 2 TYPE_LIGHT Lux Illuminance 0 TYPE_HEADSET_TAP When tap 1 0 TYPE_ORIENTATION degree Azimuth 0 359 degree 0 north 90 east 180 south 270 west 0 Inclination angle 180 180 degree 1 Rotation angle 90 90 ...

Page 126: ...rotected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout activity_main SensorManager sm SensorManager getSystemService SENSOR_SERVICE Sensor sensor sm getDefaultSensor Sensor TYPE_HEADSET_TAP sm registerListener this sensor SensorManager SENSOR_DELAY_NORMAL Override public void onSensorChanged SensorEvent event if event sensor getType Sensor TYPE_H...

Page 127: ...MOVERIO Pro Developer s Guide Rev 1 4 121 8 Bluetooth BLE ...

Page 128: ... 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 ...

Page 129: ...luetooth Legacy module and protocol stack Item Specifications Module specifications Bluetooth3 0 HS Bluetooth Class2 Protocol stack specifications Based on Core Spec Version 3 0 Table 8 2 Bluetooth Legacy protocol support Profile Role Version Headset Profile HSP Audio Gateway 1 1 Advanced Audio Distribution Profile A2DP Source 1 2 Human Interface Device HID Host 1 0 Object Push Profile OPP Client ...

Page 130: ...within communication range using the Advertise function for GAP General Access Profile not the function described in the BLE profile When the BT 2000 is within the Bluetooth communication area for a Beacon device the Beacon device is detected using Advertise data being broadcast by the Beacon device note 1 and then calculates the distance from the Beacon device using the strength of the radio wave...

Page 131: ...etooth Legacy function move your cursor over the ON OFF switch 2 and then press the select button 8 3 1 2 Searching using Bluetooth Legacy Press the Search for Devices button to search for Bluetooth Legacy devices in the area 8 3 1 3 Connecting using Bluetooth Legacy You can select the device you want to connect to in Available Devices and then perform pairing 8 3 1 4 Disconnecting using Bluetooth...

Page 132: ...con app screen Table 8 5 BLEBeacon app screen composition Item Explanation Scan Start Starts scanning for the BLE Beacon Scan Stop Stops scanning for the BLE Beacon Address Displays the Bluetooth Device Address Device Name m n Displays the Device Name and the Major Minor numbers Depends on the Advertise data configuration from the Beacon Distance Displays the determined distance and RSSI value Not...

Page 133: ...etermined 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 Immediate 127 to 70 Measured Power Near 51 to 90 Measured Power 20 Far 91 to 128 Unknown Could not receive Advertise data for more than three seconds Or the company identifier was not Apple 0x004C or Nor...

Page 134: ... 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 Figure 8 6 BLE confirmation dialog Bluetooth Low Energy is not enabled Do you want to enable Bluetooth Low Energy ...

Page 135: ...ust Works Passkey Entry Select search service Select the service that you want to use to search from the services included with the connected device Immediate Alert Service Tx Power Service Link Loss Service DiscPriSrvByUUID From the list of services on the connected device select the Service you want from Select search service DiscAllPriSrv Displays all services for the connected device ProfileAc...

Page 136: ...Level Set one of the following as the BLE Device Alert Level No Alert Mid Alert High Alert Select Sub procedure You can read the value for the selected sub procedure Current Alert Level You can read the value set for the current Alert Level Pairing setting request of BLE If you want to set the PasskeyInput DeviceName as pairs please enter the passkey necessary to the device 6 digit number 000000 9...

Page 137: ...s from Bluetooth Legacy in that the ON OFF switch is not installed on the system OS in 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 Data may not be exchanged depending on the timing Using...

Page 138: ...thLeErrorCodeDescription 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 import android bluetooth BluetoothLeGattService import andr...

Page 139: ... to the BLE device 11 disconnect Disconnects from the BLE device 12 setAuthType Sets the authentication type 13 notifyInputPasskey Sets the Pad Key entry 14 setGapCallback Registers a callback for the GAP function 15 discPriSrv char Searches for the Primary Service for the BLE device 16 discChar Searches for the Characteristic for the BLE device 17 discCharDesc Searches for the Characteristic Desc...

Page 140: ...8 11 android bluetooth BluetoothLeGattCallback for application interface list NO Callback function name Function summary 29 onDiscPriSrvResult Callback function for search results reception for Primary Service 30 onDiscCharResult Callback function for search results reception for Characteristic 31 onDiscCharDescResult Callback function for search results reception for Characteristic Descriptor 32 ...

Page 141: ...d Characteristic Descriptor Discovery Discover All Characteristic Descriptors discCharDesc Characteristic Value Read Read Characteristic Value readGatt char Read Using Characteristic UUID readUuidGatt Read Long Characteristic Values readGatt char char Read Multiple Characteristic Values Not supported Characteristic Value Write Write Without Response writeWithoutRspGat t Signed Write Without Respon...

Page 142: ...lue Model Explanation BluetoothLeAdapterManager Except for NULL Instances in the BluetoothLeAdapterManager class NULL Fails to acquire instance 8 8 2 isEnable Function Acquire BLE status enabled or disabled Format Parameters None Return value Model Explanation boolean true BLE enable false BLE disable BluetoothLeAdapterManager BluetoothLeAdapterManager getInstance void boolean isEnable void ...

Page 143: ...ion Enable BLE Format Parameters None Return value Model Explanation boolean true success false fail 8 8 4 disable Function Disable BLE Format Parameters None Return value Model Explanation boolean true success false fail boolean enable void boolean disable void ...

Page 144: ...eceive 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 BluetoothLeGapCallback onScanResult 8 8 6 stopScan Function Stop the BLE scan Advertise reception Format Parameters None Return value None void startScan void void stopScan void ...

Page 145: ...del Explanation String Except for NULL local device name NULL Fail 8 8 8 getBdAddress Function Acquire the local BD device Format Parameters None Return value Model Explanation String Except for NULL local BD device Text strings that include colons in the format 11 22 33 44 55 66 NULL Fail String getDeviceName void String getBdAddress void ...

Page 146: ... invalid parameter BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError INVALID_ADDR invalid remote BD address BluetoothLeChipCode BaseError NO_MEM maximum connections BluetoothLeChipCode BaseError BUSY system busy status Usage method To receive connection processing results you need to register the callback function in setGapCallback in advance The following ca...

Page 147: ...l Function Connection canceled while connecting to the BLE device Format Parameter Model name Explanation None Return value Model Explanation Int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_STATE invalid status int connectCancel void ...

Page 148: ...fy the following if there is a connection parameter that is not allowed BluetoothLeErrorCodeDescription SigDefinition CONN_INTERVAL_UNACCEPTABLE Return value Mode l Explanation Int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_PARAM invalid parameter BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid conne...

Page 149: ...thLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_PARAM invalid parameter BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Authentication classification Value Explanation BluetoothLeGapCallback AuthType JUSTWORKS Omit pin code BluetoothLeGapCallback AuthType PASSKEYENTRY PIN code authentication bo...

Page 150: ...S 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 Pass key type Value Explanation BluetoothLeGapCallback PassKeyType NONE None BluetoothLeGapCallback PassKeyType PASSKEY PIN code...

Page 151: ...d Format Parameter Model name Explanation BluetoothLeGapCallback callback Callback class Return value None Callback function used for GAP functions See the callback function descriptions in 8 8 24 to 8 8 28 for information on the callback function for GAP functions that can be registered to the BluetoothLeGapCallback class void setGapCallback BluetoothLeGapCallback callback ...

Page 152: ...oothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_PARAM invalid parameter BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results you need to register the callback function in setGattCallback in advance The fol...

Page 153: ...ipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_ADDR invalid memory address BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results you need to register the callback function in setGattCallback in advance The followi...

Page 154: ...eChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_ADDR invalid memory address BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results you need to register the callback function in setGattCallback in advance The foll...

Page 155: ...turn value Model Explanation int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_ADDR invalid memory address BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results you need to register the callback func...

Page 156: ...ue Model Explanation int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_ADDR invalid memory address BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results you need to register the callback function in ...

Page 157: ...xplanation int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_ADDR invalid memory address BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode BaseError INVALID_PARAM invalid parameter BluetoothLeChipCode BaseError DATA_SIZE exceeded data size BluetoothLeChipCode BaseError NO_TX_BUFFERS excee...

Page 158: ...de BaseError INVALID_STATE invalid status BluetoothLeChipCode BaseError BUSY system busy status BluetoothLeChipCode BaseError INVALID_PARAM invalid parameter BluetoothLeChipCode BaseError DATA_SIZE exceeded data size BluetoothLeChipCode BaseError NO_TX_BUFFERS exceeded buffer capacity BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle Usage method To receive search results ...

Page 159: ...r handle Handle location for Characteristic Value Return value Model Explanation int BluetoothLeChipCode SUCCESS success BluetoothLeChipCode BaseError INVALID_STATE invalid status BluetoothLeChipCode STKError INVALID_CONN_HANDLE invalid connection handle BluetoothLeChipCode STKError INVALID_ATTR_HANDLE invalid attribute handle int confirmation char connectedHandle char handle ...

Page 160: ...nted Format Parameter Model name Explanation BluetoothLeGattCallback callback Callback class Return value None Callback function for the GATT function See the callback function descriptions in 8 8 29 to 8 8 35 for information on the callback function for GATT functions that can be registered to the BluetoothLeGattCallback void setGattCallback BluetoothLeGattCallback callback ...

Page 161: ...classification String addr Remote BD address int rssi Received radio wave strength dBm boolean scan_rsp Scan response data true Received PDU is SCAN_RSP false Received PDU is anything except for SCAN_RSP AdvType adv_type Advertise type AdvType ADV_IND AdvType ADV_DIRECT_IND AdvType ADV_SCAN_IND AdvType ADV_NONCONN_IND AdvType SCAN_RSP AdvType UNKNOWN byte adv_data Advertise data 31octet void onSca...

Page 162: ...eDescription ChipDefinition AUTHENTICATE_TIME_OUT BluetoothLeErrorCodeDescription ChipDefinition AUTHENTICATE_PDU_INVALID BluetoothLeErrorCodeDescription ChipDefinition CONNECTION_TIMEOUT BluetoothLeErrorCodeDescription ChipDefinition PASSKEY_ENTRY_FAILED BluetoothLeErrorCodeDescription ChipDefinition OUT_OF_BAND_KEY_NOT_AVAILABLE BluetoothLeErrorCodeDescription ChipDefinition AUTHENTICATION_REQUI...

Page 163: ... 4 157 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 ...

Page 164: ...g Flag during reconnecting true During reconnecting false not reconnecting Disconnection reason Disconnection reason BluetoothLeErrorCodeDescription SigDefinition CONNECTION_TIMEOUT BluetoothLeErrorCodeDescription SigDefinition CONNECTION_TERMINATED_BY_LOCAL_HOST BluetoothLeErrorCodeDescription SigDefinition LMP_LL_RESPONSE_TIMEOUT are the main values For details on other values see Specification ...

Page 165: ...assKeyType Pass key type Pass key type Value Explanation BluetoothLeGapCallback PassKeyType NONE None BluetoothLeGapCallback PassKeyType PASSKEY PIN code 8 8 28 BluetoothLeGapCallback onPasskeyDisplay Function Provide an interface for the callback function to display pass key reception Format Parameter Model name Explanation String passKey Key string void onPasskeyInput PassKeyType passKeyType voi...

Page 166: ...ted public static final int BLE_GATT_STATUS_ATTERR_READ_NOT_PERMITTED 0x0102 ATT Error Write not permitted public static final int BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED 0x0103 ATT Error Used in ATT as Invalid PDU public static final int BLE_GATT_STATUS_ATTERR_INVALID_PDU 0x0104 ATT Error Authenticated link required public static final int BLE_GATT_STATUS_ATTERR_INSUF_AUTHENTICATION 0x0105 ATT...

Page 167: ...1_END 0x017F ATT Error Application range begin public static final int BLE_GATT_STATUS_ATTERR_APP_BEGIN 0x0180 ATT Error Application range end public static final int BLE_GATT_STATUS_ATTERR_APP_END 0x019F ATT Error Reserved for Future Use range 2 begin public static final int BLE_GATT_STATUS_ATTERR_RFU_RANGE2_BEGIN 0x01A0 ATT Error Reserved for Future Use range 2 end public static final int BLE_GA...

Page 168: ...etoothLeGattChar Member s name Explanation byte uuid UUID 16bit only char handleDecl Handle for Characteristic Declaration char handleValue Handle for Characteristic Value CharacteristicProperties properties Characteristic setting information Characteristic setting information class BluetoothLeGattChar CharacteristicProperties Function name Explanation boolean IsBrodcast Determine if anything is b...

Page 169: ... Explanation char connectedHandle Connection handle int status Search results Returns the value defined in BluetoothLeChipCode GattStatus BluetoothLeGattDesc data Characteristic Descriptor information Characteristic Descriptor information class BluetoothLeGattDesc Member s name Explanation byte uuid Characteristic Descriptor UUID char handle Handle for Characteristic Descriptor void onDiscCharDesc...

Page 170: ...ormat Parameter Model name Explanation char connectedHandle Connection handle int status Search results Returns the value defined in BluetoothLeChipCode GattStatus BluetoothLeGattEvtReadRsp data Read Response data Read Response data class BluetoothLeGattEvtReadRsp Member s name Explanation byte data Read Response data char handle Handle char offset Data offset void onReadGattResult char connectedH...

Page 171: ...tion results reception of Characteristic Value using readUuidGatt API Related API readUuidGatt Format Parameter Model name Explanation char connectedHandle Connection handle int status Search results Returns the value defined in BluetoothLeChipCode GattStatus byte data Characteristic Value data void onReadUuidGattResult char connectedHandle int status byte data ...

Page 172: ...r Model name Explanation char connectedHandle Connection handle int status Search results Returns the value defined in BluetoothLeChipCode GattStatus BluetoothLeGattEvtWriteRsp data Write Response data Write Response data class BluetoothLeGattEvtWriteRsp Member s name Explanation byte data Write data char handle Handle char offset Data offset byte writeOp Write operation code void onWriteGattResul...

Page 173: ...onfirmation API Related API confirmation Format Parameter Model name Explanation char connectedHandle Connection handle int status Search results Returns the value defined in BluetoothLeChipCode GattStatus hvxEvtType type Indication Notification classification byte data Characteristic handle value void hvxEvt char connectedHandle int status char handle hvxEvtType type byte data ...

Page 174: ...anager mManager BluetoothLeAdapterManager getInstance if mManager isEnable BLE Off if mManager enable Error processing display error message for BLE On failure else BLE On 8 9 2 Disabling BLE Call isEnable and acquire the current status Since BLE is enabled when this function returns true call disable to disable BLE Instance acquisition for the BLE manager class BluetoothLeAdapterManager mManager ...

Page 175: ...vedInstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GAP function provided mManager setGapCallback mLeGapCallback private void scanLe final boolean enable if enable Start scanning mManager starScan else Stop scanning mManager stopScan Receive scan results using the following callback and output the received signa...

Page 176: ...droid bluetooth BluetoothLeGattCallback public class MainActivity extends Activity private BluetoothLeAdapterManager mManager private boolean mConnectingFlg false Override protected void onCreate Bundle savedInstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GAP function provided mManager setGapCallback mLeGapCall...

Page 177: ... 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: ...tate Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Searching for Primary Service Set the connection handle ConnectedHandle in connected event status connStatus acquired in onConnectResult mManager discPriSrv ConnectedHandle char 1 Use the following callback to...

Page 179: ...InstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Searching for Characteristic Set StartHandle and EndHandle from the Service information acquired in onDiscPriSrvResult mManager discChar ConnectedHandle StartHandle EndHandle Use the following callbac...

Page 180: ...e savedInstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Searching for Characteristic Descriptor Set StartHandle and EndHandle from the acquired onDiscPriSrvResult mManager discCharDesc ConnectedHandle StartHandle EndHandle Use the following callback...

Page 181: ...de protected void onCreate Bundle savedInstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Acquire READ Characteristic Value Set the handle HandleValue in Characteristic Value from the Characteristic information acquired in onDiscCharResult mManager re...

Page 182: ...ted void onCreate Bundle savedInstanceState Instance acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Acquire READ Characteristic Value Set StartHandle and EndHandle from the acquired onDiscPriSrvResult Set the UUID for the Characteristic information acquired in onDiscCha...

Page 183: ...e acquisition for the BLE manager class mManager BluetoothLeAdapterManager getInstance Register a callback for the GATT function provided mManager setGattCallback mLeGattCallback Writing a Characteristic Value Set the handle HandleValue in Characteristic Value from the Characteristic information acquired in onDiscCharResult mManager writeGatt ConnectedHandle HandleValue 0x01 Use the following call...

Page 184: ...MOVERIO Pro Developer s Guide Rev 1 4 178 9 Power control ...

Page 185: ...sconnected int EXTRA_PLUGGED Battery A status Status String EXTRA_STATUS_A Battery A installed Battery installed boolean EXTRA_PRESENT_A Amount of power remaining in battery A Power remaining int EXTRA_LEVEL_A Battery A current Current mA int EXTRA_CURRENT_A Battery A voltage Voltage mV int EXTRA_VOLTAGE_A Battery A temperature Temperature deg C int EXTRA_TEMPERATURE_A Battery B status Status Stri...

Page 186: ...tentFilter filter addAction Intent ACTION_BATTERY_CHANGED registerReceiver mBroadcastReceiver filter Acquire broadcast battery information Example Acquiring the amount of power remaining status and installation status for battery A Override public void onReceive Context context Intent intent int level_a intent getIntExtra BatteryManager EXTRA_LEVEL_A 0 String status_a intent getStringExtra Battery...

Page 187: ...MOVERIO Pro Developer s Guide Rev 1 4 181 10 Self diagnostic function ...

Page 188: ...ireless LAN module WLAN Check communication with device Bluetooth 3 0 Bluetooth Check communication with device Bluetooth Low Energy BLE Check communication with device Audio IC Audio IC Reading device information characteristics Audio commands IC Voice Command Reading device information characteristics Sensor Sensor MCU Communication check IMU sensor IMU Acquire sensor data Sensor Illumination Se...

Page 189: ...unction The self diagnostic function is provided as an app Start SelfDiagnosis from the app list Figure 10 1 Start SelfDiagnosis app When the app starts click the Start button at the top of the screen to start the diagnostic procedure Figure 10 2 Start SelfDiagnosis app screen ...

Page 190: ...r s Guide Rev 1 4 184 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 3 SelfDiagnosis check results ...

Page 191: ...MOVERIO Pro Developer s Guide Rev 1 4 185 11 GPS Assist ...

Page 192: ...rst 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 Figure 11 1 EPO Data download image Access point EPO Data Delivery server Internet Intranet WirelessLAN Smartphone Tethering ...

Page 193: ...tart and warm start Setting time It uses time information to simulate GPS satellite position So it is necessary to set the system time accurately Downloading EPO data EPO data validity period is 30 days But as the GPS assist function effect is higher by using new data so please re download the EPO data by 1 week as a guide EPO data delivery server BT 2000 can download EPO data by internet from EPS...

Page 194: ...ON EPO data delivery server When placing EPO data to intranet connection to intranet is required Open Setting App and select Position information service Turn GPS function ON and select AGPS data update 11 3 2 Writing EPO data While writing EPO data to BT 2000 the icon will be displayed in system bar Writing is completed after the icon disappears 11 3 3 Using EPO data Start App using GPS GPS assis...

Page 195: ...ult None It is generated with the default value when Settings AGPS data update is executed File format Conform to notation of java util Properies Use to write colon Table 11 1 Setting items in agps conf No Item Explanation 1 EPO_URL Set URL of EPO data delivery server Default value is https tech moverio epson com epo data bin 2 EPO_NUM_SEGS Set EPO writing segment number 1 28 1 segment 6 hours Def...

Page 196: ...m epson moverio bt2000 agpsctl Table 11 2 Interface list of AGPSControl class NO Function name Function summary Note 1 downloadEpo Download EPO data by setting according to agps conf setting file EPSON original API 2 downloadEpo_url Download EPO data from URL specified by argument EPSON original API 3 writeEpo Write EPO data to BT 2000 by setting according to agps conf setting file EPSON original ...

Page 197: ...t Intent Intent Status AGPS_DOWNLOAD_COMPLETED download completed AGPS_DOWNLOAD_ERROR download error AGPS_CONF_ERROR agps conf error agps conf not exist or defect in EPO_URL AGPS_NETWORK_ERROR Error by Wi Fi OFF AGPS_FILE_NOT_UPDATED No update in server file 11 6 2 downloadEpo_url Function Download EPO data from the URL of parameter Format Parameter Type name Explanation String arg0 URL of EPO dat...

Page 198: ...ONF_ERROR agps conf error No agps conf or the number of EPO_NUM_DAYS is not crrect AGPS_FILE_EXPIRED EPO file is old Expired at the present time there is no data for the specified period 11 6 2 2 writeEPO_segs Function Writes EPO data for the number of segments specified by the argument to the GPS module of BT 2000 One segment means the 6 hours Format Parameter R Broadcast Intent Same as writeEPO ...

Page 199: ...st 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 catch Exception ex ex printStackTrace ...

Page 200: ...ntation example private MyReceiver receiver new MyReceiver private IntentFilter filter new IntentFilter protected void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout activity_main filter addAction AGPSControl AGPS_CONF_ERROR filter addAction AGPSControl AGPS_DOWNLOAD_COMPLETED filter addAction AGPSControl AGPS_DOWNLOAD_ERROR filter addAction AGPSContro...

Page 201: ...TED Toast makeText getApplicationContext AGPS_DOWNLOAD_COMPLETED Toast LENGTH_LONG show Log d TAG Intent Received AGPS Download Completed Omit other intent 11 7 2 2 Re setting of receiver due to application situation transition Cancel intent receiver when application situation transit like becoming background Receiver cancellation example Override protected void onPause super onPause getApplicatio...

Page 202: ...MOVERIO Pro Developer s Guide Rev 1 4 196 Memo ...

Reviews: