- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello...
i have two log files which are collected from the trace debug (please check below screen shot)
- with 13:24:41 (timed) is paring peripheral to COMPUTER.
- with 14:26:02 (timed) is paring peripheral to SMART PHONE.
this is the code i am using:
please correct me if i am wrong- after "Load Dev Info:" line - it is Bluetooth MAC address is displayed in both log files.
my question is
- where this MAC address (Load Dev Info) are collected? - i am sure its before the connection_up function since i am tracing it by giving "----------->0".
- from the COMPUTER log, the address "ea7c3b239468" and i am printing the same by considering bda[0] which is 'ea' . and in connection_up: it is giving same values but reverse order.
- from the SMART PHONE log, the address "0effaf792e4d" and i am printing the same by considering bda[0] which is different now that is '00' and as same as that of connection_up: 020100200400. why is this happening here?
- where the MAC address of CLIENT (computer / Smart Phone) are stored?
please explain us how this is happening, why its changing its values when connected to smart phone (in bda[]) and is always shows the same address when connected to other phone too and even how it is connecting (connection occurrence)?
thanks in advance
Regards
Sid
Solved! Go to Solution.
- Labels:
-
MasterSlave
-
Windows
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I looked into this and this is because the addresses from the phone uses RPA ( random public address ).
emconninfo_getPeerPubAddr gives different result depending on the type of the address.
In your first example, the computer probably had the same address because the type of the address is not random address.
You can check the type of the address type using emconninfo_getPeerAddrType().
Regular Public Address is 0
Random Public Address is 1
When you call emconninfo_getPeerPubAddr(), if your address type is
0: you will just the address.
1: you will get non rpa address by using IRK (identity resolving key) info.
This key is generated by the host and is exchanged between the master and the slave when pairing.
However to be honest, I don't know how exactly they get 020100200400.
All I know is that it uses IRK info to give you that number.
If you want the RPA, you can simly call emconninfo_getPeerAdd().
Does this help with your problem?
James