{"action":"opened","issue":{"url":"https://api.github.com/repos/ARMmbed/ble/issues/135","labels_url":"https://api.github.com/repos/ARMmbed/ble/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/ble/issues/135/comments","events_url":"https://api.github.com/repos/ARMmbed/ble/issues/135/events","html_url":"https://github.com/ARMmbed/ble/issues/135","id":120431560,"number":135,"title":"Problems with BLE address handling","user":{"login":"andresag01","id":3746901,"avatar_url":"https://avatars.githubusercontent.com/u/3746901?v=3","gravatar_id":"","url":"https://api.github.com/users/andresag01","html_url":"https://github.com/andresag01","followers_url":"https://api.github.com/users/andresag01/followers","following_url":"https://api.github.com/users/andresag01/following{/other_user}","gists_url":"https://api.github.com/users/andresag01/gists{/gist_id}","starred_url":"https://api.github.com/users/andresag01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andresag01/subscriptions","organizations_url":"https://api.github.com/users/andresag01/orgs","repos_url":"https://api.github.com/users/andresag01/repos","events_url":"https://api.github.com/users/andresag01/events{/privacy}","received_events_url":"https://api.github.com/users/andresag01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-04T16:02:26Z","updated_at":"2015-12-04T16:02:26Z","closed_at":null,"body":"In BLE there are 4 types of addresses:\r\n\r\n* Public MAC address: \r\n* Random static\r\n* Random unresolvable\r\n* Random resolvable\r\n\r\nAccording to the BLE spec v4.2 in Vol 6, Part B Section 1.3:\r\n```\r\nIf a device is using Resolvable Private Addresses, it shall also have an Identity Address that is either a Public Device Address or Random Static Device Address type.\r\n```\r\nCurrently, the available APIs to handle addresses are [getAddress()](https://github.com/ARMmbed/ble/blob/develop/ble/Gap.h#L177) and [setAddress()](https://github.com/ARMmbed/ble/blob/develop/ble/Gap.h#L164) in Gap.h. But it is not clear from the documentation how can a user make sure that a call to setAddress() with `ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE` will not clear the previous Public or Random static address.\r\n\r\nThis feature is important for bonding because without the Public or Random static address in the BLE server the client has no way of identifying the bonded peripheral."}}