经过与Ubuntu频繁崩溃的斗争几天终于有效。
以下是我尝试过的步骤。请把它作为参考,因为我有可能忘记写一些步骤的机会很高
.......................... .................................................. .......................
问题概述:尝试连接Linux操作系统到BT耳机并建立sco链接播放音乐
Ubuntu的配置:
内核版本: 3.0.0-32泛型
Ubuntu的优化版本 - > 11.10
测试设备: JABRA EASY GO耳机..
....................... .................................................. ..... 1)安装以上版本的Ubuntu。这个Ubuntu版本不再支持,但由于我的内部设备使用几乎相同的内核版本,所以我坚持使用这个版本。
2)配置apt-get源列表。由于安装的版本不受支持,apt-get将不起作用。要使其工作,请修改/etc/apt/sources.list
。
示例 - >
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
3)我会建议安装突触以及安装包和缺少的库。
4)安装以下的软件包 - >
bluez-hcidump
bluez-utils
libbluetooth1
libbluetooth1-dev
install automake-1.7 and autoconfig
cvs
5)谷歌它下载btsco的源代码或替代地
使用以下COMAND
cvs -d:pserver:[email protected]:/cvsroot/bluetooth-alsa login
cvs -d:pserver:[email protected]:/cvsroot/bluetooth-alsa co btsco
6)现在编译和安装
我)去btsco目录
II)./bootstrap 问题:
如果错误/警告:宏`AM_PATH_SDL”在图书馆找不到安装libbsdl1.2-dev的
一次bootsrap通过执行配置 II)运行./configure 问题:
- 如果蓝牙/蓝牙.H缺失 - >安装libbluetooth-dev的
- 包需求的dbus-1> = 0.36不符合& DBUS,巧舌如簧没有发现 - >安装libdbus-巧舌如簧-1-dev的
iii)就
问题: 。/ libtool:第841行:X - tag = CXX:命令未找到,以及其他更多类似错误
要解决该错误:请下载libtool-1.5.24 tar ball。提取它并做configure and make
。 现在再次在btsco上配置并将libtool从libtool dir复制到btsco。
iv)就安装 V)让mainatiner清洁 O/P:btsco是建立全成,你可以在/ usr/local/bin目录中找到它。
7)建立内核模块
I)的CD/usr/src目录/ btsco /内核
ii)作出
问题:我想你会得到错误巨大的名单。开放btsco.cand处理由步骤每个错误步骤
1没有发现错误的声音/ driver.h血乳酸血乳酸 - >评论说,在btsco.c文件
2评论的#include因为这是过时的现在
3)添加
#include< linux/smp.h>
#include< linux/muxtex.h>
4)DEFINE_MUTEX(os_mutex);
5)snd_assert已过时由如果statment例如
if(bt_sco->playback == NULL)
{
}
6)替代由低于9函数从净复制kill_proc(再次过时),因此更换UIT .. tahnks至那个人) 链路:http://www.linuxquestions.org/questions/linux-kernel-70/is-there-any-kill_proc-replacement-for-proprietary-linux-kernel-drivers-4175460017/
int my_kill_proc(pid_t pid, int sig) {
int error = -ESRCH; /* default return value */
struct task_struct* p;
struct task_struct* t = NULL;
struct pid* pspid;
rcu_read_lock();
p = &init_task; /* start at init */
do {
if (p->pid == pid) { /* does the pid (not tgid) match? */
t = p;
break;
}
p = next_task(p); /* "this isn't the task you're looking for" */
} while (p != &init_task); /* stop when we get back to init */
if (t != NULL) {
pspid = t->pids[PIDTYPE_PID].pid;
if (pspid != NULL) error = kill_pid(pspid,sig,1);
}
rcu_read_unlock();
return error;
}
和替代kill_proc那么应该是
my_kill_proc(bt_sco->thread_pid, SIGINT)
6)取代%d to %lu
用于错误长整型
7)replace lock_kernal to mutex_lock(&os_mutex)
相同解锁
希望使将是成功之后
8)使安装 9)depmod -e 10 0使清洁
11)modprobe的snd_bt_sco
......................................
现在运行btsco
一)hciconfig hci0声音0X0060
B)hcitool扫描JABRA
C)在/ usr/local/bin目录/ btsco -r的
GET mac_addre4ss - v mac_addrees
if error error?:控制打开(HW:1),然后捷波朗犯规支持SCO或内核模块不在另一终端上装载
d)做 - >sudo hcidump -i hci0 sco
监视SCO数据包
E)一旦贾伊连接建立 运行aplay -D plughw:Headset /home/my_home_dir/my_sample_fiile.wav