R7 Serial: API
For RockFLEET and RockAIR only.
The serial command API enables 3rd party control systems to interact with your RockAIR or RockFLEET device via an RS-232 or RS-485 serial interface.
The main purpose of the Serial API is to provide a method of sending and receiving hexadecimal or binary encoded data through your device. It is designed to be deliberately restrictive, with the overriding principle being that the external control system should not compromise the autonomous tracking capability of the device.
π Enable Serial API mode via the CONNECT app
Connect to your tracker using the CONNECT app and ensure that Serial Mode is set to 'Serial API'.
Follow app menus: Configure>External Data>Serial Mode = Serial API
Serial API Interfaceβ
Device | Serial API Support | Serial Version |
---|---|---|
RockSTAR | NO | N/A |
RockFLEET (with appropriate configuration) | YES | RS232 RS485 |
RockAIR | YES | RS232 |
Interface Wiringβ
- RS232 versions are β3-wireβ with RX, TX and GND signals.
- RS485 versions are optoisolated, with A, B, Y, Z and GND signals.
Interface Settingsβ
For both serial interfaces, the recommended communication settings:
Serial Option | Settings |
---|---|
Baud Rate | 19200 Baud rate can be configured via the CONNECT app. |
Data Bits | 8 |
Parity | None |
Stop Bits | 1 |
Flow Control | None |
System Stateβ
Serial API functionality requires the device to be set to 'Unlimited Power'.
Serial API functionality will be paused in limited power configuration and when deactivated, GPS streaming will be turned off whenever the API is paused.
π§ Serial API can be enabled but not active!
The serial API feature can be enabled but its functionality may not be active on the serial port (paused) depending on system state. Whenever functionality does become active then an unsolicited message will now be issued to the serial port as a prompt for external equipment.
The message will include the current firmware version, for example:- "Version 03.04.19".
Serial API Commandsβ
π Carriage Return
All commands should be followed by an \r Carriage Return
Serial Command | Function |
---|---|
R7+GPS | Request position data |
R7+GPS,HOT | Check/change the GPS Hot setting |
R7+GPS,STREAM | Turn on GPS position data streaming to serial interface |
R7+TRACK,FREQ | Check/change the Tracking Frequency of the tracker |
R7+[WH|WHP|WHNC|WHNCP] | Transmit hex-encoded data with or without positional data and checksum |
R7+[WB|WBP|WBNC|WBNCP] | Transmit binary data with or without positional data and checksum |
R7+[WH|WHP|WHNC|WHNCP],ID=n or R7+[WB|WBP|WBNC|WBNCP],ID=n | Sets outbound message ID. Used in combination with send hex or binary data commands. |
R7+STAT | Checks status of outbound message |
R7+RH | Read inbound message |
R7+D | Delete inbound message |
R7+VERSION | Returns the Firmware Version |
Error Messagesβ
Error Type | Description |
---|---|
ERROR 0 | Data format error - eg. - Non-hex payload - Incorrect checksum provided - Binary payload timeout |
ERROR 1 | Device deactivated - will not be seen as device is unable to respond in deactivated state |
ERROR 2 | This error type will be returned in response to any R7+WH.. or R7+WB.. message commands if the database is full. |
ERROR 3 | This error will be returned to indicate rejection of a message command when the submitted ID is a duplicate of one already in the DB and not yet sent. |