Git Product home page Git Product logo

rf433recv's People

Contributors

sebmillet avatar skorokithakis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rf433recv's Issues

Help with decoding parktronic

i sniffed 51740 us packets

short pulse 360us, long 720us. 10 pulses sync, 3240us (or 2880?) after sync, 1080us at end

Figure_1

What is

 mod,  initseq,
 lo_prefix,  hi_prefix,  first_lo_ign,
 lo_last,  sep, nb_bits

here?

Variable packet length in the same program.

Sebastian is it possible to read 2 different length packets? i.e. 32 bits and 40 bits.

As the Bed Remote that I am using uses 1 button to output a pairing packet of 40 bits and all of the others are 32.
It Is a Reverie bed.

> #include "RF433recv.h"
> #include <Arduino.h>
> 
> #define PIN_RFINPUT  2
>     // Specifying the interrupt number is optional, you can leave it to the
>     // constructor to work it out.
> #define INT_RFINPUT  0
> 
> void callback_anycode(const BitVector *recorded) {
>     Serial.print(F("Code received: "));
>     char *printed_code = recorded->to_str();
> 
>     if (printed_code) {
>         Serial.print(recorded->get_nb_bits());
>         Serial.print(F(" bits: ["));
>         Serial.print(printed_code);
>         Serial.print(F("]\n"));
> 
>         free(printed_code);
>     }
> }
> 
> void callback_head_up(const BitVector *recorded) {
>     Serial.print(F("Head Up pressed\n"));
> }
> 
> void callback_head_down(const BitVector *recorded) {
>     Serial.print(F("Head Down pressed\n"));
> }
> 
> RF_manager rf(PIN_RFINPUT, INT_RFINPUT);
>     // Second parameter is optional. Could also be:
> //RF_manager rf(PIN_RFINPUT);
> 
> void setup() {
>     pinMode(PIN_RFINPUT, INPUT);
>     Serial.begin(115200);
> 
>     
> // 40 Bit registration
> // Data: 78 10 d6 be be
> 
> rf.register_Receiver(
> 	RFMOD_TRIBIT_INVERTED, // mod
> 	19468, // initseq
> 	4968, // lo_prefix
> 	5512, // hi_prefix
> 	1018, // first_lo_ign
> 	506, // lo_short
> 	1018, // lo_long
> 	0, // hi_short (0 => take lo_short)
> 	0, // hi_long  (0 => take lo_long)
> 	968, // lo_last
> 	19468, // sep
> 	40  // nb_bits
>   );
> 
>     rf.register_callback(callback_head_down, 500,
>             new BitVector(40, 5, 0x78, 0x10, 0xd6, 0xbe, 0xbe));
> 
> // 32 Bit registration
> // Data: 78 10 d7 bf
> 
> rf.register_Receiver(
> 	RFMOD_TRIBIT_INVERTED, // mod
> 	19468, // initseq
> 	0, // lo_prefix
> 	0, // hi_prefix
> 	1020, // first_lo_ign
> 	512, // lo_short
> 	1020, // lo_long
> 	0, // hi_short (0 => take lo_short)
> 	0, // hi_long  (0 => take lo_long)
> 	968, // lo_last
> 	19468, // sep
> 	32  // nb_bits
>   );
>    
>    rf.register_callback(callback_head_up, 500,
>             new BitVector(32, 4, 0x78, 0x10, 0xd7, 0xbf));
> 
> 
>     Serial.print(F("Waiting for signal\n"));
> 
>     rf.activate_interrupts_handler();
> }
> 
> void loop() {
>     rf.do_events();
> }

/**************************************************************************************/
this is what I am attempting but there are 18 buttons and I need to read them all.

Thank You

Crashes on ESP8266

I'm trying to flash an ESP8266 with the example using Platformio, but I'm getting a crash at boot:

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v000432f0
~ld
Waiting for signal
                  ISR not in IRAM!

User exception (panic/abort/assert)
                                   --------------- CUT HERE FOR EXCEPTION DECODER ---------------

Abort called

>>>stack>>>

ctx: cont
sp: 3ffffec0 end: 3fffffc0 offset: 0000
3ffffec0:  74696157 20676e69 20726f66 6e676973  
3ffffed0:  000000fe 00000000 00000000 00000000  
3ffffee0:  00000000 00000000 00000000 00ff0000  
3ffffef0:  5ffffe00 5ffffe00 000007d0 3ffee59c  
3fffff00:  00000000 00000003 00000004 40202c9a  
3fffff10:  40100541 40201030 3ffef48c 40202cac  
3fffff20:  000002fe 00000000 00000004 402031be  
3fffff30:  000034f4 0000000c 3ffee534 40201fe4  
3fffff40:  3fffdad0 3ffee534 3ffee4e8 4020325c  
3fffff50:  0001c200 0000001c 00000000 40201b95  
3fffff60:  3fffdad0 3ffee534 3ffee4e8 40201108  
3fffff70:  0000019f 000002fe 00000000 00000000  
3fffff80:  0000032d 000034f4 0000000c 40201030  
3fffff90:  000007d0 feefeffe feefeffe feefeffe  
3fffffa0:  feefeffe 00000000 3ffee588 40202828  
3fffffb0:  feefeffe feefeffe 3ffe85dc 40100ed1  
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

The "ISR not in IRAM!" error message in particular points to some changes to ESP Core regarding interrupt handling, but I don't know enough to fix that.

AmbientWeather-TX8300 & unmanaged encoding

I have the aforementioned device and although r433any detects it and seems to be detecting the timings, it is not able to decode any of the data (from what I can tell, one of the bits may be a bit long?). rtl_sdr detects and decodes it fine. I noticed that there was an issue opened a while back for another unmanaged encoding device and the opener was able to get their issue resolved but, unfortunately, I don't understand the solution well enough to adapt it for my device.

The information as output by 01_main is as follows.


	Data: 

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	3908, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	1924, // lo_short
	1924, // lo_long
	1964, // hi_short (0 => take lo_short)
	3904, // hi_long  (0 => take lo_long)
	0, // lo_last
	3908, // sep
	0  // nb_bits
);
-----CODE END-----

The timing info from rtl_sdr is as follows:

https://triq.org/pdv/#AAB10307A40F30994C80809180808081818180818180818080808080818180808081808081818080808081818181818080808180808180818181818180808181818081818080818181818080818081818180818255

(I think this should be enough to see what is occurring but can gather more data if required.)

Thanks.

How to add new protocol

Hi,

I have some RF433 MHz Temperature probe that I am trying to capture the data from. Using a hacked up version of RC-Switch, and later verifying with your RFSnif library, I have been able to determine that the data looks to consist of an 8000us start pulse and the pulses of lenght either 2000us or 4000us seperated by a low signal for 500us.

When running with RF433any these signal characteristics are detected correctly, but because the signal is neither Manchester encoded or Tri-bit the library can do nothing more with them.
I see what looks like a state machine for each of these protocols, is there any guidance/documentation on how I would construct a new statemachine and integrate it for for the protocol I am seeing from my thermometers.

Thanks
Paul

Help with ESP32

Hi Sebastien

Thanks for two amazing libraries. I got up and running on RF433any almost instantly and it worked really well. In RF433any, I measured the device parameters (a cheap door sensor sending three bytes on open and close) several times, using both 01_main and 03_output examples (and getting consistent results), and then successfully using 04_react_on_code. So easy!

When I copied the parameters in RF433recv and tried a few examples I just got no response to anything at all, like it wasn't receiving anything. I am using a TTGO T-Display ESP32 with Platformio parameters below (and the device specs).

I believe the library says the ESP32 is supported. I tried pins 15, 25, and 33 with no responses, and then tried on a Uno R3 board using Pin 2. On the R3 board, it worked perfectly on the first try.

I went back to the ESP32 and tried Pin 2, but again no luck.

Could it have something to do with the interrupt not being recognized or responded to on the T-Display? The RF433any library worked perfectly on the T-Display, so with the recv library it feels like either the interrupt is not triggering the evaluation at all, or the filtering parameters are not responding correctly to the signal. Is there any way to use the recv library in a temporary "output all" like the RF433any allows to see what's it's seeing and if the interrupt is even triggering?

Or do you have another is suggestion for what I might try for next steps?

Thanks again for the libraries and any suggestions.

[env:ttgo-lora32-v1]
platform = espressif32
board = ttgo-lora32-v1
framework = arduino

lib_deps =
sebmillet/RF433recv@^0.3.2

Data: 53 bd 0a

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
RFMOD_TRIBIT, // mod
14047, // initseq
0, // lo_prefix
0, // hi_prefix
0, // first_lo_ign
485, // lo_short
1348, // lo_long
0, // hi_short (0 => take lo_short)
0, // hi_long (0 => take lo_long)
464, // lo_last
14047, // sep
24 // nb_bits
);
-----CODE END-----

Data: 53 bd 0e

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
RFMOD_TRIBIT, // mod
14099, // initseq
0, // lo_prefix
0, // hi_prefix
0, // first_lo_ign
483, // lo_short
1349, // lo_long
0, // hi_short (0 => take lo_short)
0, // hi_long (0 => take lo_long)
466, // lo_last
14098, // sep
24 // nb_bits
);
-----CODE END-----

reception of last bit before separation window

Hello,

First of all thank you very much for this library. it is way better than RCSwitch. I always wanted to write a library like this and then I stumbled upon yours. I'll modify it a little for my own needs.

there's an issue regarding the last bit of data. for example in hcs301 IC which is 66 bits it only detects 65 bits. I dug deeper into the code and found out that the bit detection algorithm is based on short and long detection of the signal level and only if the logic timing is correct then the bit is considered valid. So far so good. the problem with the last bit is that the consecutive rising edge doesn't happen until the next packet and this causes problems for the detection.

___----_________________[start of next packet]---__......

that is why it doesn't detect the last bit because once the signal level goes to 1 in the next packet the timings are incorrect for the last bit. surprisingly this doesn't cause an issue with EV1527 protocol because the last logic element is actually the start of the next packet and is outputted right after the last bit so the last bit is detected correctly.

have you implemented any way to detect the last bit in this scenario?

Receiving <unmanaged encoding> only

Hi,

when I run RF433any 01_main.ino, all I receive is this:

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	3820, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	556, // lo_short
	556, // lo_long
	1892, // hi_short (0 => take lo_short)
	3824, // hi_long  (0 => take lo_long)
	0, // lo_last
	3820, // sep
	0  // nb_bits
);
-----CODE END-----

Data: 

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	3872, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	516, // lo_short
	516, // lo_long
	1932, // hi_short (0 => take lo_short)
	3884, // hi_long  (0 => take lo_long)
	0, // lo_last
	3872, // sep
	0  // nb_bits
);
-----CODE END-----

Data: 

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	3856, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	512, // lo_short
	512, // lo_long
	1936, // hi_short (0 => take lo_short)
	3860, // hi_long  (0 => take lo_long)
	0, // lo_last
	3856, // sep
	0  // nb_bits
);
-----CODE END-----

Data: 02 52 52

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	2004, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	424, // lo_short
	828, // lo_long
	164, // hi_short (0 => take lo_short)
	404, // hi_long  (0 => take lo_long)
	408, // lo_last
	2004, // sep
	20  // nb_bits
);
-----CODE END-----

Data: 09 49 49

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	2008, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	436, // lo_short
	816, // lo_long
	184, // hi_short (0 => take lo_short)
	364, // hi_long  (0 => take lo_long)
	192, // lo_last
	1388, // sep
	22  // nb_bits
);
-----CODE END-----

Data: 

-----CODE START-----
// [WRITE THE DEVICE NAME HERE]
rf.register_Receiver(
	<unmanaged encoding>, // mod
	10508, // initseq
	0, // lo_prefix
	0, // hi_prefix
	0, // first_lo_ign
	482, // lo_short
	984, // lo_long
	0, // hi_short (0 => take lo_short)
	0, // hi_long  (0 => take lo_long)
	1016, // lo_last
	10508, // sep
	0  // nb_bits
);
-----CODE END-----

I am trying to receive the signal of several temperature and humidity sensors I have around the house. On a Raspberry PI I can receive the signal by using rtl_433 and protocol [03] Prologue, FreeTec NC-7104, NC-7159-675 temperature sensor. Is there a way to decode the protocols with RF433recv?
Thank you and kind regards, Andreas

Crashes on ESP8266

Thanks a ton for creating the RF433any, RF433send and RF433recv libraries. This is much more compatible than the rc_switch library and have allowed me to control my previously undetectable ceiling fans.

However I noticed the the RF433recv library has a bug/incompatibility with the more recent ESP8266 board manager. Essentially the included example (01_generic) compiles fine but crashes repeatedly with an error that says "ISR not in IRAM!". Upon some research it seems that including the IRAM_ATTR decoration for the line 65 in RF433recv.cpp (void handle_int_receive();) fixes the issue. Apparently the more recent versions of the ESP8266 board libraries are very strict and expect more functions to have the IRAM_ATTR decoration.

I hope you will add this fix into the library so that it can help others in the future.

Thanks again!

Possible intermittent reception issue?

Hi, My first time using an RF433 Rx\Tx combo and decided to try RF433recv, send and decode for driving them. Am using Arduino Pro mini boards for both sides.
I have a test program sending a 4 byte message every 5 seconds, However the corresponding receiver only seems to be outputting the received message every 10 seconds (both tx and rx codes are based on examples provided). I also tried the decoder code on the receiver side and that too only detects the message every 10 seconds.
So far I've checked the transmitter side using a scope to prove the transmitter hardware is sending digital data every 5 seconds.
The scope also shows the digital data being output by the RF433 receiver hardware, so currently it look like the rx code may have an issue. Will try to dig into the rx code later.

building Transceiver issue

Hi there, great project. Receiver works with your code. Transmitter works with code. However I noticed when connecting Transmitter and receiver at the same time. The receiver code fails to receive data. Concluded that the receiver code does not define the TX pin for output and therefore leaves it floating. Which allows the Transmitter to transmit random bits. I added into the receiver code to define the TX pin as output. Which solved the issue, just thought i would let you and others aware of this, just in case others build a 433 transceiver.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.