调用sdp_record_register()时出现分段错误

时间:2018-11-17 01:20:50

标签: linux bluetooth segmentation-fault bluez

我正在尝试使用BlueZ在SDP中注册我的蓝牙服务。我遵循this教程。代码可以成功编译,但是当我运行它时,会遇到分段错误(即使使用从教程复制粘贴的代码)。

堆栈跟踪的一部分:

{   "address": 140382101864854
,   "build_id": "a629c43f58d471aa12e35d3e63ee264c514a21ac"
,   "build_id_offset": 86422
,   "function_name": "sdp_device_record_register_binary"
,   "file_name": "/lib64/libbluetooth.so.3"
}
, {   "address": 140382101865504
,   "build_id": "a629c43f58d471aa12e35d3e63ee264c514a21ac"
,   "build_id_offset": 87072
,   "function_name": "sdp_device_record_register"
,   "file_name": "/lib64/libbluetooth.so.3"
}
, {   "address": 140382101865738
,   "build_id": "a629c43f58d471aa12e35d3e63ee264c514a21ac"
,   "build_id_offset": 87306
,   "function_name": "sdp_record_register"
,   "file_name": "/lib64/libbluetooth.so.3"
}

有人有同样的问题吗?

1 个答案:

答案 0 :(得分:0)

此分段错误来自Bluez 5中的sdptool损坏。

为此问题的解决方案是针对以下Raspberry Pi stackoverflow问题的解答。

Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory