Installing OSH on Android (v.1.3.2)

The OpenSensorHub (OSH) App (v 1.3.2) can be deployed on Android devices and can stream real-time observations from a phone or tablet to a remote OSH hub on the web. These observations can come from sensors on-board the Android device itself, for example:

  • video camera
  • GPS or network location
  • gyroscope, accelerometer
  • magnetometer
  • geospatial orientation

or from other sensors connected through USB or Bluetooth, such as:

  • FLIR Thermal Camera (USB)
  • TruPulse 360 Laser Range Finder (Bluetooth)
  • Health monitoring bands (Bluetooth)

This blog provides information on how to install and configure OSH (v.1.3.2) on the Android devise.

Establishing access to an OSH Hub

The OSH-Android App is currently implemented as an SOS-T client, which means that it does not store and provide access to the observations, but rather pushes these observations in real time to a remote OSH hub on the web. Thus, for OSH-Android App (v.1.3.2) to work, one must provide a URL link to an existing OSH hub that will receive, store, and allow access to these observations through a standard SOS interface.

Note that an updated version of this blog will be available with the soon-to-be released v2.0 which will provide full OSH capabilities for Android devices.

If you do not have an accessible OSH hub available, you can easily install one by retrieving the zipped “osh-base-install-1.3.2.zip (or higher) version at the GitHub release site and then following the Install Instructions. Note: the installation essentially consists of unzipping the file and running ./launch.bat. The rest of the instructions is a series of tests to see if its working.

Installing OSH-Android using APK

For the latest OSH-Android APK, clicked here on your Android device. This will download the App and walk you through installation.

Configuring OSH-Android

Click on the three dots which pops up the main menu. Pick “Settings”.

This brings you to a submenu for setting general properties or sensor-related properties. Pick “General”.

This form (below) is where you provide a user-friendly name for your device and the information required to send the observation data to a valid SOS-T service (an OSH hub for instance). The SOS Endpoint provides the URL to the hub where the data can be stored and retrieved. OSH hubs by default require secure http and are typically setup using the port number and path given in the example.

While one can establish additional roles and usernames for the endpoint OSH Hub, by default, OSH establishes a “sensor” user with permission to access all SOS capabilities. Enter the name and password for this user. Note: this would be established by the administrator of the end point OSH Hub.

Step back (using the arrow on the bottom left) to the “Settings” submenu, and select “Sensors”. This is where you can decide which internal and external sensor observations you want to support. This selection will automatically create one or more output Data Records that will be sent in real-time to the endpoint SOS-T server (typically an OSH Hub). One can also choose which Video Codec to use for the video stream … H264 (which is most efficient) or mjpeg (which is less efficient but easier to work with).

Note: the three sensors selected below will provide location, geospatial orientation, and HD video needed to support “body cam” or “dash cam” or “drop cam” applications as shown here.

Now step back to the main menu and select “Start SensorHub”. This should show a display similar to the one below. Ignore the error displayed below … it is incorrect and needs to be removed in code … it will not affect the data sent to the OSH Hub.

At this point, assuming no other issues, the sensors that that you selected will be streaming real-time data to the endpoint SOS-T server.

Note: will add a section on retrieving your observations from the OSH Hub.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: