问题
I'm trying to register my Bluetooth service in SDP using BlueZ. I follow this tutorial. Code compiles successfully but when I run it, I get a segmentation fault (even with the code copy-pasted from the tutorial).
Part of stack trace:
{ "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"
}
Did anyone have the same problem?
回答1:
This segmentation fault is coming from broken sdptool in Bluez 5.
Solution for this is given in answer for following Raspberry Pi stackoverflow question.
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory
来源:https://stackoverflow.com/questions/53347346/segmentation-fault-when-calling-sdp-record-register