secplus icon indicating copy to clipboard operation
secplus copied to clipboard

Receiver for Security+ 2.0 (to connect to ESP32)

Open billmoseley opened this issue 3 months ago • 3 comments

I'm seeking some pointers to get started with secplus. Sorry, I'm just starting out here.

I'd like to connect a receiver to an ESP32 (running ESPHome) and be able to identity individual remotes.

I see the remote_id is provided by the library:

Security+ 2.0:  rolling=240124682  fixed=62088643072  (button=14 remote_id=1959100928)
Security+ 2.0:  rolling=240124683  fixed=66383610368  (button=15 remote_id=1959100928)
Security+ 2.0:  rolling=240124684  fixed=74973544960  (button=17 remote_id=1959100928)

I don't have an SDR, but I have a spare CC1101. I also don't understand how Security+ 2.0 works over the three frequencies (310MHz, 315MHz, and 390MHz), and if that would limit my use of a receiver like the CC1101.

Would a CC1101 work, and is anyone aware of using secplus with an ESP32?

My interest in this is that the 89xLM remotes are very inexpensive, have good range, and come in a handy package. I'm currently using an 850LM three-channel receiver connected to an ESPHome device to uniquely identify three remotes (or really, channels). But, if I could read the remote_id I could have many "channels" for mapping the remotes to various actions.

I assume I'd have to implement rolling code tracking on the receiving end, too, if wanted to keep that security feature intact.

Thanks,

billmoseley avatar Oct 15 '25 15:10 billmoseley

Would a CC1101 work

Flipper Zero uses a CC1101 transceiver, and its Security+ support is based on secplus.

and is anyone aware of using secplus with an ESP32?

I'm not aware of a project, but I don't see a reason why it wouldn't work. The secplus code is available in portable C suitable for microcontrollers (even 8-bit!).

I also don't understand how Security+ 2.0 works over the three frequencies (310MHz, 315MHz, and 390MHz)

I believe most receivers use one of the three frequencies. Some transmitters support multiple frequencies.

and if that would limit my use of a receiver like the CC1101.

The CC1101 supports all three frequencies.

argilo avatar Oct 15 '25 20:10 argilo

To make your idea work, I expect you'd need to write some code to configure the CC1101 to listen on the frequency that your transmitters are using, set the correct RF parameters (e.g. modulation, baud rate, bandwidth). Then you'd need to write some glue code to get the data packets from the CC1101 into secplus for decoding. The C and Python libraries handle encoding and decoding of Security+ messages, but it's up to you to interface with RF hardware.

argilo avatar Oct 15 '25 21:10 argilo

Thanks for the quick response.

Oh boy. I'm flying blind here, but was able to get somewhere... I was able to use ESPHome and bring in a cc1101 component. I set the frequency to 310MHz (as a wild guess) and received some data.

The device reports this config:

[15:56:50.015][C][cc1101:250]: CC1101: 
[15:56:50.019][C][cc1101:255]:   Chip: 0014
[15:56:50.022][C][cc1101:256]:   Tuner:
[15:56:50.027][C][cc1101:257]:     Output Power: 10.6 dBm
[15:56:50.029][C][cc1101:258]:     Rx Attenuation: 0 dB
[15:56:50.034][C][cc1101:259]:     DC Blocking Filter: 1
[15:56:50.037][C][cc1101:260]:     Frequency: 315000 KHz
[15:56:50.042][C][cc1101:261]:     IF Frequency: 152 KHz
[15:56:50.045][C][cc1101:262]:     Bandwith: 203 KHz
[15:56:50.049][C][cc1101:263]:     Channel: 0
[15:56:50.052][C][cc1101:264]:     Channel Spacing: 199 KHz
[15:56:50.058][C][cc1101:265]:     FSK Deviation: 47 KHz
[15:56:50.060][C][cc1101:266]:     MSK Deviation: 8 KHz
[15:56:50.064][C][cc1101:267]:     Symbol Rate: 4996 Baud
[15:56:50.068][C][cc1101:268]:     Sync Mode: 0
[15:56:50.071][C][cc1101:269]:     Carrier Sense Above Threshold: 1
[15:56:50.074][C][cc1101:270]:     Modulation: 3
[15:56:50.078][C][cc1101:272]:   CS Pin: GPIO6

And then I pressed the button on the 891LM LiftMaster Garage Door Opener Remote and got data (below).

Wild guessing here, but I assume I need to somehow get secplus added as a Remote Receiver Component to debug.

Does this data look like anything secplus could decode?

[15:56:59.194][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.200][I][remote.pronto:233]: 0000 006D 0011 0000 000E 002E 0042 0031 0067 0030 001D 0013 004B 001D 002F 0014 0013 0014 004C 0013 0027 0013 0013 0014 0060 0013 0026 0026 0026 0014 0025 0014 0026 0014 0026 0013 0026 009B 
[15:56:59.237][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.242][I][remote.pronto:233]: 0000 006D 000D 0000 0154 0013 004C 0014 0060 0013 0013 0014 004C 0014 0026 0013 0014 0013 0013 0014 0013 003A 003A 0013 004D 0014 0026 0014 0056 009B 
[15:56:59.266][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.271][I][remote.pronto:233]: 0000 006D 000E 0000 0155 0013 004B 001D 002F 0014 0013 0014 004D 0012 0027 0013 0013 0014 0060 0013 0039 0014 0027 0013 0026 0013 0026 0014 0026 0013 0027 009B 
[15:56:59.309][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.314][I][remote.pronto:233]: 0000 006D 000E 0000 0154 0014 004B 0014 0060 0013 0013 0014 004C 0013 0027 0013 0014 0013 0013 0014 0026 0013 000A 000A 003A 0013 004D 0013 0027 0013 0057 009B 
[15:56:59.337][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.342][I][remote.pronto:233]: 0000 006D 000D 0000 0155 0013 0097 0014 0013 0014 004C 0013 0026 0013 0013 0013 0061 0013 0039 0013 0027 0013 0026 0014 0027 0013 0027 0013 0026 009B 
[15:56:59.382][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.387][I][remote.pronto:233]: 0000 006D 000D 0000 0155 0013 004C 0013 0060 0013 0013 0014 004C 0013 0027 0013 0014 0013 0013 0014 0026 0014 004D 0013 004D 0013 0026 0013 0056 009B 
[15:56:59.392][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.396][I][remote.pronto:233]: 0000 006D 0001 0000 0013 009B 
[15:56:59.915][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.922][I][remote.pronto:233]: 0000 006D 0011 0000 000F 002D 00D9 0030 001C 0026 004B 0030 0009 0013 0012 0014 0039 0027 0013 0027 0013 0014 0026 0061 0012 0027 0012 0027 0012 0028 0012 0027 0012 000B 0009 0014 0026 009B 
[15:56:59.961][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.965][I][remote.pronto:233]: 0000 006D 000F 0000 0108 0030 001D 0013 004B 0014 0060 0014 0012 0014 0039 0027 0026 0014 0013 0014 0013 0013 0027 0013 000A 000A 003A 0039 0026 0014 0026 0013 0056 009B 
[15:56:59.987][I][remote.pronto:231]: Received Pronto: data=
[15:56:59.992][I][remote.pronto:233]: 0000 006D 0010 0000 00BD 0030 0068 0014 001B 001E 004B 0026 0013 0013 004C 0014 0026 0014 0013 0013 0026 001E 001D 0013 0026 0026 0027 0013 0026 0014 0027 0013 0012 0027 0026 009B 
[15:57:00.017][I][remote.pronto:231]: Received Pronto: data=
[15:57:00.022][I][remote.pronto:233]: 0000 006D 0013 0000 0155 0013 001C 000B 0025 0014 0012 000A 002F 000B 000A 0013 0013 0014 004C 0014 0026 0015 0012 0014 0012 0014 0012 000B 000A 003A 0011 0027 0009 001D 0009 000B 0012 0014 0026 0027 0042 009B 
[15:57:00.061][I][remote.pronto:231]: Received Pronto: data=
[15:57:00.067][I][remote.pronto:233]: 0000 006D 0012 0000 0038 0030 0068 002F 0009 0030 001C 0013 0097 0014 0013 0014 004C 0013 0026 0013 0012 0014 0026 001D 001D 0013 0009 000B 0012 0027 0025 0014 0026 0013 0027 0013 0013 0027 0026 009B 
[15:57:00.091][I][remote.pronto:231]: Received Pronto: data=
[15:57:00.094][I][remote.pronto:233]: 0000 006D 000F 0000 0026 000A 0124 0026 0038 0014 0060 0014 0012 0014 004C 0014 0026 0014 0012 0015 0012 0014 0013 0027 004D 0027 001C 000B 0013 0014 0012 0028 0055 009B 
[15:57:00.101][I][remote.pronto:231]: Received Pronto: data=
[15:57:00.105][I][remote.pronto:233]: 0000 006D 0001 0000 0012 009B 

Update:

Oddly, I still get the same output regardless if I configure the cc1101 for 310MHz or 315MHz or 390Mhz.

And asking for "raw" output, doesn't seem to make it more clear.

I'm either going to have to get an SDR and use your tools or really dig into the ESPHome code to see what it's reading.

[09:14:29.101][I][remote.raw:041]: Received Raw: 375, -1180, 7671, -473, 3951, -492, 2999, -492, 1026, -491, 1011, -477, 1002, -1003, 512, -468, 1035, -463, 268, -251, 493, -489, 1012, -485, 1021, -475, 1025, -474, 1260
[09:14:29.139][I][remote.raw:041]: Received Raw: 2475, -1218, 5187, -491, 1975, -494, 496, -745, 270, -474, 516, -490, 516, -490, 2020, -473, 1003, -264, 270, -473, 1008, -495, 508, -482, 506, -499, 508, -742, 271, -474, 515, -490, 2520, -470, 1028, -491, 750
[09:14:29.178][I][remote.raw:041]: Received Raw: 8895, -481, 3994, -474, 1490, -748, 761, -994, 492, -490, 1011, -485, 1521, -486, 507, -483, 1022, -474, 269, -250, 493, -489, 1011, -485, 1023, -482, 1013, -474, 1279
[09:14:29.216][I][remote.raw:041]: Received Raw: 8909, -961, 1488, -498, 1498, -471, 533, -489, 499, -483, 2022, -500, 1489, -491, 1026, -491, 514, -466, 539, -467, 1541, -455, 517, -498, 2513, -480, 1031, -467, 773
[09:14:29.255][I][remote.raw:041]: Received Raw: 8888, -481, 3995, -455, 3014, -482, 1022, -489, 1010, -491, 1498, -487, 507, -485, 1022, -476, 268, -252, 492, -490, 1011, -484, 1022, -475, 1025, -474, 1268
[09:14:29.295][I][remote.raw:041]: Received Raw: 8894, -962, 1489, -498, 1498, -471, 533, -489, 499, -481, 2023, -499, 1490, -491, 1025, -490, 515, -490, 514, -468, 511, -261, 769, -475, 513, -473, 268, -250, 2006, -478, 1027, -472, 774
[09:14:29.296][I][remote.raw:041]: Received Raw: 492

billmoseley avatar Oct 16 '25 23:10 billmoseley