LoRa and Bluetooth on the same board?

Would it be possible to have both LoRa support (EU) and Bluetooth on the same board? If so, what hardware combinations should I be looking at?

Hi, @feerdableusmoek

I'm not sure about boards with both of them on it, but you can run ESP32 and Lora module together, that is how most Meshcore units work.

Have you Googled;

BLE and LoRa on one pcb

Tom.... :smiley: :+1: :coffee: :australia:

Have you checked SEEED XIAO boards? Also Bill over at Dronebot Workshop did a video/article on all the current esp32 boards with a summary chart.

Using a Heltec WiFi32 LoRa V3 module I have transmitted data over LoRaWAN and ESP-NOW wireless in the same project without problems
see no reason why ESP32 LoRa and BLE should not work together OK

The Heltec Lora Wifi V3 has the capability of Lora, Wifi and BLE. I’ve used the Lora point to point between two of the boards simultaneously (in the same project) with wifi, but not simultaneously with BLE, so I don’t know what limitations if any there are.

Heltec Lora Wifi V3 Meshcore uses LoRa and Bluetooth together with out any problems.

Tom.... :smiley: :+1: :coffee: :australia:

I have used Bluetooth BLE on a ESP32S3 board that had a LoRa module to monitor the point to point LoRa comms by sending stuff over BLE to an Android phone..

However using BLE, which is all the ESP32S3 directly supports, is not at all easy.

On the ESP32S3 LoRa board it was heaps and heaps easier to use a HC05\HC06 module.

Same is true of all the Adafruit Feather LoRa boards. Connect a $3 HC05/HC06 module to the Serial1 port and you are ready to go.

seem to remember HC-05/HC-06 are Bluetooth Classic HM-10 is BLE

I agree with @srnet using BLE is none trivial and Bluetooth Classic is much simpler to use

Yeah, you just treat the Bluetooth HC05\HC06 devices as a serial port.

Here is the code I put together, it only has basic individual functions for sending ints, uints, flpats and strings, the 'responds' ;

String BLEDevice = "LILYGOT3S3RX";

#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

BLEServer *pServer = NULL;
BLECharacteristic *pTxCharacteristic;
bool deviceConnected = false;
bool oldDeviceConnected = false;
bool newMessage = false;
uint8_t txValue = 0;
bool mR = false;
String rxValue;

//UUIDs from Arduino IDE BLE example UART
#define SERVICE_UUID "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"
#define CHARACTERISTIC_UUID_RX "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
#define CHARACTERISTIC_UUID_TX "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"

class MyServerCallbacks : public BLEServerCallbacks {
void onConnect(BLEServer *pServer) {
deviceConnected = true;
};

void onDisconnect(BLEServer *pServer) {
deviceConnected = false;
pServer->startAdvertising();  //restart advertising, disable if you want Bluetooth not to restart
}
};

class MyCallbacks : public BLECharacteristicCallbacks {
void onWrite(BLECharacteristic *pCharacteristic) {
rxValue = pCharacteristic->getValue();

if (rxValue.length() > 0) {
  Serial.println("*********");
  mR = true;
  Serial.print("Received Value: ");
  for (int i = 0; i < rxValue.length(); i++)
    Serial.print(rxValue[i]);

  Serial.println();
  newMessage = true;
  Serial.println("*********");
}

}
};

void BLE_setup() {
Serial.print(F("BLE_setup() "));
Serial.println(BLEDevice);

// Create the BLE Device
BLEDevice::init(BLEDevice);

// Create the BLE Server
pServer = BLEDevice::createServer();
pServer->setCallbacks(new MyServerCallbacks());

// Create the BLE Service
BLEService *pService = pServer->createService(SERVICE_UUID);

// Create a BLE Characteristic
pTxCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID_TX,
BLECharacteristic::PROPERTY_NOTIFY);

pTxCharacteristic->addDescriptor(new BLE2902());

BLECharacteristic *pRxCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID_RX,
BLECharacteristic::PROPERTY_WRITE);

pRxCharacteristic->setCallbacks(new MyCallbacks());

// Start the service
pService->start();

// Start advertising
pServer->getAdvertising()->start();
Serial.println(F("Bluetooth - Waiting a client connection"));
}

void respond_int(int32_t value) {
String mystring;
mystring = String(value);
pTxCharacteristic->setValue(mystring);
pTxCharacteristic->notify();
}

void respond_uint(uint32_t value) {
String mystring;
mystring = String(value);
pTxCharacteristic->setValue(mystring);
pTxCharacteristic->notify();
}

void respond_float(float f, int places) {
String mystring;
mystring = String(f, places);
pTxCharacteristic->setValue(mystring);
pTxCharacteristic->notify();
}

void respond(String send_message) {
pTxCharacteristic->setValue(send_message);
pTxCharacteristic->notify();
}