Using a Heltec LoRa 32 433 Mhz with rtf_433_ESP

Well I finally spent some time this month working on getting the RadioLib library to work in OOK/ASK mode with a SX127x transceiver so that I could try it out instead of using a CC1101 as a receiver. And I have something that appears to work. I still need to do some more code cleanup etc, but I have something wired into OMG and receiving / decoding signals from my devices. Now for some testing to see if the receiver is more sensitive than a CC1101.

************* WELCOME TO OpenMQTTGateway **************
N: OpenMQTTGateway Version: esp32_heltec-v0.9.11-51-gc4f431b[development]
N: OTA Hostname: OMG_84CCA84A9154.local
T: Connecting to 67 Bonacres
T: Connecting to The_Beach
N: WiFi ok with manual config credentials
T: OpenMQTTGateway mac: 84:CC:A8:4A:91:54
T: OpenMQTTGateway ip: 192.168.1.119
T: Connecting to MQTT by mDNS without mqtt hostname
T: Browsing for MQTT service
T: 1 service(s) found
T: Service 0 Jesse found
T: IP 192.168.1.11 Port 1883
T: One MQTT server found setting parameters
rtl_433_ESP(6): Pre initReceiver: 199168
rtl_433_ESP(6): SX1278 gpio receive pin: 34
rtl_433_ESP(6): SX1278 receive frequency: 433.920013
rtl_433_ESP(6): sizeof(*cfg->demod) 16
rtl_433_ESP(6): sizeof(*cfg->demod) 16
rtl_433_ESP(6): size of bitbuffer: 6604
rtl_433_ESP(6): size of pulse_data: 9620
rtl_433_ESP(6): # of device(s) configured 101
rtl_433_ESP(6): ssizeof(r_device): 108
rtl_433_ESP(6): cfg->devices size: 10908
rtl_433_ESP(6): # of device(s) enabled 100
rtl_433_ESP(7): Enabling procRtl_433_Task
rtl_433_ESP(6): SX1278 SPI Config SCK: 5, MISO: 19, MOSI: 27, CS: 18
rtl_433_ESP(7): procRtl_433_Task awaiting signal
M       SX127x
rtl_433_ESP(6): SX1278 radio.begin() success!
rtl_433_ESP(6): SX1278 setOOK - success!
rtl_433_ESP(6): SX1278 setDataShapingOOK - success!
rtl_433_ESP(6): SX1278 setOokThresholdType - success!
rtl_433_ESP(6): SX1278 setOokPeakThresholdDecrement - success!
rtl_433_ESP(6): SX1278 setOokFixedOrFloorThreshold - success!
rtl_433_ESP(6): SX1278 setRSSIConfig - success!
rtl_433_ESP(6): SX1278 PREAMBLE_DETECT - success!
rtl_433_ESP(6): Post initReceiver: 106000
rtl_433_ESP(6): SX1278 setBitRate - success!
rtl_433_ESP(6): SX1278 setRxBandwidth - success!
rtl_433_ESP(6): SX1278 setCrcFiltering - success!
rtl_433_ESP(6): SX1278 setDirectSyncWord - success!
rtl_433_ESP(6): SX1278 disableBitSync - success!
rtl_433_ESP(6): SX1278 receiveDirect - success!
----- SX127x Status -----
RegOpMode: 0x2c
RegPacketConfig1: 0x00
RegPacketConfig2: 0x00
RegBitrateMsb: 0x03
RegBitrateLsb: 0xd0
RegRxBw: 0x01
RegAfcBw: 0x02
-------------------------
RegOokPeak: 0x08
RegOokFix: 0x0c
RegOokAvg: 0x72
-------------------------
RegDioMapping1: 0x00
----- SX127x Status -----
T: ZgatewayRTL_433 command topic: home/84CCA84A9154/commands/MQTTtoRTL_433
N: ZgatewayRTL_433 setup done 
T: enableActiveReceiver: 3
N: Switching to RTL_433 Receiver: 433.92Mhz
T: mqtt_max_packet_size: 2560
N: OpenMQTTGateway modules: ["rtl_433"]
N: ************** Setup OpenMQTTGateway end **************
W: MQTT connection...
N: Connected to broker
T: [ OMG->MQTT ] topic: home/84CCA84A9154/LWT msg: online 
T: [ OMG->MQTT ] topic: home/84CCA84A9154/version msg: esp32_heltec-v0.9.11-51-gc4f431b[development] 
T: Subscription OK to the subjects home/84CCA84A9154/commands/#
T: retrieving value of system characteristics Uptime (s):9
N: Send on /SYStoMQTT msg {"uptime":9,"version":"esp32_heltec-v0.9.11-51-gc4f431b[development]","freemem":98352,"mqttport":"1883","mqttsecure":false,"freestack":30528,"rssi":-55,"SSID":"The_Beach","BSSID":"20:C9:D0:1A:CA:85","ip":"192.168.1.119","mac":"84:CC:A8:4A:91:54","actRec":3,"RTLminRssi":-82,"RTLRssi":0,"RTLCnt":0,"modules":["rtl_433"]}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/84CCA84A9154/SYStoMQTT msg: {"uptime":9,"version":"esp32_heltec-v0.9.11-51-gc4f431b[development]","freemem":98352,"mqttport":"1883","mqttsecure":false,"freestack":30528,"rssi":-55,"SSID":"The_Beach","BSSID":"20:C9:D0:1A:CA:85","ip":"192.168.1.119","mac":"84:CC:A8:4A:91:54","actRec":3,"RTLminRssi":-82,"RTLRssi":0,"RTLCnt":0,"modules":["rtl_433"]} 

 rtl_433_ESP(7): procRtl_433_Task awaiting signal
rtl_433_ESP(6): Signal length: 266088, Gap length: 5003358, Signal RSSI: -67, train: 1, messageCount: 1, pulses: 273
rtl_433_ESP(7): processSignal() about to place signal on rtl_433_Queue
rtl_433_ESP(7): processSignal() signal placed on rtl_433_Queue
rtl_433_ESP(7): procRtl_433_Task signal received
rtl_433_ESP(6): Pre run_ook_demods: 91896
rtl_433_ESP(6): data_output {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241}
N: Send on /RTL_433toMQTT msg {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/84CCA84A9154/RTL_433toMQTT msg: {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241} 
T: Post rtl_433_Callback: 87860
rtl_433_ESP(6): data_output {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241}
N: Send on /RTL_433toMQTT msg {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/84CCA84A9154/RTL_433toMQTT msg: {"model":"Acurite-Tower","id":9899,"channel":"C","battery_ok":1,"temperature_C":18.1,"humidity":64,"mic":"CHECKSUM","protocol":"Acurite 592TXR Temp/Humidity, 5n1 Weather Station, 6045 Lightning, 3N1, Atlas","rssi":-67,"duration":266241} 
T: Post rtl_433_Callback: 86272
rtl_433_ESP(6): Signal processing time: 90346
rtl_433_ESP(6): Post run_ook_demods memory 81816
rtl_433_ESP(6): # of messages decoded 2
1 Like

Great news. This would simplify a lot 433mhz board setups!

And enabling the display for OMG, would be another great addition.

1 Like

Reception comparison between RX127x ( Heltec ), CC1101 ( OMG North and South ), and a RTL_SDR running rtl_433.

Please note that each receiver is in a different location.

When looking at the data I was using my LaCrosse TX141-BV3 as a comparison. It was physically closest to the Heltec board and the rtl_433, so the number of received signals should be the same/similar for both. Looks like I need to do more investigation and tuning with the package.

I should also do a distance test as well.

1 Like

I moved the LaCrosse TX141-BV3 to the back of my property, and now only the CC1101 is picking up a signal LOL. Looking at the RSSI Data, you can see that the LaCrosse TX141-BV3 has the weakest signal.

Interesting that the cc1101 picks signal and not the SDR.

That’s partially due to the physical location of each receiver, the RTL_433 is in the basement attached to a RPI, while the OMG North and South are at the North and South ends of the property.

When I did this, I should have been watching the uptime for the Heltec device, as it was panicing every 5 to 10 minutes. With a different non-sensical backtrace each time, the only thing I found that was consistent was when the HEAP dropped below 80K it would panic shortly afterwards.

So I spent some effort on memory management, and am fingers crossed stable. Just running long term stability tests now.

With the signals I did receive I had thought that with the Heltec I would receive significantly better results, but so far no. After I complete the stability tests, going to look at the AGC and other options on the Heltec.

My next update - have resolved the random panic issue and at the same time identified what was consuming majority of the RAM in my module. Identified that the blueline device decoder is malloc’ing 64k of ram on initialization, so I removed it as a included module, and memory usage is now significantly lower ( it may be possible to run rtl_433 and bluetooth at the same time now ;-). I also spent time with the SX127x data sheet and twiddling the various knobs, and have improved the signal reception consistency, and it now receives the same or more signals than my other devices.

Range is not significantly different than a CC1101 though, but I have more knob turning to do.

In the image you can see that my LaCrosse TX141BV3 is not being received by the Heltec device.

For my next round of tests, I will try and place the receivers in the same location, so the results are more comparable.

1 Like