Gopalakrishnan M
15. Feburary 2024 Categories: Technology,

Earlier, we covered product testing for all major domains such as Modbus validation in industrial, displays in consumer domain, UDS in automotive domain, Wi-Fi in consumer domain etc. Bluetooth is also one of the key technologies used in consumer, automotive, medical, and industrial domains. There are several factors in Bluetooth design that may influence overall performance such as antenna design, power supplies, other wireless communications chips or the final housing. Therefore, it is necessary to test the Bluetooth device to verify its performance and ensure conformance with the Bluetooth Special Interest Group (SIG) standards and regulatory requirements. This is especially important because Bluetooth operates in the unlicensed spectrum and has to work seamlessly with other radio technologies that use the same spectrum.

Bluetooth device testing is governed by regulatory compliance for radio operation in 2.4Ghz band and compliance with Bluetooth specification. There are primarily 2 types of Bluetooth interfaces in use – Bluetooth classic and Bluetooth low energy. So, testers need to know the specific tests to perform for each type as discussed below.

Bluetooth Classic Physical Layer Testing

In Bluetooth classic device, physical layer supports 2 transport schemes (SCO & ACL) to support data transfer. Bluetooth Classic radio, also referred to as BR/EDR, can be tested by vendor-specific control interface and can be used for fully automated tests. The Bluetooth SIG has specified a test mode and interface that should be used to control the Device under test (DUT) during compliance testing. This uses the link management protocol (LMP) to control the DUT over the Bluetooth radio link.

Bluetooth Testing Classic

Bluetooth Testing Classic


During testing, the tester and the Device under test (DUT) form a Bluetooth piconet, where the tester acts as the central device and has full control over the test sequence via a control interface using the link management protocol (LMP). The DUT acts as peripheral and is set at the beginning via a DUT specific local interface in test mode (TM) for testing.

Few test cases that can be run are:

Continuous transmit test This test will turn ON the carrier and transmit accordingly to the specified transmit mode, modulation type, frequency, and power level.
Continuous receive test This test will turn ON the receiver in a non-hopping continuous mode.
Radio TX Test This test configures an edge device to transmit the selected data pattern.
Radio RX test This test configures edge device to receive data continuously and validate the same.

Bluetooth physical layer test items comprise transmitter tests that cover transmit power, power density spectrum, spurious emission, or modulation accuracy, as well as receiver tests for sensitivity or blocking performance.

Bluetooth LE Physical Layer Testing

Standalone battery-operated low power devices are the main use cases of BLE. Some of the devices that use BLE are home automation system, fitness tracking, fleet tracking etc. Critical testing of this device involves RF testing and power consumption.

Bluetooth SIG Standardized direct test mode (DTM) to test transmitter, receiver with control facilitated test commands. This mode enables testing of the Bluetooth LE transmitter and receiver, with control facilitated through a dedicated wired test interface. For the wired interface, two specified options include a USB or RS232 connection to the host control interface (HCI) of the DUT.

Bluetooth LE Testing

Bluetooth LE Testing


Application Profile Testing

Apart from the above physical level tests, the Bluetooth devices are to be validated for application functionality. Classic devices are to be verified if the profiles being implemented are in conformance with the specifications. For the BLE, services and characteristics implementation have to be validated. Some of the tests could be:

  1. Peripheral advertising interval and channels
  2. Central pairing with Peripheral
  3. Peripheral pairing with Central
  4. Connection Stability
  5. Multiple Connections
  6. Power consumption during active connection
  7. Power consumption during idle state
  8. Battery life
  9. Handling Multiple bonded devices
  10. Audio quality test

For this application specific/use case-based tests, additional tools and applications are required. Since the edge device is mostly going to communicate with consumer devices such as smartphones, automotive clusters, infotainment systems, etc. it will be complex to test them against a wide range of smartphones and devices. So, a proper set of tools need to be identified and used for testing. These tools could be a Client Emulator for functional validation or Sniffer for non-invasive validation.

Client Emulator

Essentially PC based/Mobile Apps, these tools help to interact with and test the target Bluetooth devices. They are also very helpful for testing out new changes/updates during development. These types of apps allow testers to scan for nearby advertising Bluetooth Low Energy devices, connect to one of these devices, discover their services and characteristics, and read from/write to the characteristic values as well.

Two well-known examples are:

  • Nordic nRF Connect app (iOS, Android, Desktop)
  • TestBot (Desktop)
Nordic nRF Connect app

Nordic Semiconductor's nRF Connect is a robust tool for developing and testing Bluetooth Low Energy BLE devices. It allows reading available characteristics, writing to them, register for notifications etc. But being a non-customizable tool performing specific communication operations such as multi-sequence operations, file transfer etc. will be a challenge.

TestBot

TestBot from Embien, is a PC Based tool that allowed testers to create a mock peripheral device and simulate its behavior. This method is much more flexible than the nRF Connect app, as testers can program the peripheral device to behave in certain ways. Configuring and developing a Test Bot based automation may take more time compared to the nRF connect. However, once it is set up, it can be used for both unit testing and integration testing.

Bluetooth Sniffer

A Bluetooth sniffer (or protocol analyzer) is one of the most useful tools. The difference between a Bluetooth sniffer and the Client emulator apps mentioned previously is that sniffers can spy on the communication between the central and peripheral devices. While a client emulator is usually used to act as a central device to read, write, and subscribe to notifications/indications of characteristic values of the peripheral device, the sniffer acts in the background (usually without requiring to modify any of system’s behavior).

In general, a BLE sniffer captures packets in two main scenarios:

  • Advertising mode: It captures advertising packets (mainly on the primary advertising channels 37, 38, and 39)
  • Connection mode: It captures raw packet data exchanged between two Bluetooth LE devices during a connection (the remaining 37 channels: 0 through 36)

There are 2 types of sniffers.

  • Low-Cost Development kit based BLE sniffers
  • Professional BLE sniffers
Types Pros Cons
Development Kit based BLE Sniffers
  • Low cost
  • Wireshark can be used to monitor the packets.
  • Software updates are not supported.
  • Only one connection can be monitored.
  • Some packets might be missed.
Professional BLE Sniffers
  • Capture all types of on all 40 channels.
  • Can sniff multiple connection simultaneously.
  • High cost

Though the low-cost sniffers usually suffer from a few limitations, such as the lack of advanced features on the companion desktop software side as well as not being able to scan the three primary advertising channels simultaneously, they are good enough for most tests.

Conclusion

Bluetooth technology continues to be a cornerstone of wireless communication, enabling a wide array of devices to connect seamlessly. By adhering to best practices and leveraging advanced testing tools such as sniffers, emulators etc., testers can test the Bluetooth devices effectively.

Subscribe to our Blog