Python
bluez 标签描述

bluetoothd的启动流程 梳理bluetoothd的启动流程,总结一下 ./bluetoothd-h Usage: bluetoothd[OPTION...] HelpOptions: -h,--helpShowhelpoptions ApplicationOptions: -d,--debug=DEBUGSpecifydebugoptionstoenable -p,--plugin=NAME,..,Specifypluginstoload -P,--noplugin=NAME,...Specifypluginsnottoload -f,--configfile=FILESpec...

mgmt接口调用 在bluetoothd启动是,会进行初始化,在这里会获取mgmt句柄来进行和内核之间的通信 8677intadapter_init(void) 8678{ 8679dbus_conn=btd_get_dbus_connection();/获取dbus连接后的句柄/ 8680/获取mgmt句柄,用于和内核层mgmt进行通信/ 8681mgmt_master=mgmt_new_default(); 8682if(!mgmt_master){ 8683error("Failedtoaccessmanagementinterface"); 8684return-EIO; 8685...