Bluetooth Regulatory Utility (btlru) The Bluetooth regulatory utility (btlru) is used to support regulatory testing for both Classic Bluetooth (BR/EDR) and Bluetooth Low Energy (BLE). Classic Bluetooth testing is generally performed by putting the Bluetooth radio into the standard Device Under Test (DUT) mode, where it can then be controlled over the air using external test equipment. The btlru supports putting the Bluetooth radio into DUT mode. The btlru also supports proprietary BR/EDR test modes that can be controlled locally on the device using the btlru command interface. Ezurio recommends using the standard DUT test mode when possible. The Bluetooth Low Energy specification defines a standard Direct Test Mode with transmit and receive test commands that are initiated locally on the device. The btlru implements these commands. Note: The btlru is only supported with the Linux BlueZ stack. Setup The Bluetooth regulatory utility (btlru) uses standard production production Bluetooth firmware. There are no firmware file links to change as there are with the Wi-Fi regulatory utility. The Bluetooth device must be attached to the host BlueZ stack and powered up just as it is during regular operation. How this is done depends on the device type and tools available on the host platform. Devices with a UART Bluetooth interface that are not managed with serdev typically use btattach to attach to the BlueZ stack: btattach -B /dev/<tty> -P bcm & Devices with a UART Bluetooth interface that are managed by serdev, and the Sterling LWB5+ radio with a USB Bluetooth interface are automatically attached to the Bluetooth stack during bus enumeration. Once attached, the Bluetooth device must be powered on before using the btlru: bluetoothctl power on To use btlru invoke btlru from the command console. Once invoked successfully, the command prompt will change to btlru :\>. From there ? can be used to obtain information on the commands and parameters used to run regulatory tests. The btlru will search sysfs during initialization to find the first HCI device to use. If the btlru is unable to find a device, it defaults to using hci0. Note: To specify a Bluetooth interface other than the default, use the -i <interface> command line option when invoking btlru. # btlru Using bluetooth device hci0 btlru :>? btlru :> <command> <option> [argument] commands: tm -> Enable BD/EDR Test Mode tx -> Continuous BT Transmit cw -> Carrier Wave transmit rx -> Continuous BT Receive cfg -> Configuration Sub Menu off -> Off s -> Current configuration ? -> Help x -> Exit BT cmd options: -c [0 - 78] -> BT Channel Number -t [DM[1,3,5], DH[1,3,5], 2DH[1,3,5], 3DH[1,3,5] -> BT Packet Type -p [0, 1, P9, AA, F0] -> BT Payload Pattern -l [-1, 0-max] -> BT Payload Length -h [0, 1] -> BT Hopping Mode (0:fixed, 1:hop) -a [xx-xx-xx-xx-xx-xx] -> BT RX Tx Bd Address -w [1-900] -> Script mode wait time (sec) -i <interface> -> BT Interface Name Ver x.x.x.x: btlru :> Before starting any testing, verify that the BT Mode is configured correctly. This can be done by issuing the cfg command. Note: The radio will remain in a particular test mode until that test is turned off using the off command. Each test should be stopped using the off command before starting another test. See Test Descriptions for test details and examples. When finished, exit btlru (x) and reboot.