Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive raw data for replay #51

Open
Ruegg opened this issue Jul 27, 2021 · 2 comments
Open

Receive raw data for replay #51

Ruegg opened this issue Jul 27, 2021 · 2 comments

Comments

@Ruegg
Copy link

Ruegg commented Jul 27, 2021

Hi,

Is there anyway I can receive just the raw data and replay it later? This means I don't care for being able to understand the data format, modulation, or anything of the sort in my use case. I purely wish to be able to detect that some sort of RF is occurring, and replay it later.

I'm not too familiar with RF overall, but I tried to read the CC1101 documentation by Texas instruments, and disable all the filtering accordingly.

I ended up writing something like the following:

  My_addr = 0;

  wiringPiSetup();			//setup wiringPi library
  cc1100.begin(My_addr);			//setup cc1000 RF IC
  cc1100.set_ISM(0x01);
  cc1100.receive();
  cc1100.set_channel(0x00);
  cc1100.wor_disable();//No wor mode
  cc1100.set_sync_mode(0x00);//No sync word

  cc1100.set_myaddr(0x00);//No address checking
  cc1100.set_data_whitening(0x00);//No data whitening
  cc1100.set_fec(0x00);//No FEC
  cc1100.set_preamble_len(0x00);//0 preamble length

  cc1100.spi_write_register(PKTCTRL1, 0x00);//Disable addr check

  cc1100.show_register_settings();
  for (;;) {
    delay(1);
    uint8_t bytes_in_RXFIFO  = cc1100.spi_read_register(RXBYTES);

    if((bytes_in_RXFIFO & 0x7F)){
      std::cout << "\nBytes to read!";
    }

    std::cout << "\n" << +bytes_in_RXFIFO;
  }

Despite this, it always logs out 0's despite using an RF device near it (and seeing it show on something such as RTL-SDR).

Any idea how I can accomplish this?

Thank you in advance.

@J0han3s
Copy link

J0han3s commented Nov 18, 2021

Were you able to achieve being able to replay certain signal without knowing anything apart from the fact that it is 868mhz. if so how did you do it. I am trying to learn to do the same thing

@adminy
Copy link

adminy commented Aug 1, 2024

I think you're supposed to set receive registers after you set up all the options, not before. Everything else looks fine to me. Also set some power otherwise you'll have to stand next to the antena to be receiving anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants