use bd_addr_to_string to fix address output

This commit is contained in:
matthias.ringwald@gmail.com 2014-01-25 08:00:37 +00:00
parent c8b84afc4f
commit 4e4ed2b0fc

View File

@ -790,9 +790,7 @@ static void sm_run(void){
return; return;
} }
case RAU_SET_ADDRESS: case RAU_SET_ADDRESS:
printf("New random address: "); printf("New random address: %s\n", bd_addr_to_str(sm_random_address));
print_bd_addr(sm_random_address);
printf("\n");
hci_send_cmd(&hci_le_set_random_address, sm_random_address); hci_send_cmd(&hci_le_set_random_address, sm_random_address);
rau_state = RAU_IDLE; rau_state = RAU_IDLE;
return; return;
@ -808,9 +806,7 @@ static void sm_run(void){
bd_addr_t addr; bd_addr_t addr;
sm_key_t irk; sm_key_t irk;
central_device_db_info(sm_central_device_test, &addr_type, addr, irk); central_device_db_info(sm_central_device_test, &addr_type, addr, irk);
printf("device type %u, addr: ", addr_type); printf("device type %u, addr: %s\n", addr_type, bd_addr_to_str(addr));
print_bd_addr(addr);
printf("\n");
if (sm_m_addr_type == addr_type && memcmp(addr, sm_m_address, 6) == 0){ if (sm_m_addr_type == addr_type && memcmp(addr, sm_m_address, 6) == 0){
printf("Central Device Lookup: found CSRK by { addr_type, address} \n"); printf("Central Device Lookup: found CSRK by { addr_type, address} \n");
@ -1284,8 +1280,7 @@ static void sm_event_packet_handler (void * connection, uint8_t packet_type, uin
sm_reset_tk(); sm_reset_tk();
hci_le_advertisement_address(&sm_s_addr_type, &sm_s_address); hci_le_advertisement_address(&sm_s_addr_type, &sm_s_address);
printf("Incoming connection, own address "); printf("Incoming connection, own address %s\n", bd_addr_to_str(sm_s_address));
print_bd_addr(sm_s_address);
// reset security properties // reset security properties
sm_connection_encrypted = 0; sm_connection_encrypted = 0;