Page 1 of 2
Search for Bluetooth device
Posted: 20 Dec 2017 10:17
by Moto1987
Hello, is it possible to implement an Action or Flow Start with following Typ?
"Search for Bluetooth device"
I know Bluetooth LE is allready there but I have an device with Bluetooth 2.1 not 4.0 and above.
Re: Search for Bluetooth device
Posted: 20 Dec 2017 11:04
by Martin
Hi,
You can add a trigger General Broadcast with action android.bluetooth.adapter.action.DISCOVERY_STARTED (use the [...] button and use the magnifying glass to search for discovery) to execute a flow when the device actively starts to search for BT devices (e.g. when opening the BT system settings page).
But maybe I did not understand your request properly. Could you please describe what you want to achieve? Do you want Automagic to detect when a BT scan is executed or do you want to start the scan from Automagic? Should Automagic also handle the result and connect to a particular device when found?
Regards,
Martin
Re: Search for Bluetooth device
Posted: 20 Dec 2017 21:33
by Moto1987
I have the problem that my phone does not automatically connect to my bluetooth car radio. The manufacturer has brought out various updates but it did not help.
Now I would like to that automagic scans in certain intervals for Bluetooth devices and if my radio is "there" it also connects immediately. Gladly the trigger can be that I am not connected to my WiFi. The next problem is that my radio only got the Bluetooth version number 2.1. Search for Bluetooth LE Devices is allready implement but not the other one.
Re: Search for Bluetooth device
Posted: 22 Dec 2017 11:39
by bogdyro
Hi. I also connect my phone to my audio in car. It isn't very reliable most of the time. The thing I found works best is just have Bluetooth ON when I disconnect from my WiFi at home. The car stereo starts at the same time as my engine. Connection is almost instantaneous then. If however in the parking lot I still have a WiFi signal and bleutooth on my phone gets activated minutes after I started driving, it won't connect. Maybe the car stereo doesn't try to establish a connection anymore. I even got to the point that I left an old phone in the car that starts it's wifi whenever I turn on the engine. That triggers my usual phone's bluetooth and starts scanning for devices. That way it keeps bluetooth ON only when I'm driving. Overkill

Anyway, what I'm trying to suggest is that you should use action Connect/Disconnect bluetooth device in Advanced Audio Distribution profile. You don't have to search for it beforehand. It's up to you however to limit the action to when you're in the car.
Re: Search for Bluetooth device
Posted: 24 Dec 2017 13:05
by Moto1987
Now i have managed it on the following way.
There is an incomming call and when i'm not connected to an wifi the phone should Do connect to my car Bluetooth and all i can say is that it worked for me.
Re: Search for Bluetooth device
Posted: 29 Dec 2017 00:25
by xdauser
Some car manufacturers bluetooth implementation is terrible. Unfortunatel mine is as well far from being perfect. What I did is using NFC Tag sticker to phone holder in my car. Whenever I put phone in it, it starts appropriate flow to switch on Bluetooth on and connect to cars Bluetooth system. It works like a charm.
Second solution would be using Bluetooth ble beacon sticked to Car USB charger. Whenever phone is nearby it and beacon gets energized by switching car's accessory (ignition) into on position Automagic executes appropriate flow.
Re: Search for Bluetooth device
Posted: 29 Dec 2017 08:40
by bogdyro
Didn't know about BLE beacons. Do they have to be recharged often? Could be useful as you don't have to actually take the phone out of the pocket to get it connected.
Are they easy to find/buy?
Re: Search for Bluetooth device
Posted: 29 Dec 2017 16:34
by xdauser
bogdyro wrote:Didn't know about BLE beacons. Do they have to be recharged often? Could be useful as you don't have to actually take the phone out of the pocket to get it connected.
Are they easy to find/buy?
You do not have to recharge it if it installed all the time in USB charger. Nowadays most of modern cars has this built-in or you can buy cheap USB charger and stick it into cigarette lighter port. Device itself draws very little energy, and it only fires when you have ignition switch into on position so no worries about car's battery discharge problem.
Just ask for Bluetooth ble usb dongle/beacon uncle google and you will have thousands of them for your choice. It is very small and not intrusive device.
Re: Search for Bluetooth device
Posted: 29 Dec 2017 17:40
by Moto1987
For me is the problem that i don't have any nfc in my phone (asus zenfone 3) otherwise i would do that too
Re: Search for Bluetooth device
Posted: 29 Dec 2017 18:19
by Desmanto
Check out the similiar BLE tag here :
viewtopic.php?f=5&t=6883
It is used for home automation.
Need to setup a periodic timer, so only enable this flow when some certain event happen (example, disconnected from wifi and time range).
BLE device can last for months with single CR2032 battery. (depends on the model). Make sure the phone also support BLE (most mid-class phone from 2016+ should have it already)
Alternative workaround, put a small wifi AP on car. It can be powered by powerbank or just car charger. Reduce the wifi power transmit so it doesn't have a big range (not to interfere with home's wifi).
Use wifi scan/wifi available to scan for it.