You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/components/cc1101.md
+82-76Lines changed: 82 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,106 +16,114 @@ This component requires the [SPI Component](spi.md) to be enabled.
16
16
## Component Configuration
17
17
18
18
```yaml
19
-
# Minimal Example
19
+
# Minimal Example (DUAL_PIN is the default operation_mode)
20
20
cc1101:
21
21
cs_pin: GPIOXX
22
-
gdo0_pin: GPIOXX
23
22
frequency: 433.92MHz
24
23
```
25
24
26
25
## Configuration Variables
27
26
28
27
### Hardware Settings
28
+
- **cs_pin** (**Required**, [Pin](pin.md)): The SPI Chip Select (CSN) pin connected to the module.
29
29
30
-
- **cs\_pin** (**Required**, [Pin](pin.md)): The SPI Chip Select (CSN) pin connected to the module.
31
-
- **gdo0\_pin** (**Required**, [Pin](pin.md)): The pin connected to **GDO0** on the CC1101.
32
-
- **Note:** `remote_transmitter` **must** use the pin connected to **GDO0** to transmit successfully.
30
+
- **operation_mode** (Optional, enum): Defines the role of the CC1101 GDO pins based on your wiring setup. This is crucial for correct TX/RX operation.
31
+
- `DUAL_PIN` (Default): Configures the module for separate TX and RX data pins. Internally sets GDO0 (Module Pin 3) for TX Data Input and GDO2 (Module Pin 8) for RX Data Output. This is the recommended mode.
32
+
- `SINGLE_PIN`: Configures GDO0 (Module Pin 3) for bi-directional Serial I/O and sets GDO2 to high impedance. This mode requires only one MCU GPIO pin for both TX and RX.
33
33
34
34
### General Settings
35
35
36
36
- **frequency** (*Optional*, frequency): The operating frequency. Range: `300MHz` to `928MHz`. Default: `433.92MHz`.
37
-
- **output\_power** (*Optional*, float): The transmission power in dBm. Range: `-30` to `11`. Default: `10`.
This component provides actions to control the radio state, primarily used for coordinating transmission.
71
71
72
-
- **cc1101.begin\_tx**: Wakes the radio and forces it into TX mode. This **must** be called before `remote_transmitter` starts sending data.
73
-
- **cc1101.end\_tx**: Puts the radio back into RX mode and resets the pin configuration to safe defaults.
72
+
- **cc1101.begin_tx**: Wakes the radio and forces it into TX mode. This **must** be called before `remote_transmitter` starts sending data.
73
+
- **cc1101.end_tx**: Puts the radio back into RX mode and resets the pin configuration to safe defaults.
74
74
- **cc1101.reset**: Resets the CC1101 chip and re-applies configuration.
75
75
- **cc1101.set_idle**: Puts the radio into idle state.
76
76
77
-
### Example Transmit Button
77
+
## Integration with Remote Receiver/Transmitter
78
+
79
+
### 1. Dual Pin Wiring (operation_mode: DUAL_PIN)
80
+
This mode is recommended for simplicity and clarity. The CC1101 chip handles the input/output logic internally, requiring minimal external pin configuration.
81
+
82
+
- **GDO0 (Module Pin 3)**: Connect to the MCU pin used by `remote_transmitter`.
83
+
- **GDO2 (Module Pin 8)**: Connect to the MCU pin used by `remote_receiver`.
78
84
79
85
```yaml
80
-
button:
81
-
- platform: template
82
-
name: "Send Signal"
83
-
on_press:
84
-
- remote_transmitter.transmit_raw:
85
-
code: [1000, -1000, 1000, -1000]
86
-
repeat: 5
87
-
```
86
+
cc1101:
87
+
cs_pin: GPIOXX
88
88
89
-
## Integration with Remote Receiver/Transmitter
89
+
remote_transmitter:
90
+
pin: GPIOXX # Must match GDO0
91
+
carrier_duty_percent: 100%
92
+
on_transmit:
93
+
then:
94
+
- cc1101.set_idle:
95
+
- remote_transmitter.digital_write: false
96
+
- cc1101.begin_tx:
97
+
on_complete:
98
+
then:
99
+
- cc1101.set_idle:
100
+
- remote_transmitter.digital_write: true
101
+
- cc1101.end_tx:
90
102
91
-
### Wiring for Single Pin Usage
103
+
remote_receiver:
104
+
pin: GPIOXX # CC1101 GDO2
105
+
dump: all
106
+
```
92
107
93
-
Wire **GDO0** to a single GPIO and use it for both TX and RX.
108
+
### 2. Single Pin Wiring - Push-Pull (with State Switching)
109
+
This mode requires only one MCU GPIO pin connected to GDO0 (Module Pin 3). Since the MCU pin operates in Push-Pull mode, manual switching between Input and Output logic is required inside the automation to avoid conflicts.
110
+
111
+
- **GDO0 (Module Pin 3)**: Connect to a single MCU GPIO pin.
112
+
- **GDO2 (Module Pin 8)**: Leave disconnected.
94
113
95
114
```yaml
96
115
cc1101:
97
-
gdo0_pin:
98
-
pin:
99
-
number: GPIOXX # CC1101 GDO0
100
-
mode:
101
-
input: true
102
-
output: true
103
-
pullup: true
104
-
open_drain: true
105
-
allow_other_uses: true
116
+
cs_pin: GPIOXX
117
+
operation_mode: SINGLE_PIN
106
118
107
119
remote_transmitter:
108
-
pin:
120
+
pin:
109
121
number: GPIOXX # Must match GDO0
110
-
mode:
111
-
input: true
112
-
output: true
113
-
pullup: true
114
-
open_drain: true
115
122
allow_other_uses: true
116
123
carrier_duty_percent: 100%
117
124
on_transmit:
118
125
then:
126
+
- remote_receiver.disable:
119
127
- cc1101.set_idle:
120
128
- remote_transmitter.digital_write: false
121
129
- cc1101.begin_tx:
@@ -124,44 +132,36 @@ remote_transmitter:
124
132
- cc1101.set_idle:
125
133
- remote_transmitter.digital_write: true
126
134
- cc1101.end_tx:
135
+
- remote_receiver.enable:
127
136
128
137
remote_receiver:
129
-
pin:
138
+
pin:
130
139
number: GPIOXX # Must match GDO0
131
-
mode:
132
-
input: true
133
-
output: true
134
-
pullup: true
135
-
open_drain: true
136
140
allow_other_uses: true
137
141
dump: all
138
142
```
139
143
140
-
### Wiring for Split Pin Usage
144
+
### 3. Single Pin Wiring - Open Drain
145
+
This mode also requires only one MCU GPIO pin connected to GDO0 (Module Pin 3), but is simpler as the Open Drain configuration automatically handles the logic state switching without needing complex on_transmit/on_complete automation logic.
141
146
142
-
- **GDO0 (Pin 3)**: Connect to the pin used by `remote_transmitter`.
143
-
- **GDO2 (Pin 8)**: Connect to the pin used by `remote_receiver`.
147
+
- **GDO0 (Module Pin 3)**: Connect to a single MCU GPIO pin configured as Open Drain.
148
+
- **GDO2 (Module Pin 8)**: Leave disconnected.
144
149
145
150
```yaml
146
151
cc1101:
147
-
gdo0_pin:
148
-
number: GPIOXX # Must match GDO0
149
-
mode:
150
-
input: true
151
-
output: true
152
-
pullup: true
153
-
open_drain: true
154
-
allow_other_uses: true
152
+
cs_pin: GPIOXX
153
+
operation_mode: SINGLE_PIN
155
154
156
155
remote_transmitter:
157
-
pin:
156
+
pin:
158
157
number: GPIOXX # Must match GDO0
159
158
mode:
160
159
input: true
161
160
output: true
162
161
pullup: true
163
162
open_drain: true
164
163
allow_other_uses: true
164
+
eot_level: false
165
165
carrier_duty_percent: 100%
166
166
on_transmit:
167
167
then:
@@ -175,19 +175,25 @@ remote_transmitter:
175
175
- cc1101.end_tx:
176
176
177
177
remote_receiver:
178
-
pin: GPIOXX # CC1101 GDO2
178
+
pin:
179
+
number: GPIOXX # Must match GDO0
180
+
mode:
181
+
input: true
182
+
output: true
183
+
pullup: true
184
+
open_drain: true
185
+
allow_other_uses: true
179
186
dump: all
180
187
```
181
188
182
189
## Troubleshooting
183
190
184
191
### "FF0F was found" Error
185
-
186
192
If you see a log entry stating `FF0F`, `0000`, or `FFFF` during setup, this indicates an SPI communication failure. Check your wiring (MISO/MOSI/CS).
187
193
188
194
### No Signal during Transmit
189
-
190
-
- **Check Pinout:** Ensure `remote_transmitter` is assigned to the pin physically connected to **GDO0**. The CC1101 **only** supports transmission via GDO0.
195
+
- **Check Pinout**: For all modes, the data line must be connected to GDO0 (Module Pin 3), as the CC1101 chip only supports transmission input via the GDO0 pin.
196
+
- **Check Pin Mode**: If using the Single Pin Push-Pull mode, ensure your on_transmit/on_complete logic correctly flips the pin's status.
0 commit comments