![ubuntu怎么把蓝牙耳机接在手机上使用?](https://linux22.com/image/976750/ubuntu%E6%80%8E%E4%B9%88%E6%8A%8A%E8%93%9D%E7%89%99%E8%80%B3%E6%9C%BA%E6%8E%A5%E5%9C%A8%E6%89%8B%E6%9C%BA%E4%B8%8A%E4%BD%BF%E7%94%A8%EF%BC%9F.png)
我知道如何将蓝牙耳机连接到 Ubuntu,这样我就可以远程与 Skype 通话。
现在我有一个相反的问题:如何将 Ubuntu 变成一个复杂的耳机,可以记录输入和输出声音流?我的手机(诺基亚 6310i)缺乏不错的录音功能,我希望我的笔记本电脑能提供一些帮助。
打开 A2DP 接收器和源是不够的以便我的笔记本电脑在手机上可以作为远程耳机看到。我想我需要打开其他额外的蓝牙协议(类似于 HFP 配置文件)。
我发现了一个[nohands][3]
承诺可以做到这一点的实用程序,但它无法在 Ubuntu 14.04 上构建,而且看起来已经被废弃了 4 年。
在满足依赖关系后(至少根据./configure
),它无法构建:
[adam:/home/Adama-docs/Adam/Adam/linux/tmp/nohands]$ make
make all-recursive
make[1]: Entering directory `/home/Adama-docs/Adam/Adam/linux/tmp/nohands'
Making all in libhfp
make[2]: Entering directory `/home/Adama-docs/Adam/Adam/linux/tmp/nohands/libhfp'
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -include config.h -Wshadow -fno-exceptions -g -Wall -MT bt.o -MD -MP -MF .deps/bt.Tpo -c -o bt.o bt.cpp
In file included from bt.cpp:48:0:
../include/libhfp/bt.h: In member function ‘void libhfp::BtDevice::DisconnectAll()’:
../include/libhfp/bt.h:1081:50: warning: converting ‘false’ to pointer type for argument 1 of ‘void libhfp::BtDevice::__DisconnectAll(libhfp::ErrorInfo*)’ [-Wconversion-null]
void DisconnectAll(void) { __DisconnectAll(false); }
^
In file included from bt.cpp:42:0:
bt.cpp: In static member function ‘static int libhfp::SdpAsyncTaskHandler::SdpLookupChannel(libhfp::SdpTaskParams&)’:
bt.cpp:81:20: error: taking address of temporary [-fpermissive]
sdp = sdp_connect(BDADDR_ANY, &htp.m_bdaddr, SDP_RETRY_IF_BUSY);
^
bt.cpp: In member function ‘bool libhfp::BtHub::Start(libhfp::ErrorInfo*)’:
bt.cpp:1226:22: error: taking address of temporary [-fpermissive]
m_sdp = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);
^
bt.cpp:1226:34: error: taking address of temporary [-fpermissive]
m_sdp = sdp_connect(BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);
^
In file included from ../include/libhfp/bt.h:31:0,
from bt.cpp:48:
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::operator()(TA1) [with TA1 = libhfp::SdpTask*]’:
bt.cpp:219:25: required from here
../include/libhfp/events.h:816:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:816:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::SdpTask*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:816:13: note: use ‘this->Invoke’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1, TA2>::Register(TargT*, void (TargT::*)(TA1, TA2)) [with TargT = libhfp::SdpAsyncTaskHandler; TA1 = libhfp::SocketNotifier*; TA2 = int]’:
bt.cpp:349:27: required from here
../include/libhfp/events.h:853:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:853:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::SocketNotifier*, int, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:853:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::operator()(TA1) [with TA1 = libhfp::HciTask*]’:
bt.cpp:687:25: required from here
../include/libhfp/events.h:816:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:816:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::HciTask*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:816:13: note: use ‘this->Invoke’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::Register(TargT*, void (TargT::*)(TA1)) [with TargT = libhfp::BtHci; TA1 = libhfp::TimerNotifier*]’:
bt.cpp:894:48: required from here
../include/libhfp/events.h:810:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:810:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::TimerNotifier*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:810:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1, TA2>::Register(TargT*, void (TargT::*)(TA1, TA2)) [with TargT = libhfp::BtHci; TA1 = libhfp::SocketNotifier*; TA2 = int]’:
bt.cpp:895:51: required from here
../include/libhfp/events.h:853:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:853:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::SocketNotifier*, int, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:853:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::Register(TargT*, void (TargT::*)(TA1)) [with TargT = libhfp::BtHub; TA1 = libhfp::TimerNotifier*]’:
bt.cpp:1142:41: required from here
../include/libhfp/events.h:810:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:810:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::TimerNotifier*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:810:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1, TA2>::Register(TargT*, void (TargT::*)(TA1, TA2)) [with TargT = libhfp::BtHub; TA1 = libhfp::SocketNotifier*; TA2 = int]’:
bt.cpp:1254:53: required from here
../include/libhfp/events.h:853:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:853:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::SocketNotifier*, int, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:853:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::operator()(TA1) [with TA1 = libhfp::ErrorInfo*]’:
bt.cpp:1415:30: required from here
../include/libhfp/events.h:816:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:816:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::ErrorInfo*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:816:13: note: use ‘this->Invoke’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1, TA2>::operator()(TA1, TA2) [with TA1 = libhfp::BtDevice*; TA2 = libhfp::ErrorInfo*]’:
bt.cpp:1447:27: required from here
../include/libhfp/events.h:859:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:859:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::BtDevice*, libhfp::ErrorInfo*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:859:13: note: use ‘this->Invoke’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::Register(TargT*, void (TargT::*)(TA1)) [with TargT = libhfp::BtHub; TA1 = libhfp::HciTask*]’:
bt.cpp:1506:58: required from here
../include/libhfp/events.h:810:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:810:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::HciTask*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:810:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::operator()(TA1) [with TA1 = libhfp::BtManaged*]’:
bt.cpp:1705:31: required from here
../include/libhfp/events.h:816:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:816:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::BtManaged*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:816:13: note: use ‘this->Invoke’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1>::Register(TargT*, void (TargT::*)(TA1)) [with TargT = libhfp::BtDevice; TA1 = libhfp::HciTask*]’:
bt.cpp:1784:65: required from here
../include/libhfp/events.h:810:28: error: ‘RegisterDirect’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
RegisterDirect(targp, mfp);
^
../include/libhfp/events.h:810:28: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::HciTask*, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:810:28: note: use ‘this->RegisterDirect’ instead
../include/libhfp/events.h: In instantiation of ‘void libhfp::Callback<void, TA1, TA2, TA3>::operator()(TA1, TA2, TA3) [with TA1 = libhfp::BtDevice*; TA2 = const char*; TA3 = libhfp::ErrorInfo*]’:
bt.cpp:1813:48: required from here
../include/libhfp/events.h:903:13: error: ‘Invoke’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
Invoke(ia);
^
../include/libhfp/events.h:903:13: note: declarations in dependent base ‘libhfp::CallbackAdapter<void, libhfp::ArgSet<libhfp::BtDevice*, const char*, libhfp::ErrorInfo*, libhfp::Nil, libhfp::Nil, libhfp::Nil> >’ are not found by unqualified lookup
../include/libhfp/events.h:903:13: note: use ‘this->Invoke’ instead
make[2]: *** [bt.o] Error 1
make[2]: Leaving directory `/home/Adama-docs/Adam/Adam/linux/tmp/nohands/libhfp'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Adama-docs/Adam/Adam/linux/tmp/nohands'
make: *** [all] Error 2