2403023_en-US

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

2403023_en-US

2403023_en-US

A2DP test on IW612+I.MX8MPlus-EVK L6.6.52

This doc is a brief step by step introduction for how to play music through A2DP on IW612 + I.MX8MPlus-EVK based on L6.6.52.


Step 1: Load WiFi/Bluetooth Driver

NXP i.MX Release Distro 6.6-scarthgap imx8mpevk ttymxc1
imx8mpevk login: root
root@imx8mpevk:~# modprobe moal mod_para=nxp/wifi_mod_para.conf
root@imx8mpevk:~#
root@imx8mpevk:~# dmesg | grep wlan
[ 562.728200] wlan: Loading MWLAN driver
[ 562.728788] wlan: Register to Bus Driver...
[ 562.730460] wlan: Enable TX SG mode
[ 562.730464] wlan: Enable RX SG mode
[ 563.554778] wlan: uap%d set max_mtu 2000
[ 563.622367] wlan: version = SDIW612---18.99.3.p21.10-MM6X18505.p4-GPL-(FP92)
[ 563.625611] wlan: Register to Bus Driver Done
[ 563.625622] wlan: Driver loaded successfully
root@imx8mpevk:~#modprobe btnxpuart
root@imx8mpevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: D0:17:69:EE:71:4F ACL MTU: 1021:7 SCO MTU: 120:6
DOWN
RX bytes:774 acl:0 sco:0 events:48 errors:0
TX bytes:496 acl:0 sco:0 commands:47 errors:0
Features: 0xbf 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: PERIPHERAL ACCEPT

Step 2: Up BT interface and enable the power save feature
root@imx8mpevk:~# hciconfig hci0 up
root@imx8mpevk:~# hciconfig hci0 piscan
root@imx8mpevk:~#hciconfig hci0 noencrypt
root@imx8mpevk:~# hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: D0:17:69:EE:71:4F ACL MTU: 1021:7 SCO MTU: 120:6
UP RUNNINGPSCAN ISCAN
RX bytes:1900 acl:0 sco:0 events:109 errors:0
TX bytes:1365 acl:0 sco:0 commands:108 errors:0
Features: 0xbf 0xfe 0x8f 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: PERIPHERAL ACCEPT
Name: 'imx8mpevk'
Class: 0x200000
Service Classes: Audio
Device Class: Miscellaneous,

CI Version: 5.4 (0xd) Revision: 0x8300
LMP Version: 5.4 (0xd) Subversion: 0x1015
Manufacturer: NXP Semiconductors (formerly Philips Semiconductors) (37)

Step 3: Scan, Pair and Connect to Headset
root@imx8mpevk:~# bluetoothctl
hci0 new_settings: powered connectable discoverable bondable ssp br/edr le secure-conn cis-central cis-peripheral
Agent registered
[CHG] Controller D0:17:69:EE:71:4F Pairable: yes
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# agent on
Agent is already registered
[bluetooth]# scan on
[NEW] Device B1:96:11:68:9C:09 联想thinkplus-HE05X II代


[bluetooth]# scan off
[bluetooth]# pair B1:96:11:68:9C:09
Attempting to pair with B1:96:11:68:9C:09
hci0 device_flags_changed: B1:96:11:68:9C:09 (BR/EDR)
supp: 0x00000000 curr: 0x00000000
[DEL] Device 67:02:B9:7C:ED:B5 67-02-B9-7C-ED-B5
[DEL] Device 80:F4:16:4C:48:F2 HI-Apiyoo-12MIQ001981
hci0 B1:96:11:68:9C:09 type BR/EDR connected eir_len 34
[CHG] Device B1:96:11:68:9C:09 Connected: yes
hci0 new_link_key B1:96:11:68:9C:09 type 0x04 pin_len 0 store_hint 1
[CHG] Device B1:96:11:68:9C:09 Bonded: yes
[DEL] Device 6A:98:7A:08:0F:B8 6A-98-7A-08-0F-B8
[CHG] Device B1:96:11:68:9C:09 ServicesResolved: yes
[CHG] Device B1:96:11:68:9C:09 Paired: yes
Pairing successful5X II代]#
[DEL] Device 6C:59:25:E5:66:77 6C-59-25-E5-66-77
[DEL] Device 61:CC:7D:CE:20:4E 61-CC-7D-CE-20-4E
[DEL] Device 64:C1:4B:76:C1:80 64-C1-4B-76-C1-80
[DEL] Device 72:50:16:14:52:A6 72-50-16-14-52-A6
hci0 B1:96:11:68:9C:09 type BR/EDR disconnected with reason 2
[CHG] Device B1:96:11:68:9C:09 ServicesResolved: no
[CHG] Device B1:96:11:68:9C:09 Connected: no
[bluetooth]#trust B1:96:11:68:9C:09
[CHG] Device B1:96:11:68:9C:09 Trusted: yes
Changing B1:96:11:68:9C:09 trust succeeded
[bluetooth]#connect B1:96:11:68:9C:09
Attempting to connect to B1:96:11:68:9C:09
hci0 B1:96:11:68:9C:09 type BR/EDR connected eir_len 34
[CHG] Device B1:96:11:68:9C:09 Connected: yes
[NEW] Endpoint /org/bluez/hci0/dev_B1_96_11_68_9C_09/sep1
[NEW] Endpoint /org/bluez/hci0/dev_B1_96_11_68_9C_09/sep2

[NEW] Transport /org/bluez/hci0/dev_B1_96_11_68_9C_09/sep1/fd0
[CHG] Transport /org/bluez/hci0/dev_B1_96_11_68_9C_09/sep1/fd0 Delay: 0x05dc (1500)
Connection successfulII代]#
[CHG] Device B1:96:11:68:9C:09 ServicesResolved: yes
[联想thinkplus-HE05X II代]#quit

Step 4: Start pipewire and wireplumber Service then list and choose default Audio Source/Sink Card
root@imx8mpevk:~#systemctl --user start pipewire wireplumber
root@imx8mpevk:~#wpctl status
PipeWire 'pipewire-0' [1.0.5, root@imx8mpevk, cookie:831282980]
Clients:
32. WirePlumber [1.0.5, root@imx8mpevk, pid:1528]
40. WirePlumber [export] [1.0.5, root@imx8mpevk, pid:1528]
87. wpctl [1.0.5, root@imx8mpevk, pid:1552]
Audio

-Devices:
41. Built-in Audio [alsa]
42. Built-in Audio [alsa]
43. Built-in Audio [alsa]
44. Built-in Audio [alsa]
45. Built-in Audio [alsa]
81. 联想thinkplus-HE05X II代 [bluez5]

-Sinks
47. Built-in Audio Mono [vol: 0.40]
48. Built-in Audio Stereo [vol: 0.40]
50. Built-in Audio Stereo [vol: 0.40]
58. Built-in Audio Digital Stereo (IEC958) [vol: 0.40]
* 82. 联想thinkplus-HE05X II代 [vol: 0.40]

-Sources:
46. Built-in Audio Mono [vol: 1.00]
49. Built-in Audio Stereo [vol: 1.00]
51. Built-in Audio Stereo [vol: 1.00]
* 59. Built-in Audio Digital Stereo (IEC958) [vol: 1.00]
-Filters:

-Streams:
Video
-Devices:

52. mxc-isi-m2m_v1 [v4l2]

53. vsi_v4l2enc [v4l2]
54. vsi_v4l2dec [v4l2]
Streams:
Settings
Default Configured Devices:
root@imx8mpevk:~#wpctl set-default 82
root@imx8mpevk:~#wpctl set-default 59
root@imx8mpevk:~# wpctl status
PipeWire 'pipewire-0' [1.0.5, root@imx8mpevk, cookie:831282980]
Clients:
32. WirePlumber [1.0.5, root@imx8mpevk, pid:1528]
40. WirePlumber [export] [1.0.5, root@imx8mpevk, pid:1528]
87. wpctl [1.0.5, root@imx8mpevk, pid:1572]
Audio
41. Built-in Audio [alsa]
42. Built-in Audio [alsa]
43. Built-in Audio [alsa]
44. Built-in Audio [alsa]
45. Built-in Audio [alsa]
81. 联想thinkplus-HE05X II代 [bluez5]
47. Built-in Audio Mono [vol: 0.40]
48. Built-in Audio Stereo [vol: 0.40]
50. Built-in Audio Stereo [vol: 0.40]
58. Built-in Audio Digital Stereo (IEC958) [vol: 0.40]
* 82. 联想thinkplus-HE05X II代 [vol: 0.40]
46. Built-in Audio Mono [vol: 1.00]
49. Built-in Audio Stereo [vol: 1.00]
51. Built-in Audio Stereo [vol: 1.00]
* 59. Built-in Audio Digital Stereo (IEC958) [vol: 1.00]
分区Bluetooth 的第4 页
* 59. Built-in Audio Digital Stereo (IEC958) [vol: 1.00]
Streams:
Video
52. mxc-isi-m2m_v1 [v4l2]
53. vsi_v4l2enc [v4l2]
54. vsi_v4l2dec [v4l2]
Streams:
Settings
Default Configured Devices:
0. Audio/Sink bluez_output.B1_96_11_68_9C_09.1
1. Audio/Source alsa_input.platform-sound-xcvr.iec958-stereo

Step 5: Copy、Play and Enjoy Music
Drag the music file yesterday-once-more.wavto I.MX8MP-EVK board by connecting Windows PC and I.MX8MP-EVK board into one local area network.
root@imx8mpevk:~# pw-play -v ./yesterday-once-more.wav
sndfile: opened file "yesterday-once-more.wav" format 00010002 channels:2 rate:44100
sndfile: using default channel map: FL,FR
PCM: fmt:s16 rate:44100 channels:2 width:2
rate:44100 latency:4410 (0.100s)
connecting playback stream; target=(null)
stream state changed unconnected -> connecting
stream param change: Spa:Enum:ParamId:Latency
stream param change: Spa:Enum:ParamId:Tag
stream param change: Spa:Enum:ParamId:Props
stream properties:
application.name = "pw-play"
node.name = "pw-play"
media.software = "Lavf58.29.100"
media.format = "WAV (Microsoft)"
node.rate = "1/44100"
node.latency = "4410/44100"
media.type = "Audio"
media.category = "Playback"
media.role

media.filename = "yesterday-once-more.wav"
media.name = "yesterday-once-more.wav"
stream.is-live = "true"
node.want-driver = "true"
node.autoconnect = "true"
media.class = "Stream/Output/Audio"
remote 0 is named "pipewire-0"
stream state changed connecting -> paused
stream param change: Spa:Enum:ParamId:Props
stream param change: Spa:Enum:ParamId:Latency
stream param change: Spa:Enum:ParamId:Latency
stream param change: Spa:Enum:ParamId:Format
stream state changed paused -> streaming
stream set volume to 1.000 -success
stream node 88
stream time: now:0 rate:1/48000 ticks:0 delay:9248 queued:0 buffered:0 buffers:0 avail:2 size:0
stream time: now:4821374572568 rate:1/48000 ticks:49152 delay:9248 queued:1882 buffered:32 buffers:1 avail:1 size:1882
stream time: now:4822355905886 rate:1/48000 ticks:96256 delay:9248 queued:1882 buffered:32 buffers:1 avail:1 size:1882
stream time: now:4823379905870 rate:1/48000 ticks:145408 delay:9248 queued:1881 buffered:32 buffers:1 avail:1 size:1881

Finished By Christine.Li
Jul 22th,2026.

标记 (1)
无评分
版本历史
最后更新:
1 周之前
更新人: