diff --git a/adapter_hci.go b/adapter_hci.go index 952ca8c2..afa09a27 100644 --- a/adapter_hci.go +++ b/adapter_hci.go @@ -45,7 +45,7 @@ func (a *hciAdapter) Address() (MACAddress, error) { return MACAddress{}, err } - return MACAddress{MAC: makeAddress(a.hci.address)}, nil + return a.hci.address, nil } func (a *Adapter) SetRandomAddress(mac MAC) error { diff --git a/hci.go b/hci.go index eea27fb7..7de2e785 100644 --- a/hci.go +++ b/hci.go @@ -129,7 +129,7 @@ type hci struct { att *att l2cap *l2cap buf []byte - address [6]byte + address MACAddress cmdCompleteOpcode uint16 cmdCompleteStatus uint8 cmdResponse []byte @@ -256,7 +256,7 @@ func (h *hci) readBdAddr() error { return err } - copy(h.address[:], h.cmdResponse[:7]) + copy(h.address.MAC[:], h.cmdResponse[:7]) return nil }