BLE FAQs
BLE FAQs
What is the difference between Bluetooth Classic and Bluetooth Low Energy?
Bluetooth Classic is used to connect headsets, speakers and other audio devices to
smartphones and tablets.
Bluetooth Classic can also exchange data, but BLE is quickly replacing it because
it's lower power, lower cost and faster to connect.
Bluetooth Classic can be used to connect many devices, even if it's not as good as
BLE
BLE is used mainly to exchange small data.
Is BLE Secure?
The Bluetooth specification provides for security using authentication and
encryption which protects data. This security features need to be enabled.
Devices before Bluetooth 4.2 are generally insecure because of the algorithms used.
it is important to take steps to secure your devices and data, such as using strong
passwords, limiting access to sensitive data, and keeping your software up to date.
What are the main factors that can interfere with BLE signals?
- physical obstructions such as walls, metal objects, or water,
- other wireless signals in the same frequency range.
- the signal strength can also be affected by the distance and battery life of the
BLE devices.
TI CC26xx
When I download my code, where is it programmed? Internal or external flash memory?
The CC13xx/CC26xx is a flash based wireless MCU with 128kB or 352kB of in-system
programmable flash memory.
optionally, serial flash memory can be connected via SPI - external flash is to
support firmware upgrade using TI's custom Over-the-Air Download (OAD) profile
How do I do a simultaneous Master & Slave (i.e., Peripheral & Central role)
connection?
With the multi-role sample application multiple, simultaneous connections can be
established in any GAP role (Central or Peripheral). For the CC2640R2, CC13x2 and
CC26x2 SDKs, the multi-role sample application is included in the SDK. Please see
the multi-role example application on the SimpleLink GitHub page under the
'ble_examples' repo.
What is Pairing?
Pairs of devices may establish a trusted relationship by learning (by user input) a
shared secret known as a “passkey”. A device that wants to communicate only with a
trusted device can cryptographically authenticate the identity of the other device.
Trusted devices may also encrypt the data that they exchange over the air so that
no one can listen in.
For Android, sometimes Bluetooth crashes and when you try to turn it on again in it
just goes back to turned off state. To recover you have to reboot the phone. I must
however say that if you manage to initiate a connection and don't get any errors it
will often continue to run correctly. To avoid the Android system to kill your app
while it's in the background you have to use a foreground service. On some phones,
like Huawei, the user must also explicitly mark the app to not being killed by the
system when it's running in the background. For Android, there are also many phones
with different Bluetooth controllers and some have bugs other controllers don't
have. For example I once got hand on a Sony Xperia Z3 phone which Bluetooth
controller cancelled a pending connection when an LE scan (running in parallel) was
cancelled, but according to the HCI log the pending connection was still going on.
The peripheral was advertising but was never connected to the phone. Once the
pending connection was explicitly cancelled and restarted, it connected
immediately.
BLE Peripheral = GATT Server = (Mostly) A Slave of the communication, e.g. Sensor
BLE Central = GATT Client = (Mostly) The Master of the communication, e.g. a
Smartphone
While receiving advertisements, How do I know if the device is interesting for me?
Does I need to connect and discover services? Is there a mechanism to determine the
device class or type?
The advertisement packet does it for you. On a broader picture, I can think of one
reason to make advertisement packets so informative by means of GAP, is as
following. In the GAP service, you have something called Appearance which decides
what that device is. If I am an application developer and I am interested in
getting connected over a specific kind of a device like say, Generic Clock, I can
do that using this Appearance value (256 for Generic Clock) set.
Advertisements contain an advertiser address and other information about the device
which is sending the advertisements (name, address, which profiles are enabled).
With this information you can determine if a device is interesting for you.
How familiar are you with the latest Bluetooth protocols and technologies?
BLE connectivity into an Android application for cow brush motor control. This
required me to become familiar with the current BLE specifications, such as GATT
(Generic Attribute Profile), which facilitates data transfer between BLE devices.
I also have experience with Bluetooth mesh networks, which allows multiple devices
to communicate with each other and extend their range. I developed and implemented
a mesh network in collaboration with a team of software engineers for a home
automation project.
In addition to the protocols, I also keep myself updated with the latest Bluetooth
technologies such as Bluetooth 5, which offers increased range, speed, and
bandwidth. I was involved in a project to implement Bluetooth 5 within an Android
application for Dairymaster - dairy automation company, resulting in improved user
experience and better connectivity.
Can you explain your experience in building robust Bluetooth connections in Android
applications?
To ensure robustness in the Bluetooth connection, I implemented several error
handling mechanisms. For instance, I created a mechanism that automatically
reconnected the application to the peripheral when the Bluetooth connection was
lost due to signal interference or weak signal strength.
I also created a mechanism that alerts the user when the peripheral's battery
levels are low, prompting the user to replace the battery to avoid disconnection.
In addition, I tested the Bluetooth connection intensively and optimized the code
to ensure that the connection speed was fast and reliable. The connection stability
was also tested successfully under different network conditions.
Finally, I conducted extensive research on the latest Bluetooth technologies and
implemented the most advanced features to enhance the connection performance. This
included using the latest Bluetooth Low Energy protocol and integrating it with the
application's workflows to reduce battery consumption on both the heart rate
monitor and the user's device.
What tools and libraries have you used for developing Android Bluetooth
applications?
Android Bluetooth APIs: The go-to tool for any Bluetooth development on the Android
platform. I have used the APIs extensively to connect devices, send and receive
data, and manage Bluetooth connections through the application.
ButterKnife: An Android library that simplifies view injection in Android
applications by reducing boilerplate code. I used ButterKnife in one of my
applications to aid in updating the UI with real-time Bluetooth data.
Can you describe your debugging and troubleshooting process for Bluetooth-related
issues in Android apps?
Identify the issue:
Isolate the problem: debugging tools, such as breakpoints or logs
Test the code: testing on different Android devices, various Bluetooth
configurations, and scenarios
Document the resolution:
Verify the solution:
troubleshooting an issue where the Bluetooth feature of the app was causing the app
to crash unexpectedly. I found that the issue was arising due to an outdated API
call that was no longer supported.
Can you share an example of a challenging Bluetooth project you worked on and how
you overcame any obstacles?
1. to determine the hardware requirements for the project. I researched and tested
various Bluetooth modules and sensors, to ensure they worked with our selected
microcontroller.
2. designing the Bluetooth network topology. I chose a mesh topology because it was
more reliable and scalable than a star or point-to-point topology.
3. testing the Bluetooth network. I encountered many obstacles, such as signal
interference from other Bluetooth devices, data packet loss, and intermittent
connectivity. I was able to overcome these obstacles by changing the data
transmission protocol.
https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/
bluetooth-forum/404236/ble-getting-started-and-faq-u-2022-mar-21
https://www.sciencedirect.com/topics/computer-science/bluetooth-low-energy
https://www.remoterocketship.com/advice/guide/ios-engineer/bluetooth-wifi-
integration-interview-questions-and-answers
https://www.remoterocketship.com/advice/guide/android-engineer/android-bluetooth-
engineer-interview-questions-and-answers
https://medium.com/@sujathamudadla1213/android-interview-questions-related-to-
android-iot-projects-4b0b7a036beb
https://www.scribd.com/document/105573250/Bluetooth-Interview-Questions-and-Answers
https://codingwithtashi.medium.com/bluetooth-low-energy-ble-for-building-iot-
devices-3d14c9cde976