4 * Cardin S466-TX2 generic garage door remote control on 27.195 Mhz
5 * Remember to set de freq right with -f 27195000
6 * May be usefull for other Cardin product too
8 * Copyright (C) 2015 Denis Bodor
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 static int cardin_callback(bitbuffer_t *bitbuffer) {
15 bitrow_t *bb = bitbuffer->bb;
17 unsigned char dip[10] = {'-','-','-','-','-','-','-','-','-', '\0'};
19 // validate message as we can
20 if((bb[0][2] & 48) == 0 && bitbuffer->bits_per_row[0] == 24 && (
21 (bb[0][2] & 3) == 3 ||
22 (bb[0][2] & 9) == 9 ||
23 (bb[0][2] & 12) == 12 ||
24 (bb[0][2] & 6) == 6) ) {
26 fprintf(stdout, "------------------------------\n");
27 fprintf(stdout, "protocol = Cardin S466\n");
28 fprintf(stdout, "message = ");
29 for (i=0 ; i<3 ; i++) {
30 for (k = 7; k >= 0; k--) {
31 if (bb[0][i] & 1 << k)
38 fprintf(stdout, "\n\n");
95 fprintf(stdout, " 123456789\n");
96 fprintf(stdout, "dipswitch = %s\n\n",dip);
98 fprintf(stdout, " -->ON\n");
99 fprintf(stdout, "right button = ");
100 if((bb[0][2] & 3) == 3) {
101 fprintf(stdout, "2 --o (this is right button)\n");
102 fprintf(stdout, " 1 --o\n");
104 if((bb[0][2] & 9) == 9) {
105 fprintf(stdout, "2 --o (this is right button)\n");
106 fprintf(stdout, " 1 o--\n");
108 if((bb[0][2] & 12) == 12) {
109 fprintf(stdout, "2 o-- (this is left button or two buttons on same channel)\n");
110 fprintf(stdout, " 1 o--\n");
112 if((bb[0][2] & 6) == 6) {
113 fprintf(stdout, "2 o-- (this is right button)\n");
114 fprintf(stdout, " 1 --o\n");
123 .name = "Cardin S466-TX2",
124 .modulation = OOK_PULSE_PPM_RAW,
127 .reset_limit = 32000,
128 .json_callback = &cardin_callback,