Jam Detection#

This module includes functions for signal jamming detection feature.

The functions in this module are available when jam-detection feature (OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE) is enabled.

Typedefs#

typedef void(*
otJamDetectionCallback)(bool aJamState, void *aContext)

This function pointer is called if signal jam detection is enabled and a jam is detected.

Functions#

otJamDetectionSetRssiThreshold(otInstance *aInstance, int8_t aRssiThreshold)

Set the Jam Detection RSSI Threshold (in dBm).

int8_t
otJamDetectionGetRssiThreshold(otInstance *aInstance)

Get the Jam Detection RSSI Threshold (in dBm).

otJamDetectionSetWindow(otInstance *aInstance, uint8_t aWindow)

Set the Jam Detection Detection Window (in seconds).

uint8_t
otJamDetectionGetWindow(otInstance *aInstance)

Get the Jam Detection Detection Window (in seconds).

otJamDetectionSetBusyPeriod(otInstance *aInstance, uint8_t aBusyPeriod)

Set the Jam Detection Busy Period (in seconds).

uint8_t
otJamDetectionGetBusyPeriod(otInstance *aInstance)

Get the Jam Detection Busy Period (in seconds)

otJamDetectionStart(otInstance *aInstance, otJamDetectionCallback aCallback, void *aContext)

Start the jamming detection.

otJamDetectionStop(otInstance *aInstance)

Stop the jamming detection.

bool
otJamDetectionIsEnabled(otInstance *aInstance)

Get the Jam Detection Status (enabled/disabled)

bool
otJamDetectionGetState(otInstance *aInstance)

Get the Jam Detection State.

uint64_t
otJamDetectionGetHistoryBitmap(otInstance *aInstance)

Get the current history bitmap.

Typedef Documentation#

otJamDetectionCallback#

typedef void(* otJamDetectionCallback) (bool aJamState, void *aContext) )(bool aJamState, void *aContext)

This function pointer is called if signal jam detection is enabled and a jam is detected.

Parameters
TypeDirectionArgument NameDescription
[in]aJamState

Current jam state (true if jam is detected, false otherwise).

[in]aContext

A pointer to application-specific context.


Function Documentation#

otJamDetectionSetRssiThreshold#

otError otJamDetectionSetRssiThreshold (otInstance * aInstance, int8_t aRssiThreshold)

Set the Jam Detection RSSI Threshold (in dBm).

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

int8_t[in]aRssiThreshold

The RSSI threshold.


otJamDetectionGetRssiThreshold#

int8_t otJamDetectionGetRssiThreshold (otInstance * aInstance)

Get the Jam Detection RSSI Threshold (in dBm).

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

Returns

  • The Jam Detection RSSI Threshold.


otJamDetectionSetWindow#

otError otJamDetectionSetWindow (otInstance * aInstance, uint8_t aWindow)

Set the Jam Detection Detection Window (in seconds).

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

uint8_t[in]aWindow

The Jam Detection window (valid range is 1 to 63)


otJamDetectionGetWindow#

uint8_t otJamDetectionGetWindow (otInstance * aInstance)

Get the Jam Detection Detection Window (in seconds).

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

Returns

  • The Jam Detection Window.


otJamDetectionSetBusyPeriod#

otError otJamDetectionSetBusyPeriod (otInstance * aInstance, uint8_t aBusyPeriod)

Set the Jam Detection Busy Period (in seconds).

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

uint8_t[in]aBusyPeriod

The Jam Detection busy period (should be non-zero and less than or equal to Jam Detection Window)

The number of aggregate seconds within the detection window where the RSSI must be above threshold to trigger detection.


otJamDetectionGetBusyPeriod#

uint8_t otJamDetectionGetBusyPeriod (otInstance * aInstance)

Get the Jam Detection Busy Period (in seconds)

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

Returns

  • The Jam Detection Busy Period.


otJamDetectionStart#

otError otJamDetectionStart (otInstance * aInstance, otJamDetectionCallback aCallback, void * aContext)

Start the jamming detection.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

otJamDetectionCallback[in]aCallback

A pointer to a function called to notify of jamming state change.

void *[in]aContext

A pointer to application-specific context.


otJamDetectionStop#

otError otJamDetectionStop (otInstance * aInstance)

Stop the jamming detection.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.


otJamDetectionIsEnabled#

bool otJamDetectionIsEnabled (otInstance * aInstance)

Get the Jam Detection Status (enabled/disabled)

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

Returns

  • The Jam Detection status (true if enabled, false otherwise).


otJamDetectionGetState#

bool otJamDetectionGetState (otInstance * aInstance)

Get the Jam Detection State.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

Returns

  • The Jam Detection state (true jam is detected, ‘false’ otherwise).


otJamDetectionGetHistoryBitmap#

uint64_t otJamDetectionGetHistoryBitmap (otInstance * aInstance)

Get the current history bitmap.

Parameters
TypeDirectionArgument NameDescription
otInstance *[in]aInstance

A pointer to an OpenThread instance.

This value provides information about current state of jamming detection module for monitoring/debugging purpose. It returns a 64-bit value where each bit corresponds to one second interval starting with bit 0 for the most recent interval and bit 63 for the oldest intervals (63 sec earlier). The bit is set to 1 if the jamming detection module observed/detected high signal level during the corresponding one second interval.

Returns

  • The current history bitmap.