Rc-Switch: calculate pattern and pulselength by raw scanner

I'm working with standard rx-tx arduino transmitters, 433mhz:

I'm trying to acquire signals from 2 different gate remotes with rx sketch and use with my tx sketch.

I'm using the Rc-switch library, and have worked well with one of them.

I've used the sketch ReceiveDemo_Advanced, that gave me:

Decimal: 5326626 (24Bit) Binary: 010100010100011100100010 Tri-State: not applicable PulseLength: 369 microseconds Protocol: 1
Raw data: 11480,348,1108,1088,372,340,1112,1084,376,344,1112,340,1116,340,1112,1084,376,340,1116,1084,376,340,1116,336,1116,340,1116,1084,376,1080,380,1080,380,336,1116,340,1116,1080,380,336,1120,336,1120,336,1116,1080,380,336,1120,

Trying to understand the binary output, i've pasted raw data in given online tool of rc-switch that prints this pattern:

It's quite easy to figure out the Binary, as stated in the message.

Since the other remote, doesn't output anything with previous sketch, i've tried a more "low level" one called SimpleRcScanner, that outputs me following raw trace:

1436,2304,1424,1100,2684,2292,2672,1084,1428,1096,1444,1080,1436,1088,1428,2316,1436,1084,2704,2272,2680,2296,1432,1088,1424,1104,1428,1092,2684,1076,1440,2300,1444,1080,1444,1080,1432,1092,2700,1056,1444,1080,1444,2544,5512,1084,1436,1084,1444,1080,2680,1080,1432,2308,1444,1080,2676,2300,2672,1084,1436,1088,1436,1088,1444,1080,1424,2316,1440,1084,2696,2280,2684,2292,1440,1084,1468,1056,1440,1084,2680,1076,1448,2296,1452,1072,1452,1068,1452,1076,2688,1068,1448,1076,1448,2540,5540,1056,1476,1048,1444,1080,2708,1052,1444,2296,1440,1084,2692,2284,2680,1076,1452,1072,1460,1064,1444,1080,1464,2276,1456,1068,2692,2284,2696,2280,1456,1068,1460,1064,1456,1068,2696,1064,1452,2288,1452,1072,1440,1084,1460,1064,2684,1072,1464,1060,1484,2508,5520,1072,1452,1072,1460,1064,2680,1080,1448,2292,1468,1056,2696,2276,2692,1068,1464,1060,1468,1056,1452,1068,1464,2280,1448,1072,2684,2292,2724,2252,1444,1080,1444,1080,1452,1068,2712,1048,1476,2260,1460,1068,1452,1068,1504,1020,2700,1060,1452,1068,1452,2540,5516,1076,1448,1076,1460,1064,2692,1064,1464,2276,1472,1052,2684,2292,2692,1064,1452,1072,1456,1068,1452,1072,1444,2296,1464,1060,2712,2264,2692,2280,1436,1088,1468,1056,1456,1068,2692,1064,1452,2288,1460,1064,1456,1068,1444,1076,2696,1064,1460,1064,1460,2528,5524,1068,1464,1060,1452,1072,2676,1080,1428,2312,1444,1080,2696,2276,2696,1064,1460,1060,1448,1076,1448,1076,1452,2288,1500,1024,2700,2276,2736,2240,1452,1072,1460,1060,1452,1072,2720,1040,1452,2288,1456,1068,1448,1072,1460,1064,2688,1072,1464,1060,1452,2536,5520,1072,1452,1072,1444,1076,2676,1084,1472,2268,1472,1052,2688,2288,2676,1080,1448,1076,1436,1084,1456,1068,1460,2284,1456,1064,2680,2296,2712,2260,1460,1064,1460,1064,1448,1076,2688,1068,1460,2280,1448,1076,1452,1072,1444,1076,2684,1076,1464,1060,1472,2516,5520,1072,1452,1072,1452,1072,2672,1084,1460,2280,1460,1064,2676,2300,2688,1068,1452,1072,1448,1076,1480,1044,1456,2284,1456,1068,2676,2300,2704,2268,1444,1080,1444,1080,1468,1056,2680,1076,1456,2288,1464,1056,1448,1076,1444,1080,2680,1080,1448,1072,1472,2516,5516,1080,1452,1072,1448,1072,2676,1084,1464,2276,1444,1080,2684,2288,2672,1088,1444,1080,1452,1072,1456,1068,1448,2292,1448,1076,2672,2304,2668,2304,1464,1060,1480,1040,1464,1060,2728,1032,1444,2296,1464,1060,1436,1088,1468,1056,2692,1064,1448,1076,1440,2548,5508,1088,1464,1060,1468,1056,2676,1080,1456,2284,1460,1064,2688,2288,2692,1064,1456,1068,1432,1092,1452,1072,1452,2292,1456,1064,2684,2292,2680,2296,1452,1072,1456,1068,1460,1060,2688,1072,1436,2304

That's the only data i got, so my question is, how can i extract pattern and pulselength from this?

What I've tried so far:

As you can easily imagine I've put this in the online tool to figure out the pattern:

it's very long, so i've tried to recognize and isolate the "repeated" part.
I've obtained following subset raw trace:

5540,1056,1476,1048,1444,1080,2708,1052,1444,2296,1440,1084,2692,2284,2680,1076,1452,1072,1460,1064,1444,1080,1464,2276,1456,1068,2692,2284,2696,2280,1456,1068,1460,1064,1456,1068,2696,1064,1452,2288,1452,1072,1440,1084,1460,1064,2684,1072,1464,1060,1484,2508,5520

which plots:

So, based on previous remote experience, i've figure out following binary:

00001010000101100001000001

But unfortunately, the signal i output with this binary, doesn't have any effect on corresponding gate...
I don't know if matters, but I've noticed that the signal plots wider pattern, but I have not enough experience to calculate right pulselength and confirm i've done a good job trying to decode the plot to binary by observing it.

Now I'm stuck. I hope anybody's got an advice!

Out of several dozen possible devices, which one are you using?

hi, i've edited first post with image taken from seller's page.
Thanks for pointing that out.

Is the picture the only information that the seller has?

I bought it here.
I'm not german, I hope you can get info you're searching for.

I've followed some tutorial and noticed that the device was the same, 433mhz rx\tx.
Since it was cheap, I've tried to buy this.
I'm a newbie after all..if I bought wrong device tell me the right one please.
In any case, i'm strongly oriented to think that i'm capturing the signal, so it's a matter of code to make it work.
But it's only based on my impression.

For a better overview of the transmitted signal, try following the procedures described in this blog post: Reverse Engineer Wireless Temperature / Humidity / Rain Sensors — Part 1 « RAYSHOBBY.NET

I've successfully used it in a number of proprietary cases, including to decode a previously uncharacterized RCswitch-type protocol.

The documentation for the transmitter says: "FS1000A 433MHZ RF transmitter & XY-MK-5V receiver module can be used in any project where there is a requirement to send data through air under short distances. ".

Please show us the program you are using to send data and what data are you sending? Looking at some bit patterns serves no purpose if the data being sent is the data received?
Most device begin each transmission with a synchronizing pattern of bits. Is this what you are looking at?

this is the source of my sketch about send data.

I want to clearify, that for the first remote, sending the binary with right pulseLength was enough for the gate to open.
So to be precise this is the sketch:

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  mySwitch.enableTransmit(10);  // Using Pin #10
  mySwitch.setPulseLength(369); // remote 1 obtained pulse length
}

void loop() {
  mySwitch.send("010100010100011100100010"); //remote 1 obtained binary
}

I expect to do exact same with other one.

But you told it to send an ASCII data!

That's how rc switch works.
Infact, gate is opening with corresponding binary sequence taken from that string.

Yes, but the "binary" sequence it actually ASCII characters that you sent!

No, .send() is overloaded, so either ASCII strings or binary values representing the same message can be used as arguments.

library example:

  /* Same switch as above, but using decimal code */
  mySwitch.send(5393, 24);
  delay(1000);  
  mySwitch.send(5396, 24);
  delay(1000);  

  /* Same switch as above, but using binary code */
  mySwitch.send("000000000001010100010001");
  delay(1000);  
  mySwitch.send("000000000001010100010100");
  delay(1000);

Thanks! Strange!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.