OMG on TTGO-LORA32 ( LoRa ) + ( HM-10 BLE for LYWSD03MMC )

Hi, I have no experience with OMG .as I understand there are separate bin files for each BLE or LoRa ,
and what needs to be done to get the functional of both do i need to compile?

[env:ttgo-lora32-v1]

platform = ${com.esp32_platform}

board = ttgo-lora32-v1

lib_deps =

  ${com-esp.lib_deps}

  ${libraries.lora}

build_flags =

  ${com-esp.build_flags}

  '-DZgatewayLORA="LORA"'
  '-DZgatewayBT="BT"'
  '-DZgatewayRF="RF"'
  '-DZmqttDiscovery="HADiscovery"'
  '-DjsonPublishing=true'
  '-DGateway_Name="OpenMQTTGateway_ESP32_LORA"'

Like this ? And where can I change the radio frequency

Thanks

i get error even with only ( #define ZgatewayLORA “LORA” )

FileNotFoundError: [WinError 2] The system cannot find the file specified:
File “C:\Users\dmour.platformio\penv\lib\site-packages\platformio\builder\main.py”, line 177:
env.SConscript(“$BUILD_SCRIPT”)
File “C:\Users\dmour.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py”, line 591:
return _SConscript(self.fs, *files, **subst_kw)
File “C:\Users\dmour.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Script\SConscript.py”, line 280:
exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
File “C:\Users\dmour.platformio\platforms\espressif32@1.12.2\builder\main.py”, line 213:
target_elf = env.BuildProgram()
File “C:\Users\dmour.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\Users\dmour.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 62:
env.ProcessProjectDeps()
File “C:\Users\dmour.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\Users\dmour.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 140:
project_lib_builder = env.ConfigureProjectLibBuilder()
File “C:\Users\dmour.platformio\packages\tool-scons\scons-local-4.1.0\SCons\Util.py”, line 658:
return self.method(*nargs, **kwargs)
File “C:\Users\dmour.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 1062:
project.install_dependencies()
File “C:\Users\dmour.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 898:
lm.install(spec)
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 49:
spec, silent=silent, skip_dependencies=skip_dependencies, force=force
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\manager\library.py”, line 86:
force=force,
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 97:
pkg = self.install_from_url(spec.url, spec, silent=silent)
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 141:
vcs = VCSClientFactory.new(tmp_dir, url)
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 55:
src_dir, remote_url, tag, silent
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 137:
self.configure()
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\package\vcsclient.py”, line 146:
result = proc.exec_command([cls.command, “–exec-path”])
File “c:\users\dmour.platformio\penv\lib\site-packages\platformio\proc.py”, line 117:
p = subprocess.Popen(*args, **kwargs)
File “C:\Users\dmour.platformio\python3\lib\subprocess.py”, line 800:
restore_signals, start_new_session)
File “C:\Users\dmour.platformio\python3\lib\subprocess.py”, line 1207:
startupinfo)

Hello,

You should remove this, this gateway is not used with LORA.

Try to clean your environment with the trash icon.

You have the info in the docs :

Thanks for the help, i started from scratch
( I just uncomment line #define ZgatewayLORA “LORA” in the User_config.h And changed Frequency )

and I was able to compile with Arduino IDE , but there is a problem wifi access point does not start on esp for initial settings

Serial Monitor gives me

W: disconnection_handling, failed 42 times
E: Failed connecting 1st time to mqtt, you should put TRIGGER_GPIO to LOW or erase the flash
W: Wifi Protocol reverted to normal mode: 0
W: MQTT connection…
W: failure_number_mqtt: 43
W: failed, rc=-2

thank you for your help

I see your title, indicating that you want to use the HM10 for LYWSD03MMC, why not using the ESP32 for this?

On an ESP32 board OMG will use per default the ESP32 BLE component, you can’t use an HM10.

The most important thing for me is LoRa , I live on the fifth floor , I want to organize a door sensor for ( garage -1 floor ) and ( mailbox 0 floor) . checked the reception of the zigbee, wifi, LoRa . Only LoRa handles it .

Try first with Lora gateway only in this case. Once you get it working, you can extend the functions.