skeletonKey
BEng Dissertation; Pen-testing device
Public Member Functions | Private Member Functions | Private Attributes
SubGHzTools Class Reference
Collaboration diagram for SubGHzTools:

Public Member Functions

 SubGHzTools ()
 Construct a new SubGHz Tools object.
 
void init ()
 Initialisation of the SubGHzTools object.
 
void startJamming ()
 Enable jamming with the CC1101 module.
 
void stopJamming ()
 Disable jamming with the CC1101 module.
 
void runAction ()
 Run the action based on the current mode (jamming, capturing, or transmitting)
 
void setFrequency (float freq)
 Set the frequency for the CC1101 module.
 
void captureRaw (int sampleInterval)
 Capture raw data from the CC1101 module.
 
void transmitRaw (int sampleInterval)
 Transmit raw data from the CC1101 module.
 
void setModule (int module)
 Set the module to use (A or B)
 
int getSelectedModule ()
 Get the Selected Module object.
 
bool isInitialised ()
 Check if the CC1101 module is initialised.
 
 SubGHzTools ()
 Construct a new SubGHz Tools object.
 
void init ()
 Initialisation of the SubGHzTools object.
 
void startJamming ()
 Enable jamming with the CC1101 module.
 
void stopJamming ()
 Disable jamming with the CC1101 module.
 
void runAction ()
 Run the action based on the current mode (jamming, capturing, or transmitting)
 
void setFrequency (float freq)
 Set the frequency for the CC1101 module.
 
void captureRaw (int sampleInterval)
 Capture raw data from the CC1101 module.
 
void transmitRaw (int sampleInterval)
 Transmit raw data from the CC1101 module.
 
void setModule (int module)
 Set the module to use (A or B)
 
int getSelectedModule ()
 Get the Selected Module object.
 
bool isInitialised ()
 Check if the CC1101 module is initialised.
 

Private Member Functions

void configureModule ()
 Function to configure the CC1101 module.
 
void jammer ()
 Jamming function for the CC1101 module.
 
void configureModule ()
 Function to configure the CC1101 module.
 
void jammer ()
 Jamming function for the CC1101 module.
 

Private Attributes

ELECHOUSE_CC1101 ELECHOUSE_cc1101
 
byte CC1101_A_sck = 39
 
byte CC1101_A_miso = 41
 
byte CC1101_A_mosi = 40
 
byte CC1101_A_ss = 8
 
int CC1101_A_gdo0 = 9
 
int CC1101_A_RF_Switch = 10
 
byte CC1101_B_sck = 17
 
byte CC1101_B_miso = 15
 
byte CC1101_B_mosi = 16
 
byte CC1101_B_ss = 3
 
int CC1101_B_gdo0 = 11
 
int CC1101_B_RF_Switch = 12
 
int CC1101_gdo0 = 11
 
int CC1101_RF_Switch = 12
 
bool CC1101_A_initialised = false
 
byte CC1101_sendingbuffer [CCBUFFERSIZE] = {0}
 
byte CC1101_receivingbuffer [CCBUFFERSIZE] = {0}
 
byte CC1101_bigrecordingbuffer [RECORDINGBUFFERSIZE] = {0}
 
int jammingMode = 0
 
float defaultFrequency = 433.92
 
float frequency = 433.92
 
int selectedModule = 1
 
int samplingInterval = 1
 
int setting
 
int setting2
 
SubGHzTools_flag currentMode = SubGHz_IDLE
 

Member Function Documentation

◆ captureRaw() [1/2]

void SubGHzTools::captureRaw ( int  sampleInterval = 1)

Capture raw data from the CC1101 module.

Parameters
sampleIntervalSampling interval in microseconds

Referenced by runAction().

◆ captureRaw() [2/2]

void SubGHzTools::captureRaw ( int  sampleInterval)

Capture raw data from the CC1101 module.

Parameters
sampleIntervalSampling interval in microseconds

◆ getSelectedModule() [1/2]

int SubGHzTools::getSelectedModule ( )

Get the Selected Module object.

Returns
int Selected module (0 for A, 1 for B)

◆ getSelectedModule() [2/2]

int SubGHzTools::getSelectedModule ( )

Get the Selected Module object.

Returns
int Selected module (0 for A, 1 for B)

◆ isInitialised() [1/2]

bool SubGHzTools::isInitialised ( )

Check if the CC1101 module is initialised.

Returns
true
false

◆ isInitialised() [2/2]

bool SubGHzTools::isInitialised ( )

Check if the CC1101 module is initialised.

Returns
true
false

◆ setFrequency() [1/2]

void SubGHzTools::setFrequency ( float  freq)

Set the frequency for the CC1101 module.

Parameters
freqFrequency in MHz

◆ setFrequency() [2/2]

void SubGHzTools::setFrequency ( float  freq)

Set the frequency for the CC1101 module.

Parameters
freqFrequency in MHz

◆ setModule() [1/2]

void SubGHzTools::setModule ( int  module)

Set the module to use (A or B)

Parameters
moduleModule number (0 for A, 1 for B)

References configureModule().

◆ setModule() [2/2]

void SubGHzTools::setModule ( int  module)

Set the module to use (A or B)

Parameters
moduleModule number (0 for A, 1 for B)

◆ transmitRaw() [1/2]

void SubGHzTools::transmitRaw ( int  sampleInterval = 1)

Transmit raw data from the CC1101 module.

Parameters
sampleIntervalSampling interval in microseconds

Referenced by runAction().

◆ transmitRaw() [2/2]

void SubGHzTools::transmitRaw ( int  sampleInterval)

Transmit raw data from the CC1101 module.

Parameters
sampleIntervalSampling interval in microseconds

The documentation for this class was generated from the following files: