RFS API
The RFS component defines the functionality of a RF sensor device, and it is
specified in src/protobuf/mdif/rfs/rfs.proto.
Protobuf specification
The following documentation is generated from the Protobuf specification in
src/protobuf/mdif/rfs/rfs.proto.
Table of Contents
mdif/common.proto
Common to all mdif protobuffers.
Status
Defines the status of a request
Name |
Number |
Description |
|---|---|---|
SUCCESS |
0 |
The request was successful |
FAILURE |
1 |
The request failed |
ERR_INVALID |
2 |
The request was invalid |
ERR_NOT_SUPPORTED |
3 |
The request is not supported |
ERR_NOT_IMPLEMENTED |
4 |
The request is not implemented |
ERR_NOT_READY |
5 |
The device is not ready to process the request |
ERR_SIZE |
6 |
The device cannot process the size |
mdif/rfs/rfs.proto
Message allocation for the RFS component are in the range:
Start |
End |
Radix |
|---|---|---|
0x80 |
0x9F |
Hex |
128 |
159 |
Dec |
RfsService
Defines the relationship between requests and responses in the RFS component
Method Name |
Request Type |
Response Type |
Description |
|---|---|---|---|
Start |
Use to start the RFS detection algorithms |
||
Stop |
Use to stop the RFS detection algorithms |
||
State |
Use to get current state of the RFS detection algorithms |
||
GetDroneInfo |
Use to get individual drone info |
||
RemoteIdStream |
Use to request a stream of remote ID messages. |
||
Mute |
Request muting of a detection. |
||
GetSignalInterference |
Use to request signal interference status |
DroneInfo
Description of a drone.
Field |
Type |
Description |
|---|---|---|
type_id |
Identifier for detection filter |
|
type_id_name |
Name of RF protocol/Family (e.g Lightbridge) |
|
drone_name |
Name of drone(s) (e.g Phantom 3) |
|
vendor_id |
Identifier to rf emitter vendor (e.g 1) |
|
vendor_id_name |
Name of rf emitter vendor (e.g DJI) |
|
band |
Bands where detector looks (e.g 2G4 and 5G8) |
|
category |
Category of threat. |
GetDroneInfoReq
Get individual drone description, just in time or loop through and build library.
Field |
Type |
Description |
|---|---|---|
type_id |
Id of detection filter associated with drone. 0 is first in library. |
GetDroneInfoRes
Response to GetDroneInfoReq
Field |
Type |
Description |
|---|---|---|
status |
||
drone_info |
Description of drone. |
|
next_drone_type_id |
Id to next drone, 0 indicates end of library. |
GetDronelistReq
Get drone descriptions for all drones in target device library. Deprecated, use GetDroneInfoReq instead
GetDronelistRes
Response to GetDronelistReq Deprecated
Field |
Type |
Description |
|---|---|---|
status |
||
drone_info |
GetSignalInterferenceReq
Request signal interference
The device will respond with a SignalInterference message
MuteInd
Indication that a mute status has changed.
Field |
Type |
Description |
|---|---|---|
muted |
Is muting enabled for this threat or type. |
|
id |
ID of the threat to mute, as received in RfsThreatInd, WifiThreatInd or RemoteIdInd. 0 is invalid, and means muting is done by type. |
|
type_id |
Type ID to mute. This shall be ignored if a valid (non-zero) ID is given. |
MuteReq
Request to mute or unmute a detection. Note that if a detection is muted by both ID and type, it will be necessary to unmute by both methods too. Setting id = 0 and type_id = 0 will mute all active threats, by ID where possible, and by type otherwise. Setting id = 0 and type_id = 0 when all active threats are already muted, will unmute all.
Field |
Type |
Description |
|---|---|---|
mute |
Enable or disable muting. |
|
id |
ID of the threat to mute, as received in RfsThreatInd, WifiThreatInd or RemoteIdInd. 0 to mute by type, only. |
|
type_id |
Type ID to mute. This will also mute future threats of this type. This will be ignored if a valid (non-zero) ID is given. |
MuteRes
Response to MuteReq.
Field |
Type |
Description |
|---|---|---|
status |
Status of the request. |
RemoteIdInd
Remote ID indication with binary message pack.
Field |
Type |
Description |
|---|---|---|
mac_adr |
MAC address from which the remote ID was received. |
|
payload |
Remote ID message pack, as per ASTM-F3411 |
|
id |
ID of detection. Unique for this sensor, not across sensors. |
|
transport_type |
Transport type of RID message. |
|
muted |
Mute status of this threat. |
RemoteIdStreamReq
Request that remote ID results be streamed from the device.
Field |
Type |
Description |
|---|---|---|
enable |
Enable or disable the stream. |
RemoteIdStreamRes
Response to RemoteIdStreamReq.
Field |
Type |
Description |
|---|---|---|
status |
Status of the request. |
RfsMsg
Rfs wire format messages
This message dictates the final format on the wire for rfs messages. It is a oneof construct to wrap a single message at a time.
Every request (req) has a corresponding response (res). The req/res pairs are defined in the RfsService through RPC patterns.
Indications (ind) are pushed without a request at any time
Field |
Type |
Description |
|---|---|---|
start_req |
Request RFS start |
|
start_res |
RFS start response |
|
stop_req |
Request RFS stop |
|
stop_res |
RFS stop response |
|
get_dronelist_req |
Deprecated. use GetDroneInfoReq instead |
|
get_dronelist_res |
Deprecated. |
|
get_drone_info_req |
Get individual drone info |
|
get_drone_info_res |
Individual drone info response |
|
rfs_threat_ind |
RFS threat indication |
|
wifi_threat_ind |
Wifi threat indication |
|
threat_stopped_ind |
Threat stopped indication |
|
remote_id_stream_req |
Remote drone ID stream start - Request |
|
remote_id_stream_res |
Remote Drone ID stream start - Response |
|
remote_id_ind |
Remote Drone ID detection - Indication |
|
mute_req |
Request to mute a detection |
|
mute_res |
Response to muting |
|
state_req |
State request |
|
state_res |
State response |
|
mute_ind |
Indication of a mute status change |
|
wp_led_id_req |
Wolfpack set led identify |
|
wp_led_id_res |
Wolfpack led identify response |
|
signal_interference_req |
Request signal interference information |
|
signal_interference_res |
Signal interference status |
|
signal_interference_ind |
Signal interference indication |
RfsThreatInd
Post rfs threat indication.
Field |
Type |
Description |
|---|---|---|
id |
ID of detection. Unique for this sensor, not across sensors. |
|
type_id |
Detection type id. May be be used to look up description with GetDroneInfoReq. |
|
power |
Power at time of reporting, dB. |
|
current_band |
Band(s) where detection occurs. |
|
relative_bearing |
Relative bearing from device to threat. |
|
start_ts |
Earliest observation of this detection. |
|
last_seen_ts |
Latest observation time of this detection. |
|
muted |
Mute status of this threat. |
RfsThreatInd.RelativeBearing
Field |
Type |
Description |
|---|---|---|
valid |
Current validity of the bearing calculation. |
|
bearing |
Calculated bearing. Degrees from center of device. Positive is counter-clockwise. |
|
var_bearing |
Variance in bearing. |
|
ts |
Timestamp when bearing was last updated. |
SignalInterference
Signal interference status
This message is the response to a GetSignalInterferenceReq message or used in
an indication.
Indication will be sent when the signal interference status changes.
Field |
Type |
Description |
|---|---|---|
signal_interference |
SignalInterferenceBand
Single band of signal interference status
Field |
Type |
Description |
|---|---|---|
band |
||
interference_status |
0 = no interference, 1 = interference detected |
|
min_gain |
||
max_gain |
||
avg_gain |
||
threshold |
||
num_over |
||
num_under |
StartReq
Request RFS start detection.
StartRes
Response to StartReq
Field |
Type |
Description |
|---|---|---|
status |
StateReq
Request RFS start detection.
StateRes
Response to StartReq
Field |
Type |
Description |
|---|---|---|
status |
||
state |
StopReq
Request RFS stop detection.
StopRes
Response to StopReq
Field |
Type |
Description |
|---|---|---|
status |
ThreatStoppedInd
Post stop of threat indication.
Field |
Type |
Description |
|---|---|---|
id |
Instance of detection thread. |
WifiThreatInd
Post wifi threat indication.
Field |
Type |
Description |
|---|---|---|
id |
ID of detection. Unique for this sensor, not across sensors. |
|
type_id |
Detection type id. May be used to look up more info with GetDroneInfoReq. |
|
power |
Received signal strength indication. dB. |
|
channel |
Wifi channel as per international standards 802.11 a/b/g/n. |
|
mac_adr |
Mac address of wifi threat. |
|
start_ts |
Earliest observation of this detection. |
|
muted |
Mute status of this threat. |
WpLedIdentifyReq
Send LED indentify signal to a Wolfpack Identify = 1 will make the Wolfpack flash green for 30 min, either with the red flash in default mode, or alone in darkmode. Identify = 0 will disable the green flash.
Field |
Type |
Description |
|---|---|---|
identify |
Enable/disable the Wolfpack green LED flash. |
WpLedIdentifyRes
Response to WpLedIdentifyReq
Field |
Type |
Description |
|---|---|---|
status |
Status for the WpLedIdentifyReq, if no PMU is connected it will fail. |
RidTransportType
Name |
Number |
Description |
|---|---|---|
TRANSPORT_UNKNOWN |
0 |
Bluetooth classic transport |
TRANSPORT_BEACON |
1 |
Wi-Fi beacon transport |
TRANSPORT_NAN |
2 |
Wi-Fi NaN transport |
TRANSPORT_BT_CLASSIC |
3 |
Bluetooth classic transport |
TRANSPORT_BT_EXT |
4 |
Bluetooth extended transport, THIS IS NOT PART OF THE REMOTE ID STANDARD, see ASTM-F3411 (section 5.4.7.1) |
TRANSPORT_BT_CLASSIC_CODED_PHY |
5 |
Bluetooth classic coded PHY transport |
TRANSPORT_BT_EXT_CODED_PHY |
6 |
Bluetooth extended coded PHY transport |
ScanBand
Enumeration of frequncies bands scanned.
Name |
Number |
Description |
|---|---|---|
Invalid |
0 |
Default, before overwriting with detection band. |
MHz433 |
1 |
ISM band 433MHz |
MHz900 |
2 |
ISM band 868-915MHz |
MHz1200 |
3 |
ISM band 1.2GHz |
MHz2400 |
4 |
ISM band 2.4GHz |
MHz5800 |
5 |
ISM band 5.8GHz |
MHz5200 |
6 |
ISM band 5.2GHz |
StartMode
Enumeration of possible start-modes.
Name |
Number |
Description |
|---|---|---|
Default |
0 |
RFS runs on internal antenna and external if present |
ExtAntOnly |
1 |
RFS runs on external antenna only. Will signal error if not present |
IntAntOnly |
2 |
RFS runs on internal antenna only, even if external is present |
UAVModeSearch |
3 |
RFS runs on internal antenna in search/direction finding mode |
State
Enumeration of system status
Name |
Number |
Description |
|---|---|---|
MAIN_STATE_IDLE |
0 |
|
MAIN_STATE_RUNNING |
1 |
|
MAIN_STATE_STOPPING |
2 |
|
MAIN_STATE_STARTING |
3 |
|
MAIN_STATE_START_ERROR |
4 |
ThreatCategory
Enumeration of the categories of threats that may be reported.
Name |
Number |
Description |
|---|---|---|
CategoryInvalid |
0 |
Invalid. |
CategoryDrone |
1 |
Drone / UAV. |
CategoryController |
2 |
Controller / ground station. |
CategoryDroneOrController |
3 |
Drone or controller. Source indeterminate. |
CategoryWifi |
4 |
Wi-Fi signal from either drone or controller. |
CategoryTest |
5 |
MyDefence test signal. |
Scalar Value Types
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
|---|---|---|---|---|---|---|---|---|
double |
double |
float |
float64 |
double |
float |
Float |
||
float |
float |
float |
float32 |
float |
float |
Float |
||
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
|
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
|
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
|
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
||
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
|
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |