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

Mixing LoRa and rtl_433 #1938

Open
alucryd opened this issue Apr 23, 2024 · 1 comment
Open

Mixing LoRa and rtl_433 #1938

alucryd opened this issue Apr 23, 2024 · 1 comment

Comments

@alucryd
Copy link

alucryd commented Apr 23, 2024

Is your feature request related to a problem? Please describe.
I've got an ESP board with 2 SX1278 chips, currently dedicated to LoRa and working great. I'd like to listen to LoRa devices on the first chip, and FSK devices on the second chip. However trying to build OMG with both LoRa and FSK fails, I guess it's not intended to be used that way?

Compiling .pio/build/makerfabs-wrover-lora-32-868/lib778/PubSubClient/PubSubClient.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib72b/ArduinoLog/ArduinoLog.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFi.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiAP.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiClient.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiGeneric.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiMulti.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiSTA.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiScan.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiServer.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib88e/WiFi/WiFiUdp.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib122/DNSServer/DNSServer.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/libd7c/ESPmDNS/ESPmDNS.cpp.o
Archiving .pio/build/makerfabs-wrover-lora-32-868/lib72b/libArduinoLog.a
Indexing .pio/build/makerfabs-wrover-lora-32-868/lib72b/libArduinoLog.a
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib1ed/Update/HttpsOTAUpdate.cpp.o
Archiving .pio/build/makerfabs-wrover-lora-32-868/lib778/libPubSubClient.a
Indexing .pio/build/makerfabs-wrover-lora-32-868/lib778/libPubSubClient.a
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib1ed/Update/Updater.cpp.o
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayRTL_433.ino:52:16: error: ambiguating new declaration of 'RTL_433device* getDeviceById(const char*)'
 RTL_433device* getDeviceById(const char* id); // Declared here to avoid pre-compilation issue (misplaced auto declaration by pio)
                ^~~~~~~~~~~~~
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayLORA.ino:52:13: note: old declaration 'LORAdevice* getDeviceById(const char*)'
 LORAdevice* getDeviceById(const char* id) {
             ^~~~~~~~~~~~~
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayRTL_433.ino:53:16: error: ambiguating new declaration of 'RTL_433device* getDeviceById(const char*)'
 RTL_433device* getDeviceById(const char* id) {
                ^~~~~~~~~~~~~
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayLORA.ino:52:13: note: old declaration 'LORAdevice* getDeviceById(const char*)'
 LORAdevice* getDeviceById(const char* id) {
             ^~~~~~~~~~~~~
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayRTL_433.ino: In function 'void createOrUpdateDeviceRTL_433(const char*, const char*, uint8_t)':
/home/alucryd/Projects/OpenMQTTGateway/main/ZgatewayRTL_433.ino:79:43: error: cannot convert 'LORAdevice*' to 'RTL_433device*' in initialization
   RTL_433device* device = getDeviceById(id);
                                           ^
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib401/FS/FS.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib401/FS/vfs_api.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib6b9/WebServer/Parsing.cpp.o
Archiving .pio/build/makerfabs-wrover-lora-32-868/lib122/libDNSServer.a
Indexing .pio/build/makerfabs-wrover-lora-32-868/lib122/libDNSServer.a
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib6b9/WebServer/WebServer.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib6b9/WebServer/detail/mimetable.cpp.o
Compiling .pio/build/makerfabs-wrover-lora-32-868/lib6ae/WiFiManager/WiFiManager.cpp.o
*** [.pio/build/makerfabs-wrover-lora-32-868/src/main.ino.cpp.o] Error 1

Describe the solution you'd like
I'd like to be able to use both LoRa and FSK on the same gateway, if possible.

Describe alternatives you've considered
The only alternative I can think of right now is building another gateway just for FSK.

Additional context
The board: https://wiki.makerfabs.com/MaESP_ESP32_Lora_Gateway.html

My environments.ini:

[env:makerfabs-wrover-lora-32-868]  ; MaESP ESP32 Board with SSD1306 display
platform = ${com.esp32_platform}
board = esp-wrover-kit
lib_deps =
  ${com-esp32.lib_deps}
  ${libraries.lora}
  ${libraries.rtl_433_ESP}
  ${libraries.ssd1306}
build_flags =
  ${com-esp32.build_flags}
  '-DZgatewayRTL_433="rtl_433"'
  '-DZradioSX127x="SX127x"'
  '-DRF_SX1278="SX1278"'
  '-DRF_MODULE_SCK=14'
  '-DRF_MODULE_MISO=12'
  '-DRF_MODULE_MOSI=13'
  '-DRF_MODULE_CS=32'
  '-DRF_MODULE_RST=33'
  '-DRF_MODULE_DIO0=36'
  '-DRF_MODULE_DIO1=27'
  '-DRF_MODULE_DIO2=26'
  '-DOOK_MODULATION=false'
  '-DRF_FREQUENCY=868.300'
  '-DZgatewayLORA="LORA"'
  '-DLORA_BAND=868E6'
  '-DLORA_SCK=14'
  '-DLORA_MISO=12'
  '-DLORA_MOSI=13'
  '-DLORA_SS=25'
  '-DLORA_RST=2'
  '-DLORA_DI0=35'
  '-DLORA_SPREADING_FACTOR=9'
  '-DLORA_CODING_RATE=7'
  '-DDEFAULT_CRC=false'
  '-DZdisplaySSD1306="SSD1306"'
  '-DSDA_OLED=4'
  '-DSCL_OLED=5'
  '-DRST_OLED=16'
  '-DWIFI_LoRa_32=true'
@1technophile
Copy link
Owner

1technophile commented Apr 23, 2024

I guess it's not intended to be used that way?

This is not a configuration that we are supporting. Also I'm not planning to add it as there was not a lot of ask for it. So your solution is indeed to use another board.

We are studying the add of BLE to RTL, or merging FSK and OOK binaries for example as they are more requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants