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

duplicate decoder.h when building both BT and RTL_433 #2086

Open
peshovec opened this issue Oct 11, 2024 · 4 comments
Open

duplicate decoder.h when building both BT and RTL_433 #2086

peshovec opened this issue Oct 11, 2024 · 4 comments

Comments

@peshovec
Copy link
Contributor

Describe the bug
Building with enabled BT and RTL_433 fails. The errors start with

...OpenMQTTGateway/main/ZgatewayBT.ino:57:1: error: 'TheengsDecoder' does not name a type; did you mean 'UseExtDecoder'?
 TheengsDecoder decoder;

According me, the root cause is that both the libraries TheengsDecoder and rtl_433_ESP are using decoder.h

To Reproduce
Steps to reproduce the behavior:

  1. Prepare environment, which builds both BLE (with internal decoding - should be the default, if not explicitly set to use external decoder) and RTL_433. Like the snippet from this:
    extract of the environment definition
[com]
esp32_platform = [email protected]

[platformio]
default_envs = btrtl


[env:btrtl]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = partitions/min_spiffs.csv
lib_deps =
  ${com-esp32.lib_deps}
  ${libraries.ble}
  ${libraries.smartrc-cc1101-driver-lib}
  ${libraries.rtl_433_ESP}
  ${libraries.decoder}
build_flags =
  ${com-esp32.build_flags}
  '-DPRIVATE_CERTS="true"'
  '-DZgatewayRTL_433="rtl_433"'
  '-DZradioCC1101="CC1101"'
  '-DRF_CC1101="CC1101"'
  '-DRF_MODULE_GDO0=12'
  '-DRF_MODULE_GDO2=27'
  '-DZgatewayBT="BT"'
  1. Observe the beginning of the errors
...OpenMQTTGateway/main/ZgatewayBT.ino:57:1: error: 'TheengsDecoder' does not name a type; did you mean 'UseExtDecoder'?
 TheengsDecoder decoder;

Expected behavior
Successful build

Environment (please complete the following information):

  • OpenMQTTGateway version used development
  • Library version related to the problem - described in platformio.ini decoder and rtl_esp_433

Additional context
Renaming the decoder.h in TheensgDecoder library lead to successful build.
The steps to rename are:

  1. define platform like this (use different from decoder library name, and point to the modified TheengsDecoder source)
    in this example environment definition, the name of the decoder library is changed to BLEdecoder, and the modified TheengsDecoder is in local path :
[com]
esp32_platform = [email protected]

[platformio]
default_envs = btrtl

[libraries]
BLEdecoder = symlink:///tmp/decoder

[env:btrtl]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = partitions/min_spiffs.csv
lib_deps =
  ${com-esp32.lib_deps}
  ${libraries.ble}
  ${libraries.smartrc-cc1101-driver-lib}
  ${libraries.rtl_433_ESP}
  ${libraries.BLEdecoder}
  1. Change forked TheengsDecoder to rename decoder.h to BLEdecoder.h
    I renamed like the commit message in this commit peshovec@4d7d7de
  2. In OpenMQTTGateway change main/ZgatwayBT.ino to include the renamed BLEdecoder.h (as per the mentioned commit)
@peshovec peshovec changed the title dulicate decoder.h when building both BT and RTL_433 duplicate decoder.h when building both BT and RTL_433 Oct 11, 2024
@NorthernMan54
Copy link
Collaborator

And the next thing you will discover is the with BLE and rtl_433 together you don't have enough resources for both :(

@1technophile
Copy link
Owner

Same as #1652

@peshovec
Copy link
Contributor Author

Apologize - missed the existing issue.
@NorthernMan54 although still not uploaded (waiting the arrival of the cc1101 module), already hit the resource constrains:) Not enough flash:) And i had to tweak the partition table.
Even now (without rtl_433, just with BLE, RF, RF2 and pilihght) i am already in the instability zone. For example the web ui is not working. If i have to look at the web console i had to disable the BT (via mqtt publish)
Eventually i will leave just the modules i need. Right now i am still exploring, so having to disable module at runtime is acceptable in my case.

@NorthernMan54
Copy link
Collaborator

This may be feasible if LilyGo or another manufacturer add a sx127x chip to one of these

image

This is the latest thing I’m playing with. It has 8mb of psram so the dual should be doable

PS - the screen is this project https://github.com/NorthernMan54/esp32_balboa_spa/tree/LVGL-4848S040CIY1

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

3 participants