Hello!
We are developing a smart BLE device and one of our main concerns is conserving battery life. As such we are only sending BLE packets from our proprietary device every 9 seconds. We have a use case for connecting to the peripheral for a short period of time. However, we have run into some major headaches along the way when trying to connect.
Using a BLE sniffer, we recently discovered that when we try to call CentralManager's connect function upon receiving the first BLE packet after launch or after disconnection, the CONNECTREQ packet is never actually sent out from the phone. When the subsequent packet comes in, the CONNECTREQ packet is sent out as expected and a connection is usually made. This is a consistent and easily reproducible pattern.
Why do we need to receive 2 packets from the same peripheral in order for the phone to truly send the CONNECT_REQ packet and get a successful connection? Because of our need to conserve battery life it is critical that we be able to make a connection attempt with just one packet.
We are developing a smart BLE device and one of our main concerns is conserving battery life. As such we are only sending BLE packets from our proprietary device every 9 seconds. We have a use case for connecting to the peripheral for a short period of time. However, we have run into some major headaches along the way when trying to connect.
Using a BLE sniffer, we recently discovered that when we try to call CentralManager's connect function upon receiving the first BLE packet after launch or after disconnection, the CONNECTREQ packet is never actually sent out from the phone. When the subsequent packet comes in, the CONNECTREQ packet is sent out as expected and a connection is usually made. This is a consistent and easily reproducible pattern.
Why do we need to receive 2 packets from the same peripheral in order for the phone to truly send the CONNECT_REQ packet and get a successful connection? Because of our need to conserve battery life it is critical that we be able to make a connection attempt with just one packet.