bluekitchen / btstack

Dual-mode Bluetooth stack, with small memory footprint.
http://bluekitchen-gmbh.com
Other
1.74k stars 618 forks source link

AVRCP Commands: next and previous failed in a2dp_source_demo #353

Open lnjin opened 3 years ago

lnjin commented 3 years ago

Describe the bug AVRCP commands next and previous failed in a2dp_source_demo

To Reproduce Steps to reproduce the behavior:

  1. Run example 'a2dp_source_demo' on one linux server
  2. Connect from remote device(linux system) with bluetoothctl app
  3. After connect successfully, start bluetooth-player on remote device
  4. Enter next and previous command in bluetooth-player

Expected behavior next and previous commands should be supported

HCI Packet Logs hci_dump.zip

Environment

Additional context demo side log: root@lina-OptiPlex-790:/home/lina/Git/btstack/port/libusb# ./a2dp_source_demo Packet Log: /tmp/hci_dump.pklg USB Path: 01-08 Local version information:

remote device side log: root@imx8mqevk:~# bluetoothctl Agent registered [bluetooth]# paired-devices [bluetooth]# scan on Discovery started [CHG] Controller 20:4E:F6:BB:06:C6 Discovering: yes [NEW] Device 50:6E:D4:67:61:E9 50-6E-D4-67-61-E9 [NEW] Device 73:53:06:39:4A:A6 73-53-06-39-4A-A6 [NEW] Device 61:E0:90:98:67:C3 61-E0-90-98-67-C3

[bluetooth]# pair 00:1A:7D:DA:71:11 Attempting to pair with 00:1A:7D:DA:71:11 [CHG] Device 00:1A:7D:DA:71:11 Connected: yes [CHG] Device 00:1A:7D:DA:71:11 Modalias: bluetooth:v048Fp0001d0001 [CHG] Device 00:1A:7D:DA:71:11 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb [CHG] Device 00:1A:7D:DA:71:11 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Device 00:1A:7D:DA:71:11 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Device 00:1A:7D:DA:71:11 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 00:1A:7D:DA:71:11 ServicesResolved: yes [CHG] Device 00:1A:7D:DA:71:11 Paired: yes Pairing successful [A2DP Source 00:1A:7D:DA:71:11]# trust 00:1A:7D:DA:71:11 [CHG] Device 00:1A:7D:DA:71:11 Trusted: yes Changing 00:1A:7D:DA:71:11 trust succeeded [CHG] Device 00:1A:7D:DA:71:11 ServicesResolved: no [CHG] Device 00:1A:7D:DA:71:11 Connected: no [bluetooth]# connect 00:1A:7D:DA:71:11 Attempting to connect to 00:1A:7D:DA:71:11 [CHG] Device 00:1A:7D:DA:71:11 Connected: yes Connection successful [CHG] Device 00:1A:7D:DA:71:11 ServicesResolved: yes [A2DP Source 00:1A:7D:DA:71:11]# paired-devices Device 00:1A:7D:DA:71:11 A2DP Source 00:1A:7D:DA:71:11 [A2DP Source 00:1A:7D:DA:71:11]# quit root@imx8mqevk:~# bluetooth-player [NEW] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 [default] [bluetooth]# [613341.821370] audit: type=1006 audit(1619598601.638:173): pid=86413 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=172 res=1 [bluetooth]# play Attempting to play Play successful [bluetooth]# pause Attempting to pause Pause successful [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Status: paused [bluetooth]# play Attempting to play Play successful [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Status: playing [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Title: Nao-deceased [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 TrackNumber: 0x000002 [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 NumberOfTracks: 0x000003 [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Duration: 0x003039 [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Album: A2DP Source Demo [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Artist: Decease [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Genre: vivid [bluetooth]# next Attempting to jump to next Next successful [bluetooth]# previous Attempting to jump to previous Previous successful [bluetooth]# next Attempting to jump to next Next successful [bluetooth]# previous Attempting to jump to previous Previous successful [bluetooth]# pause Attempting to pause Pause successful [CHG] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 Status: paused [bluetooth]# stop Attempting to stop Stop successful [DEL] Player /org/bluez/hci0/dev_00_1A_7D_DA_71_11/player0 [default] [bluetooth]# quit

mringwal commented 3 years ago

Hi. That's correct, next and previous are not implemented in the demo. It's not a problem of the AVRCP implementation itself. Good idea to let next/prev toggle between Nao Deceased and the Sine.