Signal level (RSSI) Bluetooth from Android - bluetooth

Tell me how to programmatically read the signal level (RSSI) of the Bluetooth connection for an already connected device from the Android application?

Assuming this is a BLE GATT connection, use readRemoteRssi() on the BluetoothGatt.

Related

BLE broadcaster device

I would like my BLE device (running on Linux) to be a broadcaster (broadcast data) - no connection is to be allowed. Following are the questions I have:
Which BLE profile would be most suitable for this requirement?
I understand that GATT is mandatory - does it mean I should use GATT and advertise my data in beacon and disallow any connection?
I have seen that Windows doesn't scan a BLE device which is simply a broadcaster i.e doesn't allow connection. Why so and what should I do for Windows to detect my broadcaster device?
Regards

Bluetooth GATT send data to BLE device

how can I send Data to BLE device. I already Connected to ble device but don't know how to send and receive data Via Gatt Callback.
Have a look at the following resources that should help you get started:-
Ultimate Guide to Android BLE Development
Building Android Apps to Control Bluetooth LE Devices
Android Lollipop: BLE Matures (video)
Bluetooth LE Send String Data Between Two Devices
How to Use Android BLE to Communicate with Bluetooth Devices

How to analyze my own transmitted Bluetooth signal on Android

I want to create an Android app where I want to be able to receive my own transmitter Bluetooth signal in Android , since Bluetooth signal is omnidirectional.
I.e. I want to receive and transmit Bluetooth at same time and receive my own transmitted signal and analyze it on same phone.
Or I tried to use beacon simulator to simulate LE beacon Bluetooth signal and in my Bluetooth setting I tried to scan for available devices but it does not show my android device.
How can I do so?
It is not possible to simultaneously transmit and receive the same packets from the same antenna systems. Theoretically, you can receive packets resulting from reflections. In the practice, this application has no right to work. Switching the operating mode from the transmitter to the radio receiver requires time.
To track bluetooth packets you can use the CC2640 dongle with the PC application:
http://www.ti.com/tool/PACKET-SNIFFER

Does the HC-05 bluetooth device support AVRCP commands?

I am trying to control the android music player from an Arduino with an HC-05 Bluetooth module. I have successfully paired them in serial mode but have been unable to find any means to connect them with the AVRCP profile. Is there a library that I can load into a sketch to do this?
The HC-05 supports SPP only. In order to get any other BlueTooth profile on there, you would have to create and flash different firmware for the Broadcom BC417143.

Android Bluetooth LE Chat example

I am trying to read serial data over Bluetooth LE but can't find any code examples for this type of bluetooth and api19. Does any one have an example?
There is no profile defined for serial data communication over Bluetooth Low Energy till now. For this one can use the Bluetooth classic only.
In any case, Android devices can not broadcast for advertising packets. They can only scan the advertising packets. Hence, these devices will be in Central mode only. But can act as either server or client.
For Bluetooth chat related app example one can refer Android SDK as,
sdk/samples/android-19/legacy/BluetoothChat
The above example is based on Bluetooth classic based on RFCOMM channel for serial communication.
Android 5.0 let mobile to be peripheral. So chat will be possible:
https://developer.android.com/about/versions/android-5.0.html
Bluetooth Classic got the SPP profile. This is not how Bluetooth Low Energy works.
In BLE you have 1 or more Services each with 1 or more Characteristics which are basically just bytes in a predefined format which by default can be max 23 bytes.
To send data from one device to another one must be the Master and the other must be Slave.
Android API19 does not support the Slave (Peripheral) role, it seems Google still doesn't understand the importance of Bluetooth Low Energy. It's so much more than just Pulse-readers.
You can send from an Android API19 phone to e.g. an iPhone which can be Slave/Peripheral.
You cannot send from an Android API19 phone to another API19 phone. For this you must use Bluetooth Classic SPP profile.

Resources