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 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1cae9dd
Add support for Audiovox Car Remotes
eshaz Dec 24, 2023
0a6d037
fix: audiovox decoder settings
eshaz Dec 25, 2023
594da6b
Add support for Astrostart 2000 car remote
eshaz Dec 25, 2023
36ed0bb
fix: formatting
eshaz Dec 25, 2023
73df43e
fix: checksum calculation
eshaz Dec 25, 2023
bdeab74
Add support for Compustar 700R Car Remote
eshaz Dec 25, 2023
d6ccd09
feat: additional sanity checks
eshaz Dec 25, 2023
5353f19
Add support for Compustar 1WG3R Car Remote
eshaz Dec 25, 2023
d743eb6
feat: more descriptive return codes, sanity checks
eshaz Dec 25, 2023
947db2b
feat: add supported model number
eshaz Dec 25, 2023
fa8dfc5
fix: formatting
eshaz Dec 25, 2023
301a892
feat: add malloc failure check
eshaz Dec 25, 2023
3aef2a2
Add support for Chrysler Car Remote
eshaz Dec 26, 2023
5196b9a
doc: update protocol descriptions
eshaz Dec 26, 2023
d8de94d
feat: fine tuning
eshaz Dec 27, 2023
fc44bde
Add support for Honda Car Remote
eshaz Dec 27, 2023
a694853
fix: model name
eshaz Dec 27, 2023
2ad4561
fix: models list
eshaz Dec 27, 2023
a899d89
Add support for Audiovox PRO-OE3B
eshaz Dec 28, 2023
789a904
fix: docs
eshaz Dec 28, 2023
0c671a8
refactor: merge compustar 700r with existing decoder
eshaz Dec 28, 2023
9774f8a
fix: remove readme change
eshaz Dec 28, 2023
0306169
fix: remote model name
eshaz Dec 28, 2023
75d516e
Add support for Microchip HCS361
eshaz Dec 28, 2023
97aee91
fix: reduce priority of remote with no mic
eshaz Dec 28, 2023
848fd51
Add support for 6SC0 Car Remote
eshaz Dec 29, 2023
f833743
fix: model name
eshaz Dec 29, 2023
9dcd277
Add support for GM ABO1502T Car Remote
eshaz Dec 29, 2023
fb57e56
Add support for Siemens 5WY72XX Car Remote
eshaz Dec 29, 2023
f9e778d
Add support for Alps FWB1U545 car remote
eshaz Dec 30, 2023
6b064d7
fix: use fsk modulation
eshaz Dec 30, 2023
b0946e9
Add support for Continental KR5V2X Car Remote
eshaz Dec 30, 2023
7eae2ec
refactor: astrostart 2000 to use strings for buttons and id
eshaz Dec 30, 2023
6077f7d
fix: Nidec remote id
eshaz Dec 30, 2023
5621403
refactor: nutek remote to use string id and code
eshaz Dec 30, 2023
3a066b3
Fix Ford Car Remote decoding
eshaz Dec 31, 2023
b2f7df5
refactor: use represent buttons and ids as hex strings
eshaz Dec 31, 2023
09685d0
Add support for Microchip HCS361 PIWM modulation
eshaz Jan 1, 2024
ffd9a9c
Add support for Code Alarm FRDPC2002 Car Remote
eshaz Jan 1, 2024
12be518
fix: enhance chrysler remote reliability
eshaz Jan 2, 2024
0a3efb0
fix: frequencies
eshaz Jan 9, 2024
4b9b27e
fix: update frequencies
eshaz Jan 10, 2024
b83e70f
refactor: move nutek remote to conf file
eshaz Jan 10, 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 @@ -337,6 +337,23 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md).
[249] Bresser lightning
[250] Schou 72543 Day Rain Gauge, Motonet MTX Rain, MarQuant Rain Gauge
[251] Fine Offset / Ecowitt WH55 water leak sensor
[252] Astrostart 2000 Car Remote (-f 372.4M)
[253] Compustar 1WG3R Car Remote
[254] Chrysler Car Remote (-f 315.1M -s 920k)
[255] Nidec Car Remote (-f 313.8M -s 1024k)
[256] Audiovox PRO-OE3B Car Remote (-f 303.4M)
[257] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 833 bit/s)
[258] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 1667 bit/s)
[259] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 833 bit/s)
[260] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 1667 bit/s)
[261] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 2500 bit/s)
[262] Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 5000 bit/s)
[263] 6SC2 Car Remote (-f 315.1M)
[264] GM ABO1502T Car Remote (-f 314.9M)
[265] Siemens 5WY72XX Car Remote (-f 315.1M)
[266] Alps FWB1U545 Car Remote
[267] Continental KR5V2X Car Remote (-f 313.8M -s 1024k)
[268] 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,
}
19 changes: 18 additions & 1 deletion 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 @@ -478,6 +478,23 @@ convert si
protocol 249 # Bresser lightning
protocol 250 # Schou 72543 Day Rain Gauge, Motonet MTX Rain, MarQuant Rain Gauge
protocol 251 # Fine Offset / Ecowitt WH55 water leak sensor
protocol 252 # Astrostart 2000 Car Remote (-f 372.4M)
protocol 253 # Compustar 1WG3R Car Remote
protocol 254 # Chrysler Car Remote (-f 315.1M -s 920k)
protocol 255 # Nidec Car Remote (-f 313.8M -s 1024k)
protocol 256 # Audiovox PRO-OE3B Car Remote (-f 303.4M)
protocol 257 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 833 bit/s)
protocol 258 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (Sync, 1667 bit/s)
protocol 259 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 833 bit/s)
protocol 260 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (No Sync, 1667 bit/s)
protocol 261 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 2500 bit/s)
protocol 262 # Microchip HCS361 KeeLoq Hopping Encoder based remotes (-f 315.1M) (PIWM, 5000 bit/s)
protocol 263 # 6SC2 Car Remote (-f 315.1M)
protocol 264 # GM ABO1502T Car Remote (-f 314.9M)
protocol 265 # Siemens 5WY72XX Car Remote (-f 315.1M)
protocol 266 # Alps FWB1U545 Car Remote
protocol 267 # Continental KR5V2X Car Remote (-f 313.8M -s 1024k)
protocol 268 # Code Alarm FRDPC2002 Car Remote

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

Expand Down
19 changes: 18 additions & 1 deletion include/rtl_433_devices.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
DECL(tpms_renault) \
DECL(infactory) \
DECL(ft004b) \
DECL(fordremote) \
DECL(ford_car_remote) \
DECL(philips_aj3650) \
DECL(schrader_EG53MA4) \
DECL(nexa) \
Expand Down Expand Up @@ -259,6 +259,23 @@
DECL(bresser_lightning) \
DECL(schou_72543_rain) \
DECL(fineoffset_wh55) \
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,17 +43,21 @@ add_library(r_433 STATIC
term_ctl.c
util.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/archos_tbh.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 @@ -77,9 +81,13 @@ add_library(r_433 STATIC
devices/cavius.c
devices/ced7000.c
devices/celsia_czc1.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 @@ -126,11 +134,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 @@ -177,6 +187,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 @@ -208,6 +219,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) 2023 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