tBTA_DM_SEC sec_event;
UNUSED(p_name);
- BTM_GetLocalDeviceAddr(sec_event.enable.bd_addr);
sec_event.enable.status = BTA_SUCCESS;
if(bta_dm_cb.p_sec_cback)
/* Structure associated with BTA_DM_ENABLE_EVT */
typedef struct
{
- BD_ADDR bd_addr; /* BD address of local device. */
tBTA_STATUS status;
} tBTA_DM_ENABLE;
/* events received by tBTA_JV_DM_CBACK */
#define BTA_JV_ENABLE_EVT 0 /* JV enabled */
#define BTA_JV_SET_DISCOVER_EVT 1 /* the result for BTA_JvSetDiscoverability */
-#define BTA_JV_LOCAL_ADDR_EVT 2 /* Local device address */
+// (zachoverflow): removed 2 because it's obsolete now
#define BTA_JV_LOCAL_NAME_EVT 3 /* Local device name */
#define BTA_JV_REMOTE_NAME_EVT 4 /* Remote device name */
#define BTA_JV_SET_ENCRYPTION_EVT 5 /* Set Encryption */
tBTA_JV_DISCOVERY_COMP disc_comp; /* BTA_JV_DISCOVERY_COMP_EVT */
tBTA_JV_SET_DISCOVER set_discover; /* BTA_JV_SET_DISCOVER_EVT */
tBTA_JV_SET_ENCRYPTION set_encrypt; /* BTA_JV_SET_ENCRYPTION_EVT */
- BD_ADDR bd_addr; /* BTA_JV_LOCAL_ADDR_EVT */
UINT8 *p_name; /* BTA_JV_LOCAL_NAME_EVT,
BTA_JV_REMOTE_NAME_EVT */
UINT8 scn; /* BTA_JV_GET_SCN_EVT */
/*******************************************************************************
**
-** Function BTA_JvGetLocalDeviceAddr
-**
-** Description This function obtains the local Bluetooth device address.
-** The local Bluetooth device address is reported by the
-** tBTA_JV_DM_CBACK callback with a BTA_JV_LOCAL_ADDR_EVT.
-**
-** Returns BTA_JV_SUCCESS if successful.
-** BTA_JV_FAIL if internal failure.
-**
-*******************************************************************************/
-extern tBTA_JV_STATUS BTA_JvGetLocalDeviceAddr(void);
-
-/*******************************************************************************
-**
** Function BTA_JvGetLocalDeviceName
**
** Description This function obtains the name of the local device
/*******************************************************************************
**
-** Function bta_jv_get_local_device_addr_cback
-**
-** Description Callback from btm after local bdaddr is read
-**
-** Returns void
-**
-*******************************************************************************/
-static void bta_jv_get_local_device_addr_cback(BD_ADDR bd_addr)
-{
- if(bta_jv_cb.p_dm_cback)
- bta_jv_cb.p_dm_cback(BTA_JV_LOCAL_ADDR_EVT, (tBTA_JV *)bd_addr, 0);
-}
-
-/*******************************************************************************
-**
** Function bta_jv_get_remote_device_name_cback
**
** Description Callback from btm after remote name is read
/*******************************************************************************
**
-** Function bta_jv_get_local_device_addr
-**
-** Description Reads the local Bluetooth device address
-**
-** Returns void
-**
-*******************************************************************************/
-void bta_jv_get_local_device_addr(tBTA_JV_MSG *p_data)
-{
- UNUSED(p_data);
-
- BTM_ReadLocalDeviceAddr((tBTM_CMPL_CB *)bta_jv_get_local_device_addr_cback);
-}
-
-/*******************************************************************************
-**
** Function bta_jv_get_local_device_name
**
** Description Reads the local Bluetooth device name
/*******************************************************************************
**
-** Function BTA_JvGetLocalDeviceAddr
-**
-** Description This function obtains the local Bluetooth device address.
-** The local Bluetooth device address is reported by the
-** tBTA_JV_DM_CBACK callback with a BTA_JV_LOCAL_ADDR_EVT.
-**
-** Returns BTA_JV_SUCCESS if successful.
-** BTA_JV_FAIL if internal failure.
-**
-*******************************************************************************/
-tBTA_JV_STATUS BTA_JvGetLocalDeviceAddr(void)
-{
- tBTA_JV_STATUS ret = BTA_JV_FAILURE;
- BT_HDR *p_msg;
-
- APPL_TRACE_API( "BTA_JvGetLocalDeviceAddr");
- if ((p_msg = (BT_HDR *)GKI_getbuf(sizeof(BT_HDR))) != NULL)
- {
- p_msg->event = BTA_JV_API_GET_LOCAL_DEVICE_ADDR_EVT;
- bta_sys_sendmsg(p_msg);
- ret = BTA_JV_SUCCESS;
- }
-
- return(ret);
-}
-
-/*******************************************************************************
-**
** Function BTA_JvGetLocalDeviceName
**
** Description This function obtains the name of the local device
extern void bta_jv_enable (tBTA_JV_MSG *p_data);
extern void bta_jv_disable (tBTA_JV_MSG *p_data);
extern void bta_jv_set_discoverability (tBTA_JV_MSG *p_data);
-extern void bta_jv_get_local_device_addr (tBTA_JV_MSG *p_data);
extern void bta_jv_get_local_device_name (tBTA_JV_MSG *p_data);
extern void bta_jv_get_remote_device_name (tBTA_JV_MSG *p_data);
extern void bta_jv_set_service_class (tBTA_JV_MSG *p_data);
bta_jv_enable, /* BTA_JV_API_ENABLE_EVT */
bta_jv_disable, /* BTA_JV_API_DISABLE_EVT */
bta_jv_set_discoverability, /* BTA_JV_API_SET_DISCOVERABILITY_EVT */
- bta_jv_get_local_device_addr, /* BTA_JV_API_GET_LOCAL_DEVICE_ADDR_EVT */
+ NULL, /* BTA_JV_API_GET_LOCAL_DEVICE_ADDR_EVT is obsolete */
bta_jv_get_local_device_name, /* BTA_JV_API_GET_LOCAL_DEVICE_NAME_EVT */
bta_jv_get_remote_device_name, /* BTA_JV_API_GET_REMOTE_DEVICE_NAME_EVT */
bta_jv_set_service_class, /* BTA_JV_API_SET_SERVICE_CLASS_EVT */
/**
* BTIF_Events
*/
-void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd);
+void btif_enable_bluetooth_evt(tBTA_STATUS status);
void btif_disable_bluetooth_evt(void);
void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props, bt_property_t *p_props);
void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t *remote_addr,
#include "btif_storage.h"
#include "btif_util.h"
#include "btu.h"
+#include "controller.h"
#include "fixed_queue.h"
#include "future.h"
#include "gki.h"
**
*******************************************************************************/
-void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd)
+void btif_enable_bluetooth_evt(tBTA_STATUS status)
{
- bt_bdaddr_t bd_addr;
+ const controller_t *controller = controller_get_interface();
bdstr_t bdstr;
+ bdaddr_to_string(controller->get_address(), bdstr, sizeof(bdstr));
- bdcpy(bd_addr.address, local_bd);
- BTIF_TRACE_DEBUG("%s: status %d, local bd [%s]", __FUNCTION__, status,
- bdaddr_to_string(&bd_addr, bdstr, sizeof(bdstr)));
+ BTIF_TRACE_DEBUG("%s: status %d, local bd [%s]", __FUNCTION__, status, bdstr);
- if (bdcmp(btif_local_bd_addr.address,local_bd))
+ if (bdcmp(btif_local_bd_addr.address, controller->get_address()->address))
{
- bdstr_t buf;
+ // TODO(zachoverflow): this whole code path seems like a bad time waiting to happen
+ // We open the vendor library using the old address.
+ bdstr_t old_address;
bt_property_t prop;
+ bdaddr_to_string(&btif_local_bd_addr, old_address, sizeof(old_address));
+
/**
* The Controller's BDADDR does not match to the BTIF's initial BDADDR!
- * This could be because the factory BDADDR was stored separatley in
+ * This could be because the factory BDADDR was stored separately in
* the Controller's non-volatile memory rather than in device's file
* system.
**/
BTIF_TRACE_WARNING("***********************************************");
- BTIF_TRACE_WARNING("BTIF init BDA was %02X:%02X:%02X:%02X:%02X:%02X",
- btif_local_bd_addr.address[0], btif_local_bd_addr.address[1],
- btif_local_bd_addr.address[2], btif_local_bd_addr.address[3],
- btif_local_bd_addr.address[4], btif_local_bd_addr.address[5]);
- BTIF_TRACE_WARNING("Controller BDA is %02X:%02X:%02X:%02X:%02X:%02X",
- local_bd[0], local_bd[1], local_bd[2],
- local_bd[3], local_bd[4], local_bd[5]);
+ BTIF_TRACE_WARNING("BTIF init BDA was %s", old_address);
+ BTIF_TRACE_WARNING("Controller BDA is %s", bdstr);
BTIF_TRACE_WARNING("***********************************************");
- bdcpy(btif_local_bd_addr.address, local_bd);
+ btif_local_bd_addr = *controller->get_address();
//save the bd address to config file
- bdaddr_to_string(&btif_local_bd_addr, buf, sizeof(buf));
- btif_config_set_str("Adapter", "Address", buf);
+ btif_config_set_str("Adapter", "Address", bdstr);
btif_config_save();
//fire HAL callback for property change
- memcpy(buf, &btif_local_bd_addr, sizeof(bt_bdaddr_t));
prop.type = BT_PROPERTY_BDADDR;
- prop.val = (void*)buf;
+ prop.val = (void*)&btif_local_bd_addr;
prop.len = sizeof(bt_bdaddr_t);
HAL_CBACK(bt_hal_cbacks, adapter_properties_cb, BT_STATUS_SUCCESS, 1, &prop);
}
btif_storage_load_autopair_device_list();
- btif_enable_bluetooth_evt(p_data->enable.status, p_data->enable.bd_addr);
+ btif_enable_bluetooth_evt(p_data->enable.status);
}
break;
#include "btm_api.h"
#include "bd.h"
#include "bdaddr.h"
+#include "controller.h"
#include "bta_api.h"
#include "bta_pan_api.h"
btpan_cb_t btpan_cb;
-BD_ADDR local_addr;
static int jni_initialized, stack_initialized;
static bt_status_t btpan_jni_init(const btpan_callbacks_t* callbacks);
static void btpan_jni_cleanup();
}
}
-static int tap_if_up(const char *devname, BD_ADDR addr)
+static int tap_if_up(const char *devname, const bt_bdaddr_t *addr)
{
struct ifreq ifr;
int sk, err;
close(sk);
return -1;
}
- /* debug("found mac address for interface:%s = %02x:%02x:%02x:%02x:%02x:%02x", devname, */
- /* ifr.ifr_hwaddr.sa_data[0], ifr.ifr_hwaddr.sa_data[1], ifr.ifr_hwaddr.sa_data[2], */
- /* ifr.ifr_hwaddr.sa_data[3], ifr.ifr_hwaddr.sa_data[4], ifr.ifr_hwaddr.sa_data[5]); */
+
strncpy(ifr.ifr_name, devname, IFNAMSIZ - 1);
- memcpy(ifr.ifr_hwaddr.sa_data, addr, 6);
- /* debug("setting bt address for interface:%s = %02x:%02x:%02x:%02x:%02x:%02x", devname, */
- /* ifr.ifr_hwaddr.sa_data[0], ifr.ifr_hwaddr.sa_data[1], ifr.ifr_hwaddr.sa_data[2], */
- /* ifr.ifr_hwaddr.sa_data[3], ifr.ifr_hwaddr.sa_data[4], ifr.ifr_hwaddr.sa_data[5]); */
+ memcpy(ifr.ifr_hwaddr.sa_data, addr->address, 6);
/* The IEEE has specified that the most significant bit of the most significant byte is used to
* determine a multicast address. If its a 1, that means multicast, 0 means unicast.
/* open the clone device */
- //system("insmod /system/lib/modules/tun.ko");
if( (fd = open(clonedev, O_RDWR)) < 0 ) {
BTIF_TRACE_DEBUG("could not open %s, err:%d", clonedev, errno);
strncpy(ifr.ifr_name, TAP_IF_NAME, IFNAMSIZ);
/* try to create the device */
- if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 )//|| tap_setup_ip(TAP_IF_NAME) == FALSE)
+ if( (err = ioctl(fd, TUNSETIFF, (void *) &ifr)) < 0 )
{
BTIF_TRACE_DEBUG("ioctl error:%d, errno:%s", err, strerror(errno));
close(fd);
return err;
}
- BTM_GetLocalDeviceAddr (local_addr);
- if(tap_if_up(TAP_IF_NAME, local_addr) == 0)
+ if(tap_if_up(TAP_IF_NAME, controller_get_interface()->get_address()) == 0)
{
int flags = fcntl(fd, F_GETFL, 0);
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
if(tap_fd != -1)
{
tETH_HDR eth_hdr;
- //if(is_empty_eth_addr(dst))
- // memcpy(ð_hdr.h_dest, local_addr, ETH_ADDR_LEN);
- //else
memcpy(ð_hdr.h_dest, dst, ETH_ADDR_LEN);
memcpy(ð_hdr.h_src, src, ETH_ADDR_LEN);
eth_hdr.h_proto = htons(proto);
memcpy(packet + sizeof(tETH_HDR), buf, len);
/* Send data to network interface */
- //btnet_send(btpan_cb.conn[i].sock.sock, &buffer, (len + sizeof(tETH_HDR)));
- //dump_bin("packet to network", packet, len + sizeof(tETH_HDR));
int ret = write(tap_fd, packet, len + sizeof(tETH_HDR));
BTIF_TRACE_DEBUG("ret:%d", ret);
return ret;
}
case BTA_PAN_OPEN_EVT:
{
- /* debug("BTA_PAN_OPEN_EVT, open status:%d, bd_addr = [%02X:%02X:%02X:%02X:%02X:%02X]", */
- /* p_data->open.status, */
- /* p_data->open.bd_addr[0], p_data->open.bd_addr[1], p_data->open.bd_addr[2], */
- /* p_data->open.bd_addr[3], p_data->open.bd_addr[4], p_data->open.bd_addr[5]); */
btpan_connection_state_t state;
bt_status_t status;
btpan_conn_t *conn = btpan_find_conn_handle(p_data->open.handle);
/* debug("BTA_PAN_OPEN_EVT handle:%d, conn:%p", p_data->open.handle, conn); */
/* debug("conn bta local_role:%d, bta remote role:%d", conn->local_role, conn->remote_role); */
int btpan_conn_local_role = bta_role_to_btpan(p_data->open.local_role);
- /* debug("bta local_role:%d, bta remote role:%d", p_data->open.local_role, p_data->open.peer_role); */
int btpan_remote_role = bta_role_to_btpan(p_data->open.peer_role);
callback.connection_state_cb(state, status, (const bt_bdaddr_t*)p_data->open.bd_addr,
btpan_conn_local_role, btpan_remote_role);
if(conn && conn->handle >= 0)
{
- /* debug("BTA_PAN_CLOSE_EVT, conn local_role:%d, remote_role:%d", conn->local_role, conn->remote_role); */
int btpan_conn_local_role = bta_role_to_btpan(conn->local_role);
int btpan_remote_role = bta_role_to_btpan(conn->remote_role);
callback.connection_state_cb(BTPAN_STATE_DISCONNECTED, 0, (const bt_bdaddr_t*)conn->peer,
return BNEP_SECURITY_FAIL;
bnep_cb.profile_registered = TRUE;
- BTM_GetLocalDeviceAddr (bnep_cb.my_bda);
return BNEP_SUCCESS;
}
#endif
}
-
-/*******************************************************************************
-**
-** Function BNEP_GetMyBdAddr
-**
-** Description This function returns a pointer to the local device BD address.
-** If the BD address has not been read yet, it returns NULL.
-**
-** Returns the BD address
-**
-*******************************************************************************/
-UINT8 *BNEP_GetMyBdAddr (void)
-{
- if (bnep_cb.got_my_bd_addr)
- return (bnep_cb.my_bda);
- else
- return (NULL);
-}
-
/*******************************************************************************
**
** Function BNEP_SetTraceLevel
TIMER_LIST_ENT bnep_tle;
BOOLEAN profile_registered; /* TRUE when we got our BD addr */
UINT8 trace_level;
- BOOLEAN got_my_bd_addr; /* TRUE when we got our BD addr */
- BD_ADDR my_bda; /* BD Address of this device */
} tBNEP_CB;
#include "bnep_int.h"
#include "bt_utils.h"
+#include "controller.h"
+
/********************************************************************************/
/* G L O B A L B N E P D A T A */
static void bnep_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg);
static void bnep_congestion_ind (UINT16 lcid, BOOLEAN is_congested);
-static void bnep_read_addr_cb (void *p_bda);
-
/*******************************************************************************
**
p_src_addr = (UINT8 *) p_bcb->rem_bda;
if (!p_dst_addr)
- p_dst_addr = (UINT8 *) bnep_cb.my_bda;
+ p_dst_addr = (UINT8 *) controller_get_interface()->get_address();
/* check whether there are any extensions to be forwarded */
if (ext_type)
if (!p_tle->param)
{
- if (!bnep_cb.got_my_bd_addr)
- {
- if (BTM_IsDeviceUp())
- BTM_ReadLocalDeviceAddr (bnep_read_addr_cb);
-
- btu_start_timer (&bnep_cb.bnep_tle, BTU_TTYPE_BNEP, 2);
- }
return;
}
if (bnep_cb.p_conn_state_cb)
(*bnep_cb.p_conn_state_cb) (p_bcb->handle, p_bcb->rem_bda, BNEP_SUCCESS, is_role_change);
}
-
-
-/*******************************************************************************
-**
-** Function bnep_read_addr_cb
-**
-** Description This function is called by BTM when the local BD address
-** is read. It saves the BD address, and flags it as read.
-**
-** Returns void
-**
-*******************************************************************************/
-static void bnep_read_addr_cb (void *p_bda)
-{
- UINT8 *bda = (UINT8 *)p_bda;
- if (p_bda &&
- (bda[0] | bda[1] | bda[2] | bda[3] | bda[4] | bda[5]) != 0)
- {
- /* Save my BD address */
- memcpy (bnep_cb.my_bda, p_bda, BD_ADDR_LEN);
-
- bnep_cb.got_my_bd_addr = TRUE;
- }
- else
- /* Retry after a couple seconds */
- btu_start_timer (&bnep_cb.bnep_tle, BTU_TTYPE_BNEP, 2);
-}
-
#include "btu.h"
#include "btm_int.h"
#include "bt_utils.h"
+#include "controller.h"
/********************************************************************************/
void bnepu_build_bnep_hdr (tBNEP_CONN *p_bcb, BT_HDR *p_buf, UINT16 protocol,
UINT8 *p_src_addr, UINT8 *p_dest_addr, BOOLEAN fw_ext_present)
{
+ const controller_t *controller = controller_get_interface();
UINT8 ext_bit, *p = (UINT8 *)NULL;
UINT8 type = BNEP_FRAME_COMPRESSED_ETHERNET;
ext_bit = fw_ext_present ? 0x80 : 0x00;
- if ((p_src_addr) && (memcmp (p_src_addr, bnep_cb.my_bda, BD_ADDR_LEN)))
+ if ((p_src_addr) && (memcmp (p_src_addr, &controller->get_address()->address, BD_ADDR_LEN)))
type = BNEP_FRAME_COMPRESSED_ETHERNET_SRC_ONLY;
if (memcmp (p_dest_addr, p_bcb->rem_bda, BD_ADDR_LEN))
type = (type == BNEP_FRAME_COMPRESSED_ETHERNET) ? BNEP_FRAME_COMPRESSED_ETHERNET_DEST_ONLY : BNEP_FRAME_GENERAL_ETHERNET;
if (!p_src_addr)
- p_src_addr = (UINT8 *)bnep_cb.my_bda;
+ p_src_addr = (UINT8 *)controller->get_address();
switch (type)
{
char buff[200];
tBNEP_CONN *p_bcb;
- BNEP_TRACE_DEBUG ("BNEP my BD Addr %x.%x.%x.%x.%x.%x",
- bnep_cb.my_bda[0], bnep_cb.my_bda[1], bnep_cb.my_bda[2],
- bnep_cb.my_bda[3], bnep_cb.my_bda[4], bnep_cb.my_bda[5]);
- BNEP_TRACE_DEBUG ("profile registered %d, trace %d, got_my_bd_addr %d",
- bnep_cb.profile_registered, bnep_cb.trace_level, bnep_cb.got_my_bd_addr);
+ BNEP_TRACE_DEBUG ("profile registered %d, trace %d", bnep_cb.profile_registered, bnep_cb.trace_level);
for (i = 0, p_bcb = bnep_cb.bcb; i < BNEP_MAX_CONNECTIONS; i++, p_bcb++)
{
#endif
{
p->conn_addr_type = BLE_ADDR_PUBLIC;
- BTM_GetLocalDeviceAddr(p->conn_addr);
+ memcpy(p->conn_addr, controller_get_interface()->get_address()->address, BD_ADDR_LEN);
}
}
#endif
}
}
-// TODO(zachoverflow):
-// These two functions do pretty much the same thing...just what is this I can't even whyyy
-/*******************************************************************************
-**
-** Function BTM_GetLocalDeviceAddr
-**
-** Description This function is called to read the local device address
-**
-** Returns void
-** the local device address is copied into bd_addr
-**
-*******************************************************************************/
-void BTM_GetLocalDeviceAddr (BD_ADDR bd_addr)
-{
- memcpy (bd_addr, controller_get_interface()->get_address(), BD_ADDR_LEN);
-}
-
-/*******************************************************************************
-**
-** Function BTM_ReadLocalDeviceAddr
-**
-** Description This function is called to read the local device address
-**
-** Returns status of the operation
-**
-*******************************************************************************/
-tBTM_STATUS BTM_ReadLocalDeviceAddr (tBTM_CMPL_CB *p_cb)
-{
- if(p_cb)
- (*p_cb)((void *)controller_get_interface()->get_address());
-
- return (BTM_SUCCESS);
-}
-
/*******************************************************************************
**
** Function BTM_SetDeviceClass
/*******************************************************************************
**
-** Function BNEP_GetMyBdAddr
-**
-** Description This function returns a pointer to the local device BD address.
-** If the BD address has not been read yet, it returns NULL.
-**
-** Returns the BD address
-**
-*******************************************************************************/
-extern UINT8 *BNEP_GetMyBdAddr (void);
-
-/*******************************************************************************
-**
** Function BNEP_SetTraceLevel
**
** Description This function sets the trace level for BNEP. If called with
/*******************************************************************************
**
-** Function BTM_ReadLocalDeviceAddr
-**
-** Description This function is called to read the local device address
-**
-** Returns BTM_SUCCESS
-** Callback returns the local device address
-**
-*******************************************************************************/
-extern tBTM_STATUS BTM_ReadLocalDeviceAddr (tBTM_CMPL_CB *p_cb);
-
-
-/*******************************************************************************
-**
-** Function BTM_GetLocalDeviceAddr
-**
-** Description This function is called to read the local device address
-**
-** Returns void
-** the local device address is copied into bd_addr
-**
-*******************************************************************************/
-extern void BTM_GetLocalDeviceAddr (BD_ADDR bd_addr);
-
-
-/*******************************************************************************
-**
** Function BTM_ReadDeviceClass
**
** Description This function is called to read the local device class
tPAN_MFILTER_IND_CB *pan_mfilt_ind_cb; /* multicast filter indication callback */
tPAN_TX_DATA_FLOW_CB *pan_tx_data_flow_cb;
- BD_ADDR my_bda; /* BD Address of this device */
char *user_service_name;
char *gn_service_name;
char *nap_service_name;
#include "l2c_api.h"
#include "l2c_int.h"
#include "smp_int.h"
+#include "controller.h"
#define SMP_PAIRING_REQ_SIZE 7
{
BT_HDR *p_buf = NULL ;
UINT8 *p;
- BD_ADDR static_addr;
UNUSED(cmd_code);
UNUSED(p_cb);
UINT8_TO_STREAM (p, SMP_OPCODE_ID_ADDR);
UINT8_TO_STREAM (p, 0); /* TODO: update with local address type */
- BTM_GetLocalDeviceAddr(static_addr);
- BDADDR_TO_STREAM (p, static_addr);
+ BDADDR_TO_STREAM (p, controller_get_interface()->get_address()->address);
p_buf->offset = L2CAP_MIN_OFFSET;
p_buf->len = SMP_ID_ADDR_SIZE;