I managed to get the same thing working with esphome with “lora_mqtt_bridge” where on one end is esp32 with ble scanner code and on the other end is “lora_mqtt_bridge” ble scanner collects sensor information and sends it over lora network and receiver receives information and sends it to mqtt server
external_components:
- source:
type: git
url: https://github.com/mortenx/ESPHomeComponents
globals:
- id: sent
type: int
restore_value: no
initial_value: '0'
lora_mqtt:
on_sent:
then:
- lambda: id(sent)++;
cs_pin: GPIO18 # chip-select pin for LoRa radio, defaults to 18
reset_pin: GPIO23 # reset pin for LoRa radio, defaults to 14
dio_pin: GPIO26 # DIO0 pin for LoRa radio, defaults to 26
frequency: 868000000 # frequency to use, defaults to 915 MHz