-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiFi-NAN devices show up multiple times #44
Comments
Hmmm.... Yes. That is probably the case. The Android API for NaN does not provide a MAC address to indicate which transmitter a given "ping" was received from. It does give some small hash value (I suspect the range of that is just a byte?) which is different for each transmitter and stays consistent (at least for a while): https://developer.android.com/reference/android/net/wifi/aware/PeerHandle#hashCode() The only NaN transmitter I have done any testing with, is the ESP32 implementation. It is quite possible that different transmitter implementations behave different and cause a (frequent?) change of this hash code. For the ESP32 transmitter, I have not done any long term testing to see if this happens. BTW: You can see the value of the hash code in the detailed Info view for each device in the list. It is in the MAC field. If the transmitter is following the standard, for NaN, it is mandated that message packs are used, so each ping should always contain the basic ID message. In theory, that would at least allow the app to detect that the hash code has changed but it is still the same transmitter that it is receiving from. |
I see this both with the EPS32 implementation (from https://github.com/sxjack/uav_electronic_ids) and with other devices. In both cases the ID changes within a couple of seconds.
Yes, the 'hash' simply seems to be a consecutive number. I see values like:
Sounds reasonable. Without that, I guess it's basically impossible to get a longer 'track' from a NAN device (you would just see a series of single spots, each as a separate transmitter device). |
Unfortunately I won't be able to dive into the details of this any time soon. Getting all the SW components updated with the few changes from the final ASTM v1.1 specification will have to be done before anything else (as soon as I can find a spare moment for even getting that done). |
Alright, no hurry here. I only wanted to raise the issue, since it had just occurred to me ... |
While BT and WiFi-Beacon devices only show up once in the list of devices (they have a fixed MAC), WiFi-Beacon devices show up multiple times (apparently because the NAN Id is changing frequently).
One would need to deduplicate this via the ID info provided by the device in the DRI packets, I guess?
The text was updated successfully, but these errors were encountered: