We are trying to make an device which can connect to another device running BT and BLE application. Our device is running android kitkat. We are facing following issue.
Once we connect using BT (stream songs over BT) , BLE application running on the same device (that is streaming music) is not detected in BLE scan.
But is detected by other devices (phones in the vicinity).
When we connect using BLE and do some data transfer then connect BT and stream music fromt the same device then both work fine.
Only when we connect to BT first we are not able to detect BLE app running on same device.
Has anyone faced this issue before?
After checking the logs it seems device (Android) does get advertisement packets from BLE app running on another device (iOS) but not the scan response packets. So it keeps waiting for scan response packet. I tried looking for scan request function but couldn't find it.
I figured it out from debug logs of android stack. Stack was not reporting advertisement it was getting during the BT was streaming to application. It kept waiting for scan response packet. I enabled reporting of this packets in stack and now able to scan and connect to BLE app running iOS while streaming music from same iOS device over BT.
There is one mystery though, am unable to figure out why iPhone does not send scan response when streaming over BT. Will update if I figure it out.
Related
I am using BLE v4.1 for my application where I am able to transfer 200 packets of length 20 bytes each from peripheral to central side.
I want to transfer data via BLE and play some music while the data is being transferred. The music file is available locally and will be played on earphones(can be wired or wireless BlueTooth earphones)
I am facing an issue of packet drops around 15-20% when I am playing audio through wireless earphones while data is being transferred via BLE and audio is played on phone Bluetooth earphones(tried on Android and iOS, both) simultaneously.
With wired earphones connected; there is no issue, I can transfer data via BLE and play audio smoothly without any issue but things are different with wireless Bluetooth earphones case. I tried it with different Android phones(Android 11, different manufacturers) and different BlueTooth earphones, the issue still exists.
What could be a cause for the same and how can I debug it?
Bluetooth and Bluetooth Low Energy has only one radio that can only do one thing at a time. The connection events are scheduled and cannot overlap. This means the throughput is shared among all connected devices. You will get a higher throughput per device with only one connection than with two connections.
You will have to experiment with connection interval and connection event length to find parameters that seems to work, and test with multiple Bluetooth controllers (phones), since all have different scheduling algorithms.
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?
I'm trying to make an Android application for Android Things running on raspberry pi that takes USB joystick inputs (including DJI Mavic controller) and passes it over BLE HID as a gamepad.
Windows, Oculus Quest and Mac all recognize it as a gamepad, but when I try to connect to it, they connect and disconnect right away. I'm not sure why
Is there any tool on any OS that logs the BLE HID pairing process to find out what went wrong?
https://github.com/darvin/USBMavicBLEHIDAndroidThing/blob/master/app/src/main/java/jp/kshoji/blehid/HidPeripheral.java
I'm trying to send data via bluetooth from an Intel Genuino to an Intel Galileo. The Galileo will act as the Master node in this connection. I have configured the Galileo so that it is discovering bluetooth devices and I have paired my phone to the Galileo via bluetooth.
What I need to do is pair the Genuino with the Galileo. I have tried some of the sample programs that Arduino provides but I cant seem to pair or connect the two devices.
So the question is, if I have my Galileo discoverable and ready to pair, how can I send an advertisement from the Genuino and connect to the Galileo.
Alternatively: if anybody has a link to a site that explains the blePeripheral and bleCentral commands, that would be great.
Cheers
On the Arduino/Genuino 101 board, use CurieBle to create a peripheral. There are some example sketches to get you started. CurieBle works very similar to the Arduino BLEPeripheral library.
You don't need to pair devices. On the Genuino 101, run the sketch that creates the Bluetooth LE Service. On the Galileo, run a program that discovers service running on the 101 and connects to it. You can write the program for the Galileo using noble and Node.js.
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.