Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Playground Wiki / Re: First posts on: January 04, 2011, 07:54:52 pm
just my first post
2  Forum 2005-2010 (read only) / Interfacing / Re: Sniff and retransmit RF-signal on: January 06, 2011, 07:44:14 am
Okey, I think I understand and my initial approach seems, as you put it, doomed. But thank you all for your input. I'll read up on the "logic analyzer" and try it that way instead. I think that should work for at least one of the areas where I wanted to try this.

3  Forum 2005-2010 (read only) / Interfacing / Re: Sniff and retransmit RF-signal on: January 05, 2011, 06:25:34 am
Sorry about the misunderstanding. What I meant was that I'm not interested in "understanding" the signal and how it is build, I'm only interested in retransmitting it later. So what I want to do is to temporary "store" the signal in a byte-array and later transmit the content of the byte-array.

4  Forum 2005-2010 (read only) / Interfacing / Sniff and retransmit RF-signal on: January 04, 2011, 07:56:22 pm
Hi,
I'm not quite sure it is possible but I would like to "sniff" a RF-signal from a remote control (that transmits on 433Mhz) and after the signal has been recorded, retransmit this signal later. I'm not familiar with the protocol of the remote control, but I'm not looking to decode the signal, just to transmit it again later. I have connected a RF-transmitter and a RF-receiver (like these: http://winavr.scienceprog.com/example-avr-projects/running-tx433-and-rx433-rf-modules-with-avr-microcontrollers.html) to a arduino board and I've built a simple "data logger".

Then using the "read"-function I see a lot of interference but I can also see that when I press a button on the remote control, the arduino picks up the signal.

The problem is that when I try to retransmit the signal, there is no response.

So my question is:
1. Is it even possible to "record" a RF-signal and repeat it later using the hardware setup in place?
2. Can I use the SoftwareSerial.h or does this hide something in the signal that is needed
3. Have I done some mistake in the code


Code:    

#include <SoftwareSerial.h>
#define rxPin 5
#define txPin 6
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

int charInt = 0;
int val;

byte serInString[1000];
int serInIndx = 0;
int serOutIndx = 0;

void setup()  {
  Serial.begin(4800);
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  mySerial.begin(4800);
}

void loop() {
  if (Serial.available()) {
    val = Serial.read();
    if (val == 'r') {
      readSerialString();
    }
    if (val == 'd') {
      dumpSerialString();
    }
    if (val == 't') {
      transmitSerialString();
    }
  }
}

void readSerialString () {
  Serial.println("reading");  
  for(serInIndx=0; serInIndx < 1000; serInIndx++) {
    serInString[serInIndx] = mySerial.read();
    Serial.println(serInString[serInIndx]);
  }
  Serial.println("done");
}

void transmitSerialString () {
  Serial.println("transmit");
  for(serInIndx=0; serInIndx < 1000; serInIndx++) {
    Serial.println(serInString[serInIndx]);
    mySerial.println(serInString[serInIndx]);
  }
  Serial.println("done");
}

void dumpSerialString () {
  Serial.println("dump");
  for(serInIndx=0; serInIndx < 1000; serInIndx++) {
    Serial.println(serInString[serInIndx]);
  }
}

Pages: [1]