Android/PC App for multiple Bluetooth Devices

Hi guys!

I'm working on a set of 5 LED stagelights. Due to the high amperage and cable routings every light needs to work autonomously. So each Light consists of a Power Supply, a Arduino Uno, a HC-05 Bluetooth Module and 300 LEDs.

Everything is fine as long as I control each light individually but it would be really nice to be able to control them from one Android Phone or Windows Laptop.

I read quite a lot about this bluetooth modules and as far as I know there is no way to create some kind of piconet (one master, multiple slaves) where all the lights will react simultaneously because these HC-05 modules can only connect to one device at a time.

But! I figuered out that my phone (redmi note 7) for example is able to connect to two HC-05 modules at one time by using two bluetooth terminal apps at the same time (dual app mode).

So, my question is if there is an app out there that allows me to connect and control multiple (in my case 5) bluetooth devices via bluetooth terminals at the very same time.

It seems to be possible, technically, but I've already tried about 10 of these free bluetooth terminal apps without any success.

Many thanks!
Julian

If you pair each HC-05 Bluetooth Module with your phone this will speed up connection time with the phone. You shouldn’t have limitations there. The limitation exists with how many you can connect with concurrently.

So, it all depends on what data you are sending via these HC-05 Bluetooth Modules.

So not knowing what the data traffic is like, the only suggestion for now is look at something like MIT App Inventor to create your own custom app for the redmi note 7. This will involve a bit of logic, building the blocks etc. and designing the app screen. It is not that difficult. Then you can basically connect with each HC-05 Bluetooth Module, send/receive the data and disconnect and then connect with the next etc. You could automate this process.

Otherwise, I would suggest you scrap those HC-05 Bluetooth Modules and choose a Bluetooth LE or Bluetooth 5 module as you phone can handle these. App Inventor also has a Bluetooth Low Energy extension which can handle multiple BLE connections concurrently.

julian_pk1:
as far as I know there is no way to create some kind of piconet (one master, multiple slaves) where all the lights will react simultaneously because these HC-05 modules can only connect to one device at a time.

You can set up a system where you communicate with several HC-05s sequentially, but it is never a great idea, really only merited where you have already bought a swag of HC-05s, and a particularly dumb idea since you have BT4 on your phone.

But! I figuered out

You probably haven't, as this implies that phone has two Blueteeth, and I bet it doesn't. No matter how many apps you might be able to run, Bluetooth will have to revert to Bluetooth Classic in order to talk to HC-05, which puts you right back where you started.

You have some options:

Read reply #1 again

Run a network of ESP-01s direct from the phone. This can't be any worse than running BLEs, probably easier and, if you haven't already gotten all those Arduinos, would be a hell of a lot cheaper.

Use a master Arduino as a single point for the phone which runs a network using NRF24s, or WiFi. This would make things a lot easier at the phone end. It would talk to phone via Bluetooth. NRF24s have about the same price and performance as HC-05.

Similarly, use a master Arduino to handle multiple HC-05s - only for the desperate.

Hi,

many thanks for your quick response quys - I'll try to go through it

gerrikoio:
So, it all depends on what data you are sending via these HC-05 Bluetooth Modules.

I'm sending a single "char" from my phone to the module to trigger certain programs for the LEDs. So like for example an "A" is sent and I will recieve multiple chars like "GREEN" as validation from the module. So it's a very basic serial communication.

In the end I would like to be able to send this char simultaneously to all 5 HC-05 modules.

gerrikoio:
The limitation exists with how many you can connect with concurrently

So far I was able to connect with two HC-05 modules as described via two seperate apps and a dual app mode on the phone.

gerrikoio:
Then you can basically connect with each HC-05 Bluetooth Module, send/receive the data and disconnect and then connect with the next etc. You could automate this process.

As I already said, this is not quite an option for me as it would take far to long to cycle through all the 5 modules. Also, it wouldn't be nescecarry to write an app for this - this could be easily programmed within the modules itself. Anyway, thanks for the advice for the MIT App Inventor, I'll check it out.

Nick_Pyner:
You probably haven't, as this implies that phone has two Blueteeth, and I bet it doesn't.

Oh but I did. I was able to connect to two HC-05 (and a bluetooth headset) all simultaneously. I also tried both of the serial communications - all fine. That's why my question was basically just about an alternative app.

Nick_Pyner:
Similarly, use a master Arduino to handle multiple HC-05s - only for the desperate.

So you mean like setting up 5 master HC-05 (controlled from one master arduino) to speak to each one of the 5 HC-05 slaves individually? This would indeed be quite desperate - but possible yes. I'll think I'll give the App inventor a try first.

Also many thanks for your hardware suggestions. I'm sure they will come in handy for someone reading this post who is about to do something similar. For now I would like to stick with the hardware setup I have. It wasn't originally intended for this situation but there are some dependencies to cases and permissions. That's why changing something on the hardware side would be a lot of effort. Anyway - I would be happy if you could take care of using the word "dumb".

Thanks,
Julian

I'm sending a single "char" from my phone to the module to trigger certain programs for the LEDs. So like for example an "A" is sent and I will recieve multiple chars like "GREEN" as validation from the module. So it's a very basic serial communication.

In the end I would like to be able to send this char simultaneously to all 5 HC-05 modules.

If your ultimate goal is a simultaneous response, then BLE and in particular BLE mesh would deliver this very concept. BLE Mesh really does work well. Unfortunately, it can be quite complicated to implement and the modules available are pricier.

Run a network of ESP-01s direct from the phone. This can't be any worse than running BLEs, probably easier and, if you haven't already gotten all those Arduinos, would be a hell of a lot cheaper.

Use a master Arduino as a single point for the phone which runs a network using NRF24s, or WiFi. This would make things a lot easier at the phone end. It would talk to phone via Bluetooth. NRF24s have about the same price and performance as HC-05.

Otherwise, as per this other comment, the suggestion of using low cost ESP8266 modules (such as ESP-01's as an example) or using NRF24s (although your phone cannot communicate directly in this case) would work too.

Hi gerrikoio,

I'm sure there are better components to have an easier setup for this. But what I tried to explain is that i really need to stick with my current setup for this project.

However, I'm very thankful for the hint to use MIT App Inventor. Unfortunately I've never heard of it before but it seems like a very quick and fun tool!

I just did a short test setup for now: sending an "A" for Arduino built-in LED off and an "B" for Arduino built-in LED on and it's working well. All I had to do within the App Inventor was to set up two parallel running programs. Each one has it's own Bluetooth Client, Clock, Terminal etc

As you can see the lights in the background are (almost) perfectly synced in time. To be honest - I have no idea how the phone manages to do this but as long as it's working I'm fine

Again,
Thank you
Julian

Excellent stuff. Glad to hear you got MIT App Inventor working so quickly.

Video looks good.

I'm amazed, but I'm not sure it proves it is a good idea. I guess the fun starts when you want to send one a different signal from the other. If you can do that with two, I guess you can do it with five.

So you mean like setting up 5 master HC-05 (controlled from one master arduino) to speak to each one of the 5 HC-05 slaves individually? This would indeed be quite desperate

Yes. You probably only need four slaves. It's not really the sort of thing you would want to show your mother, but it does work and the "(almost)" below may indicate that this is what you have just done on the phone.

As you can see the lights in the background are (almost) perfectly synced in time.