bluez-avrcp-volume manual
medium
- Image Types:
- basesdk-amd64 / hmi-armhf / hmi-amd64 / sdk-amd64
- Image Deployment:
- APT, OSTree
- Type:
- functional
Description
Test the AVRCP volume up and down commands.
Resources
- A Bluetooth adapter
- An A2DP Source and AVRCP capable phone (https://www.apertis.org/reference_hardware/extras/)
- Note that you do not need to play any music on the phone; nor do you need to have headphones or a speaker plugged into the Apertis device.
Pre Conditions
- From a PC, download and unpack the test data tarball from the gitlab test repository:
- Copy the bluez-phone-* folder to the target device:
- Log into the target device:
- After log into the DUT, enter the test directory
- Note that the tarball may change depending on the release/branch being tested, please make sure to download the correct tarball for the release in question.
- If running the test on an SDK image, kill the blueman-applet process, as it prevents the test from installing its own pairing agent.
- Please note that connman disables bluetooth by default on a fresh image.
- Enable device:
$ wget https://gitlab.apertis.org/tests/bluez-phone/-/archive/apertis/v2025dev1/bluez-phone.tar.gz
$ tar -xvf bluez-phone.tar.gz
$ DUT_IP=<device-ip>
$ scp -r bluez-phone-* user@$DUT_IP:
$ ssh user@$DUT_IP
$ cd bluez-phone-*
$ connmanctl enable bluetooth
Execution Steps
- The phone must be in discoverable mode for starting this test. Look for the phone in this list, and save the BT address. It will be used while running the test.
- Ensure the audio manager is activated:
- Run btmon before any connection happens:
- Execute the test suite in another terminal:
- There are some options:
- Once the test begins, after Apertis finishes pairing with the phone, you must initiate pairing from the phone and do the pairing again as part of the test. You may need to unpair Apertis from within the phone first.
$ pactl stat
$ sudo btmon | grep -A4 'AV/C: Control'
$ ./bluez-avrcp-volume.sh
-a select which device you want to pair with (specify the address)
-s skip pairing because the device is already paired. -a must be present when using this.
-x enables test debugging (only useful if a test fails)
Expected
If success, the following output should be generated by btmon:
AV/C: Control: address 0x48 opcode 0x7c
Subunit: Panel
Opcode: Passthrough
Operation: 0x42 (VOLUME DOWN Pressed)
Length: 0x00
--
AV/C: Control: address 0x48 opcode 0x7c
Subunit: Panel
Opcode: Passthrough
Operation: 0xc2 (VOLUME DOWN Released)
Length: 0x00
--
AV/C: Control: address 0x48 opcode 0x7c
Subunit: Panel
Opcode: Passthrough
Operation: 0x41 (VOLUME UP Pressed)
Length: 0x00
--
AV/C: Control: address 0x48 opcode 0x7c
Subunit: Panel
Opcode: Passthrough
Operation: 0xc1 (VOLUME UP Released)
Length: 0x00
Notes
- Errors most frequently occurs at pairing. This can be used to circumvent pairing problems, though this does not mean the test is a full pass, as the pairing is part of the test:
cd ~/bluez-avrcp-volume
armhf/bin/pair_two hci0 <bt address of the phone>
./bluez-avrcp-volume.sh -a <address of the phone> -s