iMX8 Bluetooth HFP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8 Bluetooth HFP

2,594 Views
Jose_Portilha
Contributor I

Hello, I am working with an iMX8 Nitrogen8M Plus board and I am trying to use the HFP bluetooth profile so when I connect my smartphone to the board I can receive calls through the board speakers. When I use media applications (like Youtube) the audio works on the board without problems but when it comes to phone calls it does not work.

The board has a LWB5+ Wifi/Bluetooth module, my first question is if this module supports the HFP profile because the datasheet is not clear about.

Secondly, I am using an Yocto image, is there any configuration or package needed to make this profile work to support calls?

0 Kudos
Reply
5 Replies

2,429 Views
Jose_Portilha
Contributor I

Hello again, whenever I try to make a call I get these logs from PulseAudio. Do you know if its related with the bluetooth module itself or rather with some kind of audio configuration?

Best regards.

0 Kudos
Reply

2,568 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

 I suggest you confirm with module manufacturer if HFP is supported.

If its supported, once hci0 is up, you need to follow the next steps:

Start HCI-Dump Log

  • hcidump -Xt >> hcidump1.log &

Setup pulseaudio

  • pulseaudio --start --log-target=syslog &
  • pacmd set-default-sink 2

Start bluetooth-player

  • /usr/bin/bluetooth-player &

Open a new terminal start bluetoothctl

  • /usr/bin/bluetoothctl

Connect to Android Phone from bluetoothctl terminal

  • power on
  • agent on
  • default-agent
  • scan on
  • Wait to see name of desired device and BD Addr
  • scan off
  • connect <BD_Address>

Play music from Phone

Best regards,

0 Kudos
Reply

2,551 Views
Jose_Portilha
Contributor I

Hello, thanks for the reply. In my yocto image I am adding these lines:

IMAGE_INSTALL:append = " pulseaudio"
DISTRO_FEATURES:append = " pulseaudio"

However the pulseaudio is not recognized has I cannot check the vesion or use commands like "pactl"

Kind regards.
0 Kudos
Reply

2,545 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You should check the available packages on the BSP by running:

$ bitbake -s

You can search for the pulseaudio available packages using grep:

$ bitbake -s | grep pulseaudio

As you mention, to add any package you need to use the following in your conf/local.conf file:

IMAGE_INSTALL_append = “ package”

Please try with:

IMAGE_INSTALL:append = “ pulseaudio pulseaudio-server pulseaudio-misc”
DISTRO_FEATURES:append = “ pulseaudio”

You can use "/imx-yocto-bsp/sources/meta-imx/meta-imx-bsp/recipes-multimedia/pulseaudio" recipe as example.

Best regards.

0 Kudos
Reply

2,466 Views
Jose_Portilha
Contributor I

Hello, thanks for your reply. I have sucessfuly managed to install the pulseaudio server on my image as can I now execute commands as 'pactl list' and 'paplay' to reproduce a sample audio file. However whenever I connect my smartphone to the board via bluetooth I am not able to get the sound from voice calls to come out from the board jack. 

The controller seems to support the HFP profile, as the UUID for that profile is shown on bluetoothctl and whenever I make a connection I need to accept a service with the respective UUID. Do you have any idea of how can I route the audio from my smartphone to the jack output?  

0 Kudos
Reply