Phone BLE background for auto device connection - bluetooth

i have some questions for ble conneciton between smartphone with bluetooth earphone.
after pairing/bonding the bluetooth earphone, when i turn on bluetooth earphone, my smartphone automatically connect to the bluetooth earphone.
how it can be? the smartphone periodically try to connect (send connect request packet) to paired devices?
i don't think that job includes advertising/scan because the connection has completed so quickly right after bluetooth earphone turn on.
maybe.. i think the smartphone periodically try to connect to paired devices..
is it right?

Related

Can't disconnect from a bonded BLE device (programming the BLE HID device)

I'm running a BLE HID device on a Sparkfun Artemis Thing Plug board. I can pair with the board and it works as a keyboard. What doesn't work is that, after pairing, I can't connect/disconnect. For example, if I look at my smart watch on my iPhone, the options for it look like follows:
Disconnect option in the iPhone menu
But for my HID device that's all there is:
Lacking the disconnect option in the iPhone menu
As you can see there is no Disconnect option. That's what I want to have for my HID device. I know that in order for the devices to pair only once they actually have to bond (pairing + saving the security information for any future connections). They bond correctly for sure. Resetting the HID BLE device results in iPhone and the device reconnecting. I just can't disconnect from the device with keeping the bonding information. I can only Forget the device.
Is it that the BLE device doesn't advertise properly and iPhone assumes that it's not a device that can be connected and disconnected from?
For some strange reasons Apple has decided that it should not be possible to disconnect HID devices, only unpair them.

Is there a way to relay bluetooth between phones?

I have a device that can only be controlled by bluetooth on a specific phone. Would it be possible to use a second phone to act as a relay or proxy close enough to connect via bluetooth to the device, but kind of feign the connection with the first phone over the network?
You'd want to make a mesh network.
https://www.bluetooth.com/blog/introducing-bluetooth-mesh-networking/

Multiple BLE devic connection using gatttool

To monitor multiple BLE devices and record the incoming data.
In order to achieve this I should be able to connect to multiple ble devices. Right now I can open one interactive mode using gatttool and connect to the ble device (On raspberry pi). If I want to connect to one more ble device I have to open a new terminal window.
Can anyone help me on how to connect to multiple ble devices keeping the target in mind.

Automatic bluetooth connection to a certain device

I am working on an application (windows phone 8.1), which is the following: if my phone is already connected to a bluetooth device then it should connect in parralel to another device which is already paired("cc2541"). I would appreciate a little help with the coding.
My problem is i don't know how to connect to a device automatically. I only found code samples that are only scans and lists devices and it only connects when I touch the screen ( approve the connectivity ).
You can get the RSSI value (signal strength) for each device, then you can implement a dispatcherTimer, where you start the scanning as the timer starts and then connect to the closest device on a timeout.
This is a basic example of automatic connection establishment.

Deviceinfo without scanning

Can we know the bdaddress and rssi of all nearby ble devices without continuous lescanning? As the continuous lescan will consume more power and also we would not be able to properly make connection to a device while active scanning is going on in background.
The lescan background process also gets killed when we are disconnected from the connected state with any ble device
Also with how many peripherals can a central device be connected to simultanoeusly with bluez-4.101 stack?
Yes you are right you cannot make connection while you are scanning for Low Energy devices and number of devices that can be connected to the central device is entirely dependent on the Software Stack you are using for BLE.
Like in CC2540 you can connect 3 devices at a time.
For RSSI and bluetooth address you refer function le_advertising_report according to bluez-4.101 stack.

Resources