bluez-alsa icon indicating copy to clipboard operation
bluez-alsa copied to clipboard

Test Answer/Reject/Terminate a call in HFP

Open Devilliv opened this issue 8 years ago • 5 comments

hi @Arkq , I am interested in testing 'Answer/Reject/Terminate' behaviors when we are acting as HFP-HF. Is there any applications can do this? If not, could you please give me some advice about how to make it in a standard way? Thank you!

Devilliv avatar Sep 28 '18 08:09 Devilliv

Hi,

You might try bluealsa-rfcomm which can be used for sending RFCOMM commands to the connected device. For more information see the HFP documentation: https://www.bluetooth.com/specifications/profiles-overview

arkq avatar Oct 04 '18 12:10 arkq

You might try bluealsa-rfcomm

Wow, it works! Thank you! By the way, I need to add '-lncurses' as below (I modified Makefile directly):

utils/Makefile:

376 bluealsa_rfcomm_LDADD = \
377         -L/xxxxxxxx/usr/lib -lbluetooth \
378         -lreadline -lncurses

or it may cause the following error:

usr/lib/libreadline.so: undefined reference to `tgoto'
usr/lib/libreadline.so: undefined reference to `tgetflag'
usr/lib/libreadline.so: undefined reference to `PC'
usr/lib/libreadline.so: undefined reference to `tgetstr'
usr/lib/libreadline.so: undefined reference to `UP'
usr/lib/libreadline.so: undefined reference to `tputs'
usr/lib/libreadline.so: undefined reference to `tgetent'
usr/lib/libreadline.so: undefined reference to `BC'
usr/lib/libreadline.so: undefined reference to `tgetnum'
collect2: error: ld returned 1 exit status

That seems to be something about the lib dependencies in my environment, does that happen in yours?

Devilliv avatar Oct 08 '18 06:10 Devilliv

Devilliv, send example use bluealsa-rfcomm please.

Pro-pra avatar Oct 09 '18 01:10 Pro-pra

@Pro-pra You can try it on a HFP-HF side: bluealsa-rfcomm -i [hciX] [bdaddr] 'hciX' is the hci device in your system, 'bdaddr' is the address of the connected device. Then you can send raw AT commands to the connected device, for example:

ATA -- answer an incoming call
AT+CHUP -- reject/terminate a call
and so on.

Devilliv avatar Oct 09 '18 06:10 Devilliv

Thanks.

Pro-pra avatar Oct 11 '18 01:10 Pro-pra