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

Add support for Car Remotes #2764

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
81ad7b3
Add support for Audiovox Car Remotes
eshaz Dec 24, 2023
c4a6b90
fix: audiovox decoder settings
eshaz Dec 25, 2023
1851145
Add support for Astrostart 2000 car remote
eshaz Dec 25, 2023
2343202
fix: formatting
eshaz Dec 25, 2023
7ce21a0
fix: checksum calculation
eshaz Dec 25, 2023
b3fd82e
Add support for Compustar 700R Car Remote
eshaz Dec 25, 2023
150c59c
feat: additional sanity checks
eshaz Dec 25, 2023
1e82816
Add support for Compustar 1WG3R Car Remote
eshaz Dec 25, 2023
dc40bdc
feat: more descriptive return codes, sanity checks
eshaz Dec 25, 2023
ecf01fc
feat: add supported model number
eshaz Dec 25, 2023
519b9f6
fix: formatting
eshaz Dec 25, 2023
30d5581
feat: add malloc failure check
eshaz Dec 25, 2023
638ddd8
Add support for Chrysler Car Remote
eshaz Dec 26, 2023
ad84cf9
doc: update protocol descriptions
eshaz Dec 26, 2023
2a0ff86
feat: fine tuning
eshaz Dec 27, 2023
128404d
Add support for Honda Car Remote
eshaz Dec 27, 2023
adc0800
fix: model name
eshaz Dec 27, 2023
182390c
fix: models list
eshaz Dec 27, 2023
83ae2f6
Add support for Audiovox PRO-OE3B
eshaz Dec 28, 2023
2050171
fix: docs
eshaz Dec 28, 2023
79b6ef9
refactor: merge compustar 700r with existing decoder
eshaz Dec 28, 2023
62cec56
fix: remove readme change
eshaz Dec 28, 2023
0a5f1f6
fix: remote model name
eshaz Dec 28, 2023
3330a15
Add support for Microchip HCS361
eshaz Dec 28, 2023
9779a25
fix: reduce priority of remote with no mic
eshaz Dec 28, 2023
91532ac
Add support for 6SC0 Car Remote
eshaz Dec 29, 2023
5f6ca19
fix: model name
eshaz Dec 29, 2023
5c6392f
Add support for GM ABO1502T Car Remote
eshaz Dec 29, 2023
232c560
Add support for Siemens 5WY72XX Car Remote
eshaz Dec 29, 2023
8d8a08d
Add support for Alps FWB1U545 car remote
eshaz Dec 30, 2023
d910157
fix: use fsk modulation
eshaz Dec 30, 2023
048fa08
Add support for Continental KR5V2X Car Remote
eshaz Dec 30, 2023
fe42799
refactor: astrostart 2000 to use strings for buttons and id
eshaz Dec 30, 2023
ea58c2e
fix: Nidec remote id
eshaz Dec 30, 2023
ecd0d0b
refactor: nutek remote to use string id and code
eshaz Dec 30, 2023
4b46919
Fix Ford Car Remote decoding
eshaz Dec 31, 2023
e7911d1
refactor: use represent buttons and ids as hex strings
eshaz Dec 31, 2023
2fddbd3
Add support for Microchip HCS361 PIWM modulation
eshaz Jan 1, 2024
b1d537c
Add support for Code Alarm FRDPC2002 Car Remote
eshaz Jan 1, 2024
53f19cf
fix: enhance chrysler remote reliability
eshaz Jan 2, 2024
02ff4d4
fix: frequencies
eshaz Jan 9, 2024
e1b324c
fix: update frequencies
eshaz Jan 10, 2024
6a698f8
refactor: move nutek remote to conf file
eshaz Jan 10, 2024
96a90c4
chore: rebase on master
eshaz Dec 15, 2024
5e0871c
chore: add linebreaks
eshaz Dec 15, 2024
a44ebef
fix: ford remote
eshaz Dec 15, 2024
ad4ac24
fix: siemens remote
eshaz Dec 15, 2024
2c3f0bb
update copyright
eshaz Dec 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md).
[90] Renault TPMS
[91] inFactory, nor-tec, FreeTec NC-3982-913 temperature humidity sensor
[92] FT-004-B Temperature Sensor
[93] Ford Car Key
[93] Ford Car Remote
[94] Philips outdoor temperature sensor (type AJ3650)
[95] Schrader TPMS EG53MA4, PA66GF35
[96] Nexa
Expand Down Expand Up @@ -356,6 +356,23 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md).
[268] Bresser Thermo-/Hygro-Sensor Explore Scientific ST1005H
[269] DeltaDore X3D devices
[270]* Quinetic
[271] Astrostart 2000 Car Remote (-f 372.4M)
[272] Compustar 1WG3R Car Remote
[273] Chrysler Car Remote (-f 315.1M -s 920k)
[274] Nidec Car Remote (-f 313.8M -s 1024k)
[275] Audiovox PRO-OE3B Car Remote (-f 303.4M)
[276] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 833 bit/s)
[277] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 1667 bit/s)
[278] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 833 bit/s)
[279] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 1667 bit/s)
[280] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 2500 bit/s)
[281] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 5000 bit/s)
[282] 6SC2 Car Remote (-f 315.1M)
[283] GM ABO1502T Car Remote (-f 314.9M)
[284] Siemens 5WY72XX Car Remote (-f 315.1M)
[285] Alps FWB1U545 Car Remote
[286] Continental KR5V2X Car Remote (-f 313.8M -s 1024k)
[287] Code Alarm FRDPC2002 Car Remote

* Disabled by default, use -R n or a conf file to enable

Expand Down
48 changes: 48 additions & 0 deletions conf/nutek_car_remote.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Nutek - Car Remote
#
# See https://github.com/merbanan/rtl_433_tests/tree/master/tests/nutek_car_remote/README.md
#
# Manufacturer:
# - Nutek
#
# Supported Models:
# - ATCD-1, APS99BT3BCF4, ATCH (FCC ID ELVATCD)
# - AVX1BS4, AVX-1BS4 (FCC ID ELVATCC)
# - A1BTX (FCC ID ELVATFE)
# - 105BP (FCC ID ELVATJA)
#
# Data structure:
#
# Nutek Type 4 and Code Alarm Type 7 Transmitters
#
# Transmitter uses a rolling code that changes between each button press.
# The same code is continuously repeated while button is held down.
#
# On some models, multiple buttons can be pressed to set multiple button flags.
#
# Data layout:
#
# x IIII CCCC B
#
# - x: 1 bit always 1
# - I: 16 bit ID
# - C: 16 bit rolling code, likely encrypted using symmetric encryption
# - B: 4 bit flags indicating button(s) pressed
#
# Format string:
#
# PREAMBLE: b ID: hhhh CODE: hhhh BUTTON: bbbb

decoder {
name=Nutek-CarRemote,
modulation=OOK_PWM,
short=500,
long=945,
reset=20000,
gap=4050,
sync=2000,
bits=37,
get=@1:{16}:id,
get=@17:{16}:code,
get=@33:{4}:button,
}
21 changes: 19 additions & 2 deletions conf/rtl_433.example.conf
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ convert si
protocol 90 # Renault TPMS
protocol 91 # inFactory, nor-tec, FreeTec NC-3982-913 temperature humidity sensor
protocol 92 # FT-004-B Temperature Sensor
protocol 93 # Ford Car Key
protocol 93 # Ford Car Remote
protocol 94 # Philips outdoor temperature sensor (type AJ3650)
protocol 95 # Schrader TPMS EG53MA4, PA66GF35
protocol 96 # Nexa
Expand Down Expand Up @@ -496,7 +496,24 @@ convert si
protocol 267 # ThermoPro Meat Thermometers, TP828B 2 probes with Temp, BBQ Target LO and HI
protocol 268 # Bresser Thermo-/Hygro-Sensor Explore Scientific ST1005H
protocol 269 # DeltaDore X3D devices
# protocol 268 # Quinetic
# protocol 270 # Quinetic
protocol 271 # Astrostart 2000 Car Remote (-f 372.4M)
protocol 272 # Compustar 1WG3R Car Remote
protocol 273 # Chrysler Car Remote (-f 315.1M -s 920k)
protocol 274 # Nidec Car Remote (-f 313.8M -s 1024k)
protocol 275 # Audiovox PRO-OE3B Car Remote (-f 303.4M)
protocol 276 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 833 bit/s)
protocol 277 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 1667 bit/s)
protocol 278 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 833 bit/s)
protocol 279 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 1667 bit/s)
protocol 280 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 2500 bit/s)
protocol 281 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 5000 bit/s)
protocol 282 # 6SC2 Car Remote (-f 315.1M)
protocol 283 # GM ABO1502T Car Remote (-f 314.9M)
protocol 284 # Siemens 5WY72XX Car Remote (-f 315.1M)
protocol 285 # Alps FWB1U545 Car Remote
protocol 286 # Continental KR5V2X Car Remote (-f 313.8M -s 1024k)
protocol 287 # Code Alarm FRDPC2002 Car Remote

## Flex devices (command line option "-X")

Expand Down
17 changes: 17 additions & 0 deletions include/rtl_433_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,23 @@
DECL(bresser_st1005h) \
DECL(deltadore_x3d) \
DECL(quinetic) \
DECL(astrostart_2000) \
DECL(compustar_1wg3r) \
DECL(chrysler_car_remote) \
DECL(nidec_car_remote) \
DECL(audiovox_pro_oe3b) \
DECL(hcs361_txwak_0_bsel_0) \
DECL(hcs361_txwak_0_bsel_1) \
DECL(hcs361_txwak_1_bsel_0) \
DECL(hcs361_txwak_1_bsel_1) \
DECL(hcs361_vpwm_1_bsel_0) \
DECL(hcs361_vpwm_1_bsel_1) \
DECL(six_sc_two_car_remote) \
DECL(gm_car_remote) \
DECL(siemens_5wy72xx_car_remote) \
DECL(alps_fwb1u545_car_remote) \
DECL(continental_car_remote) \
DECL(code_alarm_frdpc2000_car_remote)

/* Add new decoders here. */

Expand Down
12 changes: 12 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,23 @@ add_library(r_433 STATIC
sdr.c
term_ctl.c
write_sigrok.c
devices/6sc2.c
devices/abmt.c
devices/acurite.c
devices/acurite_01185m.c
devices/akhan_100F14.c
devices/alecto.c
devices/alps_fwb1u545.c
devices/ambient_weather.c
devices/ambientweather_tx8300.c
devices/ambientweather_wh31e.c
devices/ant_antplus.c
devices/arad_ms_meter.c
devices/archos_tbh.c
devices/arexx_ml.c
devices/astrostart_2000.c
devices/atech_ws308.c
devices/audiovox_pro_oe3b.c
devices/auriol_4ld5661.c
devices/auriol_aft77b2.c
devices/auriol_afw2a1.c
Expand All @@ -81,9 +85,13 @@ add_library(r_433 STATIC
devices/ced7000.c
devices/celsia_czc1.c
devices/chamberlain_cwpirc.c
devices/chrysler_car_remote.c
devices/chuango.c
devices/cmr113.c
devices/code_alarm_car_remote.c
devices/companion_wtr001.c
devices/compustar_1wg3r.c
devices/continental_car_remote.c
devices/cotech_36_7959.c
devices/current_cost.c
devices/danfoss.c
Expand Down Expand Up @@ -133,11 +141,13 @@ add_library(r_433 STATIC
devices/generic_remote.c
devices/generic_temperature_sensor.c
devices/geo_minim.c
devices/gm_car_remote.c
devices/govee.c
devices/gt_tmbbq05.c
devices/gt_wt_02.c
devices/gt_wt_03.c
devices/hcs200.c
devices/hcs361.c
devices/hideki.c
devices/holman_ws5029.c
devices/hondaremote.c
Expand Down Expand Up @@ -185,6 +195,7 @@ add_library(r_433 STATIC
devices/nexa.c
devices/nexus.c
devices/nice_flor_s.c
devices/nidec_car_remote.c
devices/norgo.c
devices/oil_smart.c
devices/oil_standard.c
Expand Down Expand Up @@ -219,6 +230,7 @@ add_library(r_433 STATIC
devices/secplus_v1.c
devices/secplus_v2.c
devices/sharp_spc775.c
devices/siemens_5wy72xx.c
devices/silvercrest.c
devices/simplisafe.c
devices/simplisafe_gen3.c
Expand Down
119 changes: 119 additions & 0 deletions src/devices/6sc2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/** @file
6SC2 - Car Remote.

Copyright (C) 2024 Ethan Halsall

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
/** @fn int six_sc_two_car_remote_decode(r_device *decoder, bitbuffer_t *bitbuffer)
6SC2 - Car Remote (315 MHz)

Manufacturer:
- Unknown

Supported Models:
- 6SC2 CMGU
- 6SC2 CDFA

Data structure:

The transmitter uses a rolling code message with an unencrypted sequence number.

Button operation:
This transmitter has up to 4 buttons which can be pressed once to transmit a single message

Data layout:

Bytes are reflected

PPPP EEEEEEEE bbbb uuuu SSSS CC

- P: 16 bit preamble
- E: 32 bit encrypted
- b: 4 bit button
- u: 4 bit unknown
- S: 16 bit sequence
- C: 8 bit checksum

Format string:

PREAMBLE: hhhh ENCRYPTED: hh hh hh hh BUTTON: bbbb UNKNOWN: bbbb SEQUENCE: hhhh CHECKSUM: hh

*/

#include "decoder.h"

static int six_sc_two_car_remote_decode(r_device *decoder, bitbuffer_t *bitbuffer)
{
int row = bitbuffer_find_repeated_row(bitbuffer, 1, 48);

if (bitbuffer->bits_per_row[0] > 88) {
return DECODE_ABORT_LENGTH;
}

uint8_t *bytes = bitbuffer->bb[row];

if (bytes[0] != 0x55 || bytes[1] != 0x54) {
return DECODE_FAIL_SANITY;
}

if (xor_bytes(bytes + 2, 9)) {
return DECODE_FAIL_MIC;
}

// The transmission is LSB first, big endian.
uint32_t encrypted = ((unsigned)reverse8(bytes[5]) << 24) | (reverse8(bytes[4]) << 16) | (reverse8(bytes[3]) << 8) | (reverse8(bytes[2]));
int button = reverse8(bytes[6]) & 0xf;
int sequence = ((unsigned)(reverse8(bytes[8]) << 8) | reverse8(bytes[7]));

char encrypted_str[9];
snprintf(encrypted_str, sizeof(encrypted_str), "%08X", encrypted);

char const *button_str;

/* clang-format off */
switch (button) {
case 0x1: button_str = "Unlock"; break;
case 0x2: button_str = "Lock"; break;
case 0x3: button_str = "Trunk"; break;
case 0x4: button_str = "Panic"; break;
default: button_str = "?"; break;
}
/* clang-format on */

/* clang-format off */
data_t *data = data_make(
"model", "model", DATA_STRING, "6SC2-CarRemote",
"encrypted", "", DATA_STRING, encrypted_str,
"button_code", "Button Code", DATA_INT, button,
"button_str", "Button", DATA_STRING, button_str,
"sequence", "Sequence", DATA_INT, sequence,
"mic", "Integrity", DATA_STRING, "CHECKSUM",
NULL);
/* clang-format on */

decoder_output_data(decoder, data);
return 1;
}

static char const *const output_fields[] = {
"model",
"encrypted",
"button_code",
"button_str",
"sequence",
"mic",
NULL,
};

r_device const six_sc_two_car_remote = {
.name = "6SC2 Car Remote (-f 315.1M)",
.modulation = OOK_PULSE_MANCHESTER_ZEROBIT,
.short_width = 250,
.reset_limit = 10000,
.decode_fn = &six_sc_two_car_remote_decode,
.fields = output_fields,
};
Loading
Loading