The ClearWatch 250 is the smallest self contained Iridium tracker in the world! It can transmit your location from anywhere in the world and is built on the latest satellite, antenna, and electronics technology.

The ClearWatch 250 is powered by an Iridium 9602 SBD modem which requires Iridium SBD service to send messages. We can provide this or you may choose an Iridium SBD service provider of your choice. If used with the portal, ensure that provider correctly configures the DirectIP address and port as described here: Device Routing - IP Addresses and Ports.

The current configuration appropriate for the ClearWatch 250 for Iridium DirectIP is: 66.165.183.84:4780

Out of the box your unit should be in off or storage mode. In order to power it up and start transmitting you will need to hold down the power button until power and GPS lights "fade up" (dark to bright). When you release the button it will start a position report cycle. The states of which are described below:

While the unit is powered on, it will go through progressive stages of acquiring signal, transmitting, and sleeping, as indicated by the Power and Message LED's.

1) Upon power up or wakeup from sleep, the Power LED will "fade up" until initialization is complete, after this the LED will indicate battery state (flashing up to 5 times if the battery is full).

2) Next, when GPS is enabled the GPS LED will fade up until satellites are acquired, at which point the number of flashes indicates the number of satellites acquired (up to 5) until a fix achieved, then the LED will stay on, solid.

3) Next, the Iridium modem will be enabled and the Satellite LED will fade up until signal is acquired. Once iridium signal is acquired, the LED will flash 1-5 times indicating signal level. The LED will stay on solid once a transmission has been successful.

4) If only one report or message was pending the unit will then sleep until the next transmission. On battery all LEDs will turn off. If plugged into an external power source, LEDs will reflect last state achieved. The last status can be displayed by briefly pressing the power button if the unit is on battery.

If transmission was successful your unit should appear on the map at its current location.

See the "Terminal Behavior" section below for more details on button and LED behavior.

Once an asset is configured and running, parameters can be set using the "Send Command" functionality. This will allow you to configure a number of parameters that control the behavior of the unit including:

- Normal Reporting Interval

- Timeouts for GPS and Iridium

- Number of attempts to make transmitting

- Whether to include altitude in reports (with altitude reports are 11 bytes, without 9 bytes)

1) Click on the down arrow next to the asset in the Assets list on the left. The default view will be for "Set Parameters."

2) Click the checkboxes next to the parameters to update and fill in values desired.

3) Click "Set Parameters" button on the left below the settings list.

Settings can be later confirmed by clicking on the "Get Parameters" button on the top right of the "Set Parameters" screen. The Last Queried and Last Response values will indicate the last time parameters were requested and the last time they were successfully sent from the Micro. The last successfully requested set of parameters will be used for default values for the settings.

2) After installing you can connect the unit using the USB cable, Windows should load the USB-Serial adapter driver.

3) Connect to the COM port for the unit using a terminal emulator.

To do this, grab a copy of TeraTerm Pro (https://www.ayera.com/teraterm/) or use your favorite terminal emulator.

Go into the device manager on your machine. Under Ports (COM & LPT) you should see something called ClearWatch 250 Serial Port, and the COM port number next to that.

Take that number and open the terminal emulator. If TeraTerm Pro it should show a “New Connection” window by default. Select the “Serial” radio button and then the COM Port from the drop down menu. Click OK.

2) After installing you can connect the unit using the USB cable, Windows should load the USB-Serial adapter driver.

3) Connect to the COM port for the unit using a terminal emulator.

To do this, grab a copy of TeraTerm Pro (https://www.ayera.com/teraterm/) or use your favorite terminal emulator.

USB Serial:
Go into the device manager on your machine. Under Ports (COM & LPT) you should see something called ClearWatch 250 Serial Port, and the COM port number next to that. Take that number and open the terminal emulator. If TeraTerm Pro it should show a “New Connection” window by default. Select the “Serial” radio button and then the COM Port from the drop down menu. Click OK.

If the unit is transmitting you should see lines scrolling past starting with G# and I# (G=GPS, I=Iridium). Otherwise, you may see nothing, or once every 10 seconds a B# line. You can check that the unit is responding by hitting enter, you should see it show a prompt for each enter that looks like a >

Leave this open for the moment.

4) Download the firmware link provided (please contact GSE, support for a copy)

5) Run the "flash_firmware" script in the extracted folder, it should bring up a window asking you to to issue a command to the unit, don't hit enter yet.

6) Return to the terminal window and put the unit into firmware upload mode (it will stay in this mode for 30 seconds) by typing:
pmu.reboot()

(followed by enter)

Windows should then try to load the firmware upload driver.

7) When the driver loading is complete, hit enter in the window for the "flash_firmware" script.

You should see a progress bar as the firmware is uploaded, it should end with something similar to:

<1 second: flash LEDs showing last state before sleep >=1 second: From off/storage, resume transmit/sleep (Power and GPS LEDs will "fade up" to indicate this will happen when button is released). From sleep or wake, enter off mode (power and GPS LEDs will "fade down") >=10 seconds: From any mode. Enter storage mode (Power, GPS, Satellite and Message LEDs will "fade down" to indicate the mode is selected)

Check in (check)

Set the checkin bit for next transmission.

Config (gear)

Hold for >=10 seconds (message LED will fade up) to enable Bluetooth pairing. Hold for >=10 seconds while in pairing mode to disable pairing (led will fade down)

Check in (check) + Config (gear)

If Alert mode is disabled, pressing both and releasing will enable (Alarm will flash), transmit immediately. If Alert is enabled, pressing both and releasing disable. (Flashing state will be updated after buttons are released)

When you depress the Power button for more than 1 second, the unit will either turn off if it is currently on and go into a deep sleep without transmitting, or if it is currently sleeping, will wake the unit and immediately transmit a position.

When you depress the Check In button WHILE the unit is on, the next successful transmission report will contain a bit flag indicating that it is a Check In message. This mode will be cleared once a successful transmission is made. The MSG light will begin flashing slowly.

When you depress the Config + Check In button together for Alert mode, the unit will IMMEDIATELY begin transmitting it's current location even if it was sleeping. The MSG light will begin flashing rapidly. The unit will also use change the sleep interval to the value specified by "sos_sleep" time in seconds indicated in the "settings" function below. To exit Alert mode, depress the Config + Check In button together again and the MSG light will turn off again.

1: 0-19% battery 2: 20-39% battery 3: 40-59% battery 4: 60-79% battery 5: 80-100% battery When charging between flashes LED will glow with diminished brightness. When not charging, LED is off between flashes. When on external power and battery >=95% power LED will be solid on.

3) The unit may be low on power or off. Is the unit powering up and attempting a transmit cycle as described in the getting started section? If not, follow the getting started section to turn the unit on. If the unit only turns on for less than 10 seconds, make sure the unit has adequate charge (while on, Power LED should flash 2-5 times, if only flashing once, battery may be low).

4) The unit does not have a clear view of the sky. Ensure the unit have a clear view of the sky with the antenna pointed up and not obscured.

The core functionality is driven by a eLua console that connects to the RS232, USB CDC, and BLE SPP ports. Any characters entered on any of the ports will be echoed to all ports. From this console, you can run your first script by simply typing 'print("Hello World!")' and pressing enter to execute.

To connect to RS232, simply connect to a RS232 level port (+/- 12VDC, not TTL level) at 115200,8N1

To connect via USB, simply connect and install drivers from this page if you are running Windows, or if you are running Linux or Mac, the drivers are already included.

To connect via Bluetooth 4.0 (BLE), you will need to utilize developer libraries to achieve connectivity. As there is not a Serial Port Profile standard for Bluetooth 4.0, the utilized standard is documented here: Bluetooth Low Energy Serial Profile Standard. We do force pairing/authentication prior to allowing reading/writing the serial service. Also, when the unit is placed into low power mode, or is sleeping between position reports, the BLE module stays active and waiting for a connection. If you place the unit into factory sleep mode, then BLE will be powered off. Also, if an active connection is established, the BLE module will stop the unit from going to sleep, or will wake the device from sleep to process commands. To ensure good battery life, your application should disconnect automatically when it is not in use or becomes idle.

These options can be sent to the terminal via the "Send Command" function within the tracking platform, or entered through the RS232 serial connection, or the USB cable via CDC mode.

Our implementation is built around Lua the Lua 5.1 series (reference manual) and most language features are enabled except for math and os libraries.

NOTE: Commands sent from the tracking platform will not show command output anywhere other than on the serial console. However, messages can be composed using the ClearSight functions and the iridium transmit function can be used to send them.

// Store a message for Iridium transmission (MO) or local deliver (MT)
cache.cache( {termination}, {cache_message} )
termination:
cache.MO: (term=0) mobile originated, will be sent during next iridium transmit cycle
cache.MT: (term=1) mobile terminated
// Clear a message from the cache
cache.clearcache( { termination }, { id } )
Example:
destination = [[test@test.com]]
text_message = [[This is a test message]]
cache.cache(cache.MO,gsattrack.enctext( destination, text_message ))
This will be acknowledged with a message similar to the following:
C#T#SC#id:01,term:0,l:37,e:0
This message will be sent on the next schedule transmit cycle.
A transmit cycle can be triggered with the following:
pmu.pm9(1)
NOTE: Ensure that each line of an entered command does not exceed 128 characters.
Lua string construction can be split across lines in the following manner:
text_message = [[This is a really ]] ..
[[long message]]
Incoming or stored MT messages will be printed at the console repeatedly if the message begins
with an ASCII printable character as well as a hexadecimal representation of the message:
C#T#GC#id:00,term:1,msg:This is a test message
C#T#GC#id:00,term:1,msg:0x5468697320697320612074657374206d657373616765
C#T#GC#id:00,term:1,msg:This is a test message
C#T#GC#id:00,term:1,msg:0x5468697320697320612074657374206d657373616765
This message can be acknowledged and cleared using this command:
cache.clearcache( cache.MT, 0 )
This will be acknowledged with a:
C#T#CC#id:00,term:1
If additional messages were in the queue, the next id message would be displayed repeatedly until all have been cleared.

{ variable } = gpio.wakereason()
values:
gpio.UNKNOWN: no matching wake reason
gpio.POWERUP: unit was just powered on
gpio.RESETPIN: unit was reset using the reset button
gpio.WAKEPIN: unit was woken using the wake pin
gpio.RTC: unit was woken by RTC
gpio.POWERCONNECTED: unit was woken when power was connected

trigint:
/*
* Copyright (c) 2010 Dave Dribin
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
isqrt:
This product uses code for isqrt (integer square root) written by John Halleck,
which is being used by his permission.
/* Integer square root by Halleck's method, with Legalize's speedup */
/* http://www.cc.utah.edu/~nahaj/factoring/isqrt.legalize.c.html */
sha1:
/* This code is public-domain - it is based on libcrypt
* placed in the public domain by Wei Dai and other contributors.
*/
sha2:
/*
* FILE: sha2.c
* AUTHOR: Aaron D. Gifford - http://www.aarongifford.com/
*
* Copyright (c) 2000-2001, Aaron D. Gifford
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holder nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
pkcs5_pbkdf2:
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
hmac:
Based on RFC2104 example source code for hmac_md5 by Krawczyk, et. al.
unity:
/* ==========================================
Unity Project - A Test Framework for C
Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
[Released under MIT License. Please refer to license.txt for details]
========================================== */

COCOM limits are a GPS limitation by international law to disable GPS chipsets at high altitudes or high speeds.

The ClearWatch 250 will stop reporting if the unit exceeds 1,000 knots AND exceeds 18,000 meters. Both of these limits must be exceeded for COCOM limits to be enabled which will disable the internal GPS receiver until one of the two limits returns to normal.

Where an HMAC-SHA256 is computed over the (header byte not included) using a password/key shared by the device and server, and is truncated to the first 10 bytes (80-bits).

Passwords can be set on the on the unit using the Lua commands:

-- set custom password, up to 32 bytes (interface 2)
core.setpassword("<password>")
-- reset default password
core.resetpassword()
A hexadecimal representation of the default password will be displayed if the operation is successful:
RP#password:0x<hexadecimal representation of password>

No default key or password is set on the unit so a key must be set to enable the functionality.

-- set custom key, up to 32 bytes, represented as 64 hexadecimal characters (interface 3)
aes.sethexkey("<hexadecimal key>")
e.g.:
aes.sethexkey("37996FB42DDE61E890D2D88B9B5A83D16F3D35876D778E3E064677C37B50C424")
NOTE: DO NOT USE THE KEY ABOVE. If you require guidance on generating a secure key contact GSE for help.
A hexadecimal representation of the key will be displayed if the operation is successful:
M#RK#key:0x<hexadecimal representation of key>
By default if a key has been set, outgoing messages will be encrypted. To clear the key, it can be set to an empty string:
aes.sethexkey("")

header (byte): 2
interface version (byte): <version, currently: 2>
settings version (byte): <version, currently: 1>
setting 0 (signed 32 bit integer): <value of first setting>
...
setting N-1 (signed 32 bit integer): <value of Nth setting>
Current order:
0: defaultv
1: g_hdop // version 1 or later
2: g_timeout // version 1 or later
3: i_tx_timeout // version 1 or later
4: i_signal_timeout // version 1 or later
5: i_tx_retries // version 1 or later
6: sleep // version 1 or later
7: sos_sleep // version 1 or later
8: sleep_w_power // version 1 or later
9: led_mask // version 1 or later
10: i_rx_always // version 1,2 no effect, functional in version 3 or later
11: tx_altitude // version 1 or later
12: g_settle // version 1 or later
13: t_adc_id // version 1 or later (not currently used)
14: t_adc_threshold // version 1 or later (not currently used)
15: status_line // version 1 or later
16: low_bat_off // version 1 or later
17: g_hibernate_sleep // version 2 or later
18: cache_reports // version 2 or later
19: moving_sleep // version 3 or later
20: moving_thresh // version 3 or later
21: require_encrypted_mt // version 3 or later
22: g_on_always // version 3 or later
23: sleep_w_bat // version 4 or later
24: tx_seconds // Version 5 or later
25: report_format // Version 6 or later
26: extpwr_sleep // Version 8 or later: set this to a value other than 0 to override the
// "sleep" parameter between transmissions when external power is applied
27: extpwr_autostart // Version 9 or later: set this to 1 to trigger the unit to "power up"
// and start transmitting automatically the next time power is applied