FM RF REMOTE CONTROL HACKING

View previous topic View next topic Go down

FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 10th November 2017, 10:23

forum.arduino.cc/index.php?topic=242010.0


Code


Code:
//Define settings
const int INPUT_PIN = 2;                                       //Input pin
const unsigned int MAX_SAMPLE = 256;                           //Maximum number of samples to record
const unsigned long MAX_TIME = 30000UL;                        //Maximum record time after start pulse (msec)

//Variables used in the ISR
volatile boolean running = false;
volatile unsigned long last = 0;
volatile unsigned int count = 0;
volatile unsigned long samples[MAX_SAMPLE];

void setup() {
  pinMode(INPUT_PIN,INPUT);
  Serial.begin(9600);
  while (!Serial) {};
  Serial.println("RecordPin sketch started");
}

void loop() {
  unsigned long startTime;
  int startState = 0;
 
  while (Serial.read() != -1) {};                              //Clear the serial input buffer
  Serial.println("Send character to start");
  while (Serial.read() == -1) {};                              //Wait until we receive the first character
  while (Serial.read() != -1) {};                              //Clear the rest of the buffer
  startState = digitalRead(INPUT_PIN);                         //Save the initial port state
  attachInterrupt(0, receiver, CHANGE);                        //Interrupt 0 = Pin 2
  count = 0;
  last = micros();
  running = true;
  Serial.print("Running. Send a character to stop");
  startTime = millis();
  while (running && ((millis() - startTime) < MAX_TIME)) {     //Run until the buffer is full, the time is up, or we receive a character
    if (Serial.read()!= -1) {                                  //Stop if we receive a character
      running = false;
    }
  }
  Serial.println("Stopped");
  detachInterrupt(0);
  Serial.print("I recorded ");
  Serial.print(count);
  Serial.println(" samples");
  for (unsigned int x = 0; x < count; x++) {
    Serial.print("Pin = ");
    if (startState == 0) {
      Serial.print("Low ");
    } else {
      Serial.print("High");
    }
    startState = !startState;
    Serial.print(" for ");
    Serial.print(samples[x]);
    Serial.println(" usec");
  }
  Serial.println("");
}

//Pin change interrupt routine
//Called when the state of the input pin changes
void receiver()
{
  if (running) {                                               //If we are running
    samples[count] = micros() - last;                          //Save the time from the last change to this one
    last = micros();                                           //Reset the time of last change
    count++;                                                   //Go to next buffer entry
    if (count > MAX_SAMPLE) {                                  //If we are past the last entry
      running = false;                                         // we stop
    }
  }
}




avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 10th November 2017, 10:24

More

ranous.wordpress.com/rtl-sdr4linux



leonjza.github.io/blog/2016/10/02/reverse-engineering-static-key-remotes-with-gnuradio-and-rfcat

instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/#step2

encrypted.google.com/search?q=scanning+433+mhz+for+signal+script&ie=utf-8&oe=utf-8
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 10th November 2017, 15:37

433.924971 mhz

my remote freq
314.972423 Mhz   - 315 Mhz NFM



https://github.com/cjcliffe/CubicSDR/releases/tag/0.2.0



    Run

chmod +x CubicSDR-0.2.0-x86_64.AppImage


to make the file executable.





    Run from shell

./CubicSDR-0.2.0-x86_64.AppImage



or double-click in file browser.
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 11th November 2017, 13:39

To decode wav file (Data capture) use the following.

Code:

rtl_fm -M am -f 315030000 -s 2000000 - | sox -t raw -r 2000000 -e signed-integer -b 16 -c 1 -V1 - fancontrol.wav
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 11th November 2017, 14:56

You can use sox on windows aswell to convert wav files to binary files

sox.sourceforge.net
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by jamied_uk on 12th November 2017, 11:35

rtl-sdr.com/big-list-rtl-sdr-supported-software

forum.arduino.cc/index.php?topic=242010.0

leonjza.github.io/blog/2016/10/02/reverse-engineering-static-key-remotes-with-gnuradio-and-rfcat

instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT
avatar
jamied_uk
Admin

Posts : 2280
Join date : 2010-05-09
Age : 34
Location : UK

http://address-shortner.co.uk

Back to top Go down

Re: FM RF REMOTE CONTROL HACKING

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum