bluez-avrcp-volume manual

medium

Image Types:
basesdk-amd64 / sdk-amd64 / target-armhf-internal / target-armhf / target-amd64
Image Deployment:
APT
Type:
functional

Description

Test the AVRCP volume up and down commands.


Resources

  • A Bluetooth adapter
  • An A2DP Source and AVRCP capable phone (Nokia N9 — do not use an Android 4.2 phone as their Bluetooth AVRCP support is broken)
  • 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. Ensure Rootfs is remounted as read/write.
  2. $ sudo mount -o remount,rw /

  3. Install dependencies
  4. $ sudo apt install apertis-tests python3-dbus python3-gi

  5. Restart the system to restore the filesystem state to read-only before running the test.
  6. $ sudo reboot


Execution Steps

  1. Ensure PulseAudio is activated:
  2. $ pactl stat

  3. Run btmon before any connection happens:
  4. $ sudo btmon | grep -A4 'AV/C: Control'

  5. Start simple agent:
  6. $ /usr/lib/chaiwala-tests/bluez/simple-agent -y

  7. Pair both devices initiating from the phone side
  8. Pay attention to the simple-agent window as it requires input during the pairing process.
  9. In another terminal, execute (You can get the Bluetooth device address by running hcitool scan):
  10. $ /usr/lib/chaiwala-tests/bluez/test-avrcp.py -i hci0 device_address


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: 0x41 (VOLUME UP Pressed)

Length: 0x00