Ubuntu15.10 执行sdptool add A2SNK没任何提示
2016-02-14 14:24
489 查看
晕哥516333132@QQ.com 原创
转载请注明: /article/10549429.html
2016-02-14
昨天在ubuntu 15.10 调试A2DP SNK 的时候,
执行 sdptool add A2SNK, 发现没任何错误提示,
我以为A2SNK写错了, 结果 sdptool add SP, 还是一样的问题。
执行 echo $, 输出 255(根据经验应该是 return -1), 应该是没成功了。
权限不够? 加上sudo 还他妈的一样,
sdptool del SP, 居然说服务不存在,
实在没办法了,下载blueZ 最新5.37 源码编译
非常顺利的产生了 sdptool 文件,
执行 sdptool add A2SNK 结果还是一样,
跟踪源码, 发现 sdp_connect() 函数返回值是NULL指针,程序直接退出了。
而后发现别的地方调用了 sdp_connect() 会打印出错误提示:
唯独执行add 这个命令的时候没打印, 就直接退出了, SHIT !!!!
根据上面的关键字, 放狗搜索,发现不止我一个人有这个问题
http://stackoverflow.com/questions/22739906/registering-a-sdp-service-with-bluez-on-fedora-20
解决方法:
bluetoothd守护程序要执行兼容模式,
我试了一下,成功了!
但是没搞明白原因。
转载请注明: /article/10549429.html
2016-02-14
昨天在ubuntu 15.10 调试A2DP SNK 的时候,
执行 sdptool add A2SNK, 发现没任何错误提示,
我以为A2SNK写错了, 结果 sdptool add SP, 还是一样的问题。
执行 echo $, 输出 255(根据经验应该是 return -1), 应该是没成功了。
权限不够? 加上sudo 还他妈的一样,
sdptool del SP, 居然说服务不存在,
实在没办法了,下载blueZ 最新5.37 源码编译
非常顺利的产生了 sdptool 文件,
执行 sdptool add A2SNK 结果还是一样,
跟踪源码, 发现 sdp_connect() 函数返回值是NULL指针,程序直接退出了。
而后发现别的地方调用了 sdp_connect() 会打印出错误提示:
Failed to connect to SDP server on FF:FF:FF:00:00:00
唯独执行add 这个命令的时候没打印, 就直接退出了, SHIT !!!!
根据上面的关键字, 放狗搜索,发现不止我一个人有这个问题
http://stackoverflow.com/questions/22739906/registering-a-sdp-service-with-bluez-on-fedora-20
解决方法:
You have to start bluetoothd with --compat flag. I don't know if this is the "Fedora way" of doing it, but I edited /usr/lib/systemd/system/bluetooth.service and included the flag in the ExecStart option. ExecStart=/usr/libexec/bluetooth/bluetoothd --compat Then $ systemctl daemon-reload $ systemctl restart bluetooth.service
bluetoothd守护程序要执行兼容模式,
我试了一下,成功了!
但是没搞明白原因。
相关文章推荐
- linux下安装jdk和tomcat
- 理解并行编程
- 什么是debug模式,,release模式?
- 积跬步,聚小流------come on,我的2016
- mac osx 和windows 时间不同步解决方法
- I/O 和 内存映射文件
- Qt For Android 之启动页
- (转)[SQL Server] 动态sql给变量赋值(或返回值给变量)
- 深度解析RARP协议
- PHP学习之Apache修改默认站点的目录
- android:Activity启动模式之singleInstance
- Longest Palindromic Substring
- Qt For Android 引导页
- RHCE 学习笔记(21) - SELinux
- 有状态的EJB对象和无状态的EJB对象
- Toolbar自定义布局
- 有状态的EJB对象和无状态的EJB对象
- 解题报告:8VC Venture Cup 2016 — Elimination Round C.Block Towers
- 判断文件是否为图片
- Java NIO概述