-
Notifications
You must be signed in to change notification settings - Fork 98
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
Send and receive more than 32 bits #44
Comments
Hello, In the simple mode it is a little easier to look at these examples: in short yes it is possible with the internal examples. and in the simple mode it works all the more. |
Hello! The examples you told me do not detect the signal Well, this signal is simple, it's OOK without encryption Here you can see what is being sent, taking into account that the longest pulses is 1 binary and the short pulses is 0 binary: Using an SDR I can see that the temperature is sent Well, I would like to be able to receive and send more than 32 bits with the Send function, in order to make a replay attack Attached are screenshots of the signal Thanks! |
I'll take a closer look at it. so please be patient. |
Hello! Don't worry, I'm in no hurry for this Well, I found a PR from the rc-switch library where a person implemented this, but the PR was never accepted I will try to implement this in your library, but I think you know better about your code and you can do better Thank you! |
the problem is not sending 64 bit. we can also send or receive 1000bit. the signal must be properly decoded. if I convert your bit sequence into decimal, nothing useful comes out of it. now i have found the following about the hideki protocol. I think we can build on that. it would be good to know how many microseconds the smallest pulse has. |
can you make an audio recording of the signal and then upload it? the current temperature would be helpful. |
Hello! Yes, here is the I/Q file: Import this into an audio editor (example: audacity) with the following settings: Encoding: 32-bit float |
Supposedly the temperature is 31.9ºC |
Hello! Any update? Thanks! |
hi, unfortunately i don't have time at the moment because i am doing advanced training and exams are pending. the signal of the raw data you sent me are unfortunately very weak. it would be good if you could record raw data with the help of the cc1101. i will post the sketch for it in the course of the day. |
this is a prototype of my raw data scanner. there is also a built-in frequency scanner for remote controls. he won't bring you anything at the weather station. set the correct receiving pin (esp or arduino pin). if you do not receive anything try to set the bandwidth from 58khz to 812khz. the count_threshold is set to min 50 pulses. because weather stations usually send less than 100 pulses. You can play around with the settings if it doesn't work. monitor with sdr whether it is also the weather station that you have received. then send me the raw data. if it doesn't work or if another problem occurs, please contact me. #include <ELECHOUSE_CC1101_SRC_DRV.h>
#define SAMPLESIZE 500
int RxPin = 2; //receive pin
float freq = 433.92;
float start_freq = 433;
float stop_freq = 434;
int rssi_threshold = -70;
int count_threshold = 50;
int time_threshold = 70;
static int interruptPin = 0;
int state = 0;
long compare_freq;
float mark_freq;
int rssi;
int mark_rssi=-100;
int counter = 0;
static unsigned long lastTime = 0;
static unsigned long resetTime;
bool Receive = 0;
int MODE = 2;
String Print;
static unsigned int timings[SAMPLESIZE];
void setup() {
Serial.begin(115200);
pinMode(RxPin,INPUT);
interruptPin = digitalPinToInterrupt(RxPin);
ELECHOUSE_cc1101.Init();
ELECHOUSE_cc1101.setRxBW(58);
ELECHOUSE_cc1101.setMHZ(freq);
ELECHOUSE_cc1101.SetRx();
Serial.println("Raw data Receiver Ready!");
Serial.print("Freq: ");
Serial.println(freq);
}
void loop() {
commands();
print_received();
scan_frquency();
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void commands(){
if (Serial.available()){
String c = Serial.readString();
if (c=="scan\n"){
MODE = 1;
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void scan_frquency(){
if (MODE == 1){
serial_print("---------------------\nFrequency scan Mode\n---------------------");
set_state(2);
ELECHOUSE_cc1101.setMHZ(freq);
rssi = ELECHOUSE_cc1101.getRssi();
if (rssi>rssi_threshold){
if (rssi > mark_rssi){
mark_rssi = rssi;
mark_freq = freq;
}
}
freq+=0.01;
if (freq>stop_freq){
freq=start_freq;
if (mark_rssi>rssi_threshold){
long fr = mark_freq*100;
if (fr == compare_freq){
Serial.print("Freq: ");
Serial.println(mark_freq);
Serial.print("Rssi: ");
Serial.println(mark_rssi);
ELECHOUSE_cc1101.setMHZ(mark_freq);
mark_rssi=-100;
compare_freq = 0;
mark_freq = 0;
MODE = 2;
delay(1000);
}else{
compare_freq = mark_freq*100;
freq = mark_freq -0.10;
mark_freq=0;
mark_rssi=-100;
}
}
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void print_received(){
if (MODE == 2){
serial_print("---------------------\nReceive Mode\n---------------------");
set_state(1);
if (Receive == 1){
Serial.print("Counter: ");
Serial.println(counter);
for (unsigned int i = 1; i< counter; i++) {
Serial.print( timings[i] );
Serial.print(",");
}
Serial.println();
delay(500);
Receive = 0;
counter = 0;
set_state(1);
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void serial_print(String s){
if (s != Print){
Print = s;
Serial.println(s);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void set_state(int s){
if (s == 1 && s != state){
state = s;
attachInterrupt(interruptPin, handleInterrupt, CHANGE);
}
if (s == 2 && s != state){
state = s;
detachInterrupt(interruptPin);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////
void handleInterrupt() {
static unsigned long lastTime = 0;
const long time = micros();
const unsigned int duration = time - lastTime;
if (millis()-resetTime > time_threshold){
if (counter > count_threshold){
Receive = 1;
set_state(2);
}else{
counter=0;
Receive = 0;
}
}
if (duration > 100){
timings[counter] = duration;
counter++;
}
if (counter >= SAMPLESIZE){
Receive = 1;
set_state(2);
}
lastTime = time;
resetTime = millis();
}
|
Hello! I have tested your code, I receive the following: Rebooting...
|
yes I can do something with that. The Corepanik error probably comes from the fact that it is better to write the data into the RAM with an esp. but you received something. give me some time to decode it. |
Hi Well, I modified your code to get the binary code But... this releases many codes, how can I optimize your code to receive only the necessary code? This is ASK, if I try to receive the code with a basic example (Evil Crow RF repo) I can't receive it because the harmonics are too big But if I try to transmit the code, the device turns on The code is this: 101001001010010100000 I think that the cc1101 modules cannot receive this because of the harmonics, but if I transmit the code my device turns on. My device is a wireless calling system Thank you! |
now I was also just finished to decode. it is a 24 bit code. |
I think rc-switch receives itnot because there is a stop signal. |
Can you modify this example to receive the decoded code directly? This way I can implement it in Evil Crow RF and modify the RSSI, Count and Time parameters from the web panel |
yes this is the plan, but it requires a comprehensive analysis of the received raw data and very complex. so that everything is covered. Writing something for your remote control is a bit easier. can then only receive signals that they are like those of their remote control. |
I may be out of line here, but there is a brnach of |
Hello, LSatan, I have a ask remote control from china,
10:50:52.082 -> Frequency scan Mode |
Hi @LSatan, Great library port! Would you mind sharing some hints on how to decode timings into ASK? I have Hormann gate's remote and would like to decode the signal:
|
I figured it out, so let me leave a hint for the following researchers. The signal I posted is Manchester encoded and it's proprietary. You won't be able to decode it using standard lib API. |
Hello!
I would like to send and receive more than 32 bits
Is this possible?
Example:
CC1101_1.send("11100010110001000101110001001000100001000101001001000");
This is the signal from a weather station
Thank you!
The text was updated successfully, but these errors were encountered: