bluez-avrcp-volume manual
medium
- Image Types:
- basesdk-amd64 / sdk-amd64 / target-armhf-internal / 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
- Ensure Rootfs is remounted as read/write.
- Install dependencies
- Restart the system to restore the filesystem state to read-only before running the test.
$ sudo mount -o remount,rw /
$ sudo apt install apertis-tests python3-dbus python3-gi
$ sudo reboot
Execution Steps
- Ensure PulseAudio is activated:
- Run btmon before any connection happens:
- Start simple agent:
- Pair both devices initiating from the phone side
- Pay attention to the simple-agent window as it requires input during the pairing process.
- In another terminal, execute (You can get the Bluetooth device address by running hcitool scan):
$ pactl stat
$ sudo btmon | grep -A4 'AV/C: Control'
$ /usr/lib/chaiwala-tests/bluez/simple-agent -y
$ /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