-
Notifications
You must be signed in to change notification settings - Fork 5
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
No ranging result from both phones #3
Comments
Interesting, I tested it on Pixel 6 Pro, Pixel 7 Pro and a Galaxy Note 20(?) Pro, and they all seemed to work rather well, although P6P has no elevation angles. Did you try the latest push? |
The Exception would be interesting. If its some "session key is needed" then this is fixed, if its "library not up do date with backend" then some rebuild would do the trick. There is also a good probability the phones need to be restarted at times, since the connection cleanup isnt always 100% working. |
After upgrade and restart, it can work now. Interestingly, now it can work with uwb:1.0.0-alpha08 but the official uwbRanging program still doesn't work. However, the program is not very stable, it hangs and needs restart quite frequently. |
You could try to put a
I know it isn't the most stable, and the Kotlin impl is probably better, but it is meant as a somewhat working demo, in the sense of hey, how good does this uwb thing in phones work . I could probably look at the cleanup of the coroutine stuff, but as a techdemo it does its thing well enough I think. Also it is alpha software. You are lucky your phones don't get a kernel panic anymore from starting an uwbsession. I had to enrol a phone to the Android 14 beta since the UWB chip at some point died and not even resets were helping. |
I couldn't find sessionKey in the uwbRanging source code, I only see sessionKeyInfo but it is random, not null. Even I use zero array, it still quit after getting connection, while running the channelFlow. I know Alpha08 is still not perfect, but I wonder why your latest code can solve my quiting problem with Alpha08. I know it is not fair for you to troubleshoot the code from somebody else. Anyway, thanks for your help. Oriiginal code: |
I have opened an issue to Android, not sure whether it will be taken care of. android/connectivity-samples#308 (comment) |
Since uwb:1.0.0-alpha06, RangingParameters was updated but the UwbRanging example code is still expecting old parameter set, that is why it has error. Your code makes it work for uwb:1.0.0-alpha08, thanks. |
❤️ |
I tried this code on Pixel 7 Pro and Galaxy S24 Plus. One set to Controller and one to Controlee and entered address and preamble index as required. After I clicked COMMUNICATE button, no distance showed up. I tried to update the uwb:1.0.0-alpha07 to uwb:1.0.0-alpha08 but the program quits after the connection, this behavior is the same as the official uwbRanging demo program from Android Developer. I guess it is something to do the difference between Pixel and Galaxy. For Pixel, Distance, Azimuth and Elevation are all true but for Galaxy, only Distance is true, the other two are false. Can you take a look to see what is the real root cause?
The text was updated successfully, but these errors were encountered: