Bluetooth to WiFi Bridge?

Anyone know if there is a "Bluetooth Extender" solution that can see a remote Bluetooth device, grab the signal, repeat it over WiFi/Ethernet to a distant remote site, and then rebroadcast it at the remote location?

I have a LiFePO4 battery management system (BMS) at a remote location that only supports Bluetooth connectivity. That remote site is connected to my main network site via a remote AP located in the remote site. I'd like to have the remote BMS Bluetooth signal repeated at the main site so I can connect to the BMS without needing to walk over to the remote site to "see" the Bluetooth signal from the BMS. Seems like two NodeMCUs or Arduinos, one at each site, could repeat the Bluetooth signal.

1 Like

When you say Bluetooth, what do you mean? Bluetooth Classic or BLE? They both share the name but are not compatible with each other.

How do you use the BMS system today?

Do you have any documentation for the BMS?

I've never heard of an extender but it can't be hard to make one like you propose. I imagine WiFi is the preferred comms so a pair of NodeMCUs is a fair choice. Since you already have Bluetooth communication, I guess you already know if you are using BLE, but it is probably plain vanilla SPP data mode regardless.

Please provide the wot-not on the BMS. It would be, to me, better to grab the serial data from the BMS, instead of sending it BT or BLE, with a MCU. Then package the BMS data and send it over WiFi to the other place, where it can be received and things be done.

It’s standard Bluetooth...

The BMS is of course from China. The item is sold by Shenzhen E-Fire Technology Development Co. The displayed data is...
Manufacture: DGJBD
Device: JBD-SP04S020-L4S-120A-B-U
Model: LFP-412120-COMM

The Bluetooth module connects to the BMS via a UART port so if I had to I could possibly direct connect to the BMS via that port and use serial to communicate with the BMS and bypass the Bluetooth altogether. But that means I’d need to bypass the existing software (SmartBMSUtility or XiaoxiangBMS) and develop something myself which is beyond my current knowledge base (but sounds fun when I get more time).

The idea is basically to have a more generic Bluetooth -> WiFi/Ethernet <-> Bluetooth capability so an app running on Android or iOS or Other OS that communicates via Bluetooth can “see” a remote Bluetooth based device across a LAN/WAN at a much greater distance.

I can find consumer devices that do this but they are generally specific to a specific venders products and not generic BT repeaters. I'll keep looking...

So, you have a smartphone located in that remote site and that smartphone is running an app provided by the BMS manufacturer and that app communicates with the BMS via Bluetooth. Is that correct?

It would seem that the only thing you need to do is ensure that the data you send from the repeater is exactly the same as that sent from the BMS, which may well be the case without any effort on your part. Have you tried receiving from BMS with a standard Bluetooth terminal? Or sniffed the BMS Bluetooth with a phone? You may find it all so terribly plain-vanilla that a single Node MCU will suffice.

Part of the SmartBMSUtility is open source on Github.

It looks like Nick is right and Bluetooth is just used as a serial wire replacement. The code seems to look for the following UUIDs.

let serviceUUID = CBUUID(string: "FF00")
let rxUUID = CBUUID(string: "FF01")
let txUUID = CBUUID(string: "FF02")

I do not have a lot of Bluetooth Classic experience. Maybe Nick can answer this question. Is it possible to implement the Bluetooth Serial Port Profile plus WiFi on the Node MCU you recommended or would a HC-0x be a better choice for the Bluetooth part?

Klaus_K:
Is it possible to implement the Bluetooth Serial Port Profile plus WiFi on the Node MCU you recommended or would a HC-0x be a better choice for the Bluetooth part?

That's not making sense, Klaus, so maybe you are thinking of the ESP32 in some form or the other, but I suspect OP is across it anyway. The Heltec ESP32 has on board BLE that I believe is backward compatible with BT2, which suggests that there is no point in adding an HC-05.

I have very little hands on experience with NodeMCU but it has hardware serial pins D9,D10. NodeMCU does not have Bluetooth, but I'm sure an HC-05 can be connected to D9,D10.

But on reflection, there must be a swag of ways to do this, and all pretty simple.

  1. I understand the BMS has a Bluetooth classic dongle. A proper BLE dongle should be good for 100m. If that is sufficient, then simply swapping out Bluetooth at each end for BLE dongles may be all that is needed. No WiFi involved. This particularly applies if the laptop Bluetooth is already BLE.

  2. It may be possible to connect NodeMCU direct to the BMS Bluetooth port. No Bluetooth involved, and NodeMCU looks like just another dongle.

  3. It may be possible to have NodeMCU in 2. above talk directly to a WiFi terminal. The Supplied software for Bluetooth may have a fancy interface, but that might not be relevant. No extra hardware at the laptop end.

  4. The summary of 2. and 3. is just one NodeMCU instead of two NodeMCu plus two Blueteeth.

  5. None of the above involves hacking the proprietary software - or hardware....

The BMS modules that I have seen do not have a Bluetooth dongle.

1 Like

The BMS is for large solar battery systems, not small systems powering arduinos or other smaller projects.

I did find a library for Arduino (and maybe NodeMCU, I'll need to test) that apparently can communicate with the BMS using UART. If it can, maybe I can use that, read the values I need, and then store them to my DB via a wifi connection. But, that means I can't use the Bluetooth connectivity and the iOS software for the BMS to manage the battery without climbing in the attic (where the battery is) and swapping between the bluetooth dongle and the uart connection.

Also, I'd still like to figure out a BT to WiFi to BT bridge set up, or find a commercially available solution, if it's not to expensive.

This may give you a few coding ideas

ESP32 Bluetooth Bridge (Replaces HC-05)

Do you have a project where you'd like it to be possible for you to connect to (and potentially reprogram) another microcontroller over Bluetooth, but also want to have the flexibility to add new Bluetooth, BLE, or WIFI features? I previously used the HC-05 bluetooth module for providing Bluetooth tty access for interactions and programming; the ESP32, though, is only slightly more expensive and provides many features that the HC-05 cannot offer -- including that it itself can be programmed over-the-air to add your own features and functionality very easily.

This repository contains a simple Bluetooth-to-UART bridge roughly mirroring how the HC-05 behaved, but adds a handful of new features:

The main() shows that their is a receipt of BT info and retransmission of the data, the code value, to me, is the receiving of BT and setup for retransmission.

As a note. An ESP32 can do either BLE or WiFi, not both. Ok so there are a few fudges out there that claim they work but coding skill levels become a thing. But anyways, I can easily see receiving BT on one ESP32 and sending the data by serial to another ESP32 which would then transmit the serial to WiFi.

When WiFi and BT are enabled those functions are handled by one of the ESP32's 2 cores; core0 does BT and WiFI. the message receipt, parsing, and retransmission will be done on the other core; core1.

Quite doable


I have 7 ESP32's at various locations in and outside of the house. The ESP32's send and receive data and information to a MQTT Broker. I run a MQTT Broker on a Raspberry Pi4.

I can control heat, cooling, humidity, house plant lighting, get weather info from an esp out in the yard, and a few other things from a phone or my website.

I mention this because from reading the original post, I am guessing you'll not stop with just getting your MPPT Controller data and you might want to consider scalability at an early stage of your project.

ieee488:
The BMS modules that I have seen do not have a Bluetooth dongle.

I understood it did, but maybe OP simply bought one and plugged it in. It could be that it was simply the wrong one, but maybe the BMS crowd specifically said it must be Bluetooth Classic. If they did, that probably means that their terminal isn't BLE compatible. None of the above actually rules out BLE as a viable option, although I believe it does rule out the HM-10. Its range appears to be about the same as an HC-05.

Looking at the photo, it looks like the Bluetooth dongle is connected with four wires. Likely two power and UART RX and TX. The following options seem to be the simplest to implement:

  1. Remove the Bluetooth dongle and connect a WiFi Arduino (which ever you like ESP32, Nano 33 IoT, ...) to the BMS via UART. Have a second WiFi Arduino and connect the dongle to the UART. Now send the serial data between the two WiFi Arduinos e.g., with TCP. This should allow you to use your phone app near the second WiFi Arduino but no longer near the battery. The software should be simple. You just send every byte to the other side.

  2. Remove the dongle and connect a Raspberry Pi to the BMS UART. Use Node-RED to read and write the serial data. Node-RED will allow you to rebuild the functionality of the App using Nodes and JavaScript. There are nodes for all kinds if stuff (MQTT, buttons, gauges, email, timers, databases ...). You get a pretty web page you can control and view from anywhere near your network using a phone or tablet. You can even send yourself emails with warnings when you are not home.

  3. You can do something similar as 2 with an ESP32 but you would need to do more low-level programming e.g., a web page ...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.