bluez-avrcp-volume manual

medium

Image Types:
basesdk-amd64 / hmi-armhf / hmi-arm64 / 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

  1. Clone the tests repository from another computer (Note that the branch being tested may change depending on the release, please make sure to clone the correct branch for the release in question):
  2. $ git clone --depth 1 --branch  apertis/v2026dev1 https://gitlab.apertis.org/tests/bluez-phone
  3. Copy the test directory to the target device:
  4. $ DUT_IP=<device-ip>
    $ scp -r bluez-phone user@$DUT_IP:
  5. Log into the target device:
  6. $ ssh user@$DUT_IP
  7. After log into the DUT, enter the test directory, and run respective commands mentioned in the execution steps
  8. $ cd bluez-phone
  9. If running the test on an SDK image, kill the blueman-applet process, as it prevents the test from installing its own pairing agent.
  10. Please note that connman disables bluetooth by default on a fresh image.
  11. Enable device:
  12. $ connmanctl enable bluetooth

Execution Steps

  1. 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.
  2. Ensure the audio manager is activated:
  3. $ pactl stat
  4. Run btmon before any connection happens:
  5. $ sudo btmon  | grep -A4 'AV/C: Control'
  6. Execute the test suite in another terminal:
  7. $ ./bluez-avrcp-volume.sh
  8. There are some options:
  9. -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)

  10. 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.

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