NorthernMan54 / rtl_433_ESP

Trial port of the rtl_433 Library for use with OpenMQTTGateway on a ESP32 and a CC1101 Transceiver
GNU General Public License v3.0
520 stars 125 forks source link

Analyze signal and convert to a packet to transmit #142

Open cgmckeever opened 5 months ago

cgmckeever commented 5 months ago

Current Situation

Prior to the RadioLib addition , I was able to have RTL_433_esp co-exist with RC-Switch to transmit known RC-codes. RC-Codes were previously captured with RC-Switch in Rx mode.

The code transmissions were based on these captured/decoded frequency, bits, pulse length, decimal and RC-Switch was specifically written to use the LSatan CC1101 driver

ELECHOUSE_cc1101.setMHZ(command.freq);
ELECHOUSE_cc1101.SetTx();
mySwitch.setPulseLength(command.pulse);
mySwitch.send(command.decimal, command.bits);

With RTL moving to RadioLib, Im trying to understand if/how I can take the known RC-Codes and transmit them using RadioLib. Ideally if there was also a way to capture the raw data not using RC-Switch and use that to transmit when needed.

The use case is

Any suggestions would be appreciated.

Logs

N/A

Configuration

[libraries]
configmanager = https://github.com/nrwiersma/ConfigManager.git
rtl_433_esp = https://github.com/NorthernMan54/rtl_433_ESP.git

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_port = /dev/cu.usbserial-0001
upload_port = /dev/cu.usbserial-0001
upload_speed = 921600
monitor_speed = 921600
lib_deps = 
    ${libraries.configmanager}
        ${libraries.rtl_433_esp}
    thijse/ArduinoLog@^1.1.1
    einararnason/ArduinoQueue@^1.2.5
    lsatan/SmartRC-CC1101-Driver-Lib@^2.5.7
    sui77/rc-switch@^2.6.4
    jgromes/RadioLib@^5.3.0
build_flags =
    '-D ONBOARD_LED=2'
    '-D OOK_MODULATION=true'      ; False is FSK, True is OOK
    '-D RF_CC1101="CC1101"'       ; CC1101 Transceiver Module
    '-D RF_MODULE_GDO0=27'        ; CC1101 pin GDO0 Rx
    '-D RF_MODULE_GDO2=26'        ; CC1101 pin GDO2 Tx
    '-D RF_MODULE_FREQUENCY=433.92'      
    '-D MINRSSI=-100'
    '-D DEMOD_DEBUG=true'
;    '-D RAW_SIGNAL_DEBUG=true'   ; display raw received messages
    '-D SERVER_URL="http://192.168.2.25:1880/"'
    '-D RTL_ANALYZER=true'

Environment

ESP32 w/ CC1101 RF module

Process Supervisor

not applicable

Additional Context

No response