Skip to content
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

UWB sample ranging not working #284

Open
jeorgearomal opened this issue Jan 19, 2023 · 17 comments
Open

UWB sample ranging not working #284

jeorgearomal opened this issue Jan 19, 2023 · 17 comments

Comments

@jeorgearomal
Copy link

The callback EndpointEvents.PositionUpdated -> endpointPositions[result.endpoint] = result.position is not received during connection. Also we are able to see the devices in the UI, but those are displayed in disconnectedEndpoints of the HomeScreen

Devices : two Samsung Galaxy Note20 Ultra 5G

Attached the demo, where expected is the identified device should be plotted in the graph. This does not happen since connectedEndpoints is empty

usb_ranging.mov
@nrichardson12
Copy link

I've had this issue as well on the Galaxy Note 20 Ultra. This issue also occurs on the Galaxy S22 Ultra. Also, the app does not seem to check if the user has UWB turned on in settings (Connections). However, turning on UWB does not fix this issue. Any help would be appreciated!

@mg120137
Copy link

This issue also occurs on two Pixel 7 pro.
I wonder if you could help me.

@pozayo
Copy link

pozayo commented Feb 1, 2023

UWB has not worked since January. Is there any issue of updating gms?

Other than this project, projects that I built separately do not work after any point in time.

uwbClient.startRanging(parametersBuilder.build(), callback).await()
The following error occurs after calling the above function.
(This error is the same for any UWB project.)

Caught a RuntimeException from the binder stub implementation. aacw: Expected size 4 got 12 (0xc) Parcel: pos=228 size=388 at aacx.O(:com.google.android.gms@[email protected] (190400-503260631):2) at aacx.f(:com.google.android.gms@[email protected] (190400-503260631):0) at bfax.createFromParcel(:com.google.android.gms@[email protected] (190400-503260631):10) at aacx.m(:com.google.android.gms@[email protected] (190400-503260631):2) at bfbb.createFromParcel(:com.google.android.gms@[email protected] (190400-503260631):6) at glv.a(:com.google.android.gms@[email protected] (190400-503260631):2) at bezi.eo(:com.google.android.gms@[email protected] (190400-503260631):5) at glu.onTransact(:com.google.android.gms@[email protected] (190400-503260631):5) at android.os.Binder.transact(Binder.java:1200) at amac.onTransact(:com.google.android.gms@[email protected] (190400-503260631):17) at android.os.Binder.execTransactInternal(Binder.java:1321) at android.os.Binder.execTransact(Binder.java:1280)

@zidaliu
Copy link

zidaliu commented Feb 14, 2023

I try the example code following the example code (https://developer.android.com/guide/topics/connectivity/uwb), however, the clientSession.prepareSession() returns an empty flow, is there anyone who successfully run the demo?

@chinesco
Copy link
Contributor

Could you please let us know if this is still an issue, specially interested to see if it still happens with the two Samsung devices. If the issue is still present, could you please file a bug including a bug report here:
https://issuetracker.google.com/issues/new?component=1185313&template=1680952
Thanks

@sonic74
Copy link

sonic74 commented Feb 22, 2023

Is this supposed to work with the Samsung Galaxy SmartTag+ EI-T7300 ?

@chinesco
Copy link
Contributor

@sonic74 no, this sample is intended to demonstrate ranging between two Android phones.

@vinstray
Copy link

Hi, testing the sample I observe that ranging measurements stops after some seconds of acquisition (usually around 40 seconds). There is a reason for this behaviour? Thanks

@Sn0wfreezeDev
Copy link

Also on my Google Pixel 6 Pro the app suddenly stopped working.

@HussainATS
Copy link

Hi, can somebody provide me sample app or guidance on how to create UWB ranging app to find distance of a IOT device? Also can I use my Samsung Galaxy S21+ phone for this activity?

@hzhou3
Copy link

hzhou3 commented Jul 1, 2023

Hi, I am still not able to run the sample code on Samsung S21+ and Pixel 7 Pro. It seems the NearbyConnection is not working (I cannot see the information listed on the ranging screen as the video showed, e.g., "UWB1"). Any advice is appreciated, thanks!

@codetang-2417
Copy link

UWB has not worked since January. Is there any issue of updating gms?

Other than this project, projects that I built separately do not work after any point in time.

uwbClient.startRanging(parametersBuilder.build(), callback).await() The following error occurs after calling the above function. (This error is the same for any UWB project.)

Caught a RuntimeException from the binder stub implementation. aacw: Expected size 4 got 12 (0xc) Parcel: pos=228 size=388 at aacx.O(:com.google.android.gms@[email protected] (190400-503260631):2) at aacx.f(:com.google.android.gms@[email protected] (190400-503260631):0) at bfax.createFromParcel(:com.google.android.gms@[email protected] (190400-503260631):10) at aacx.m(:com.google.android.gms@[email protected] (190400-503260631):2) at bfbb.createFromParcel(:com.google.android.gms@[email protected] (190400-503260631):6) at glv.a(:com.google.android.gms@[email protected] (190400-503260631):2) at bezi.eo(:com.google.android.gms@[email protected] (190400-503260631):5) at glu.onTransact(:com.google.android.gms@[email protected] (190400-503260631):5) at android.os.Binder.transact(Binder.java:1200) at amac.onTransact(:com.google.android.gms@[email protected] (190400-503260631):17) at android.os.Binder.execTransactInternal(Binder.java:1321) at android.os.Binder.execTransact(Binder.java:1280)

When I use the Samsung S21+, there will be an error when the Google service version of this phone is an old version. I have updated it to the latest version and it can be used normally

@hzhou3
Copy link

hzhou3 commented Jul 13, 2023

Hi, thanks for replying! I also noticed it and have updated google play services. However, the graph is still not showing anything... Did you change any of the sample code? If so, do you mind sharing the code? Thanks in advance!

@hzhou3
Copy link

hzhou3 commented Jul 13, 2023

I am get this error from system logs:
NearbyMediums com.google.android.gms.persistent E MEDIUM_ERROR [NETWORK][BLUETOOTH][RECEIVE_PAYLOAD][RECEIVE_PAYLOAD_FAILED][UNKNOWN], Service ID : com.google.apps.hellouwb [CONTEXT service_id=54 ]

Does it mean the gms version is still not good?

I also see something like
com.google.android.gms.common.api.ApiException: 8034: MISSING_PERMISSION_ACCESS_COARSE_LOCATION
But in the manifest file, there are permissions given... Any advice is appreciated. Thanks

@Sn0wfreezeDev
Copy link

I manage to at maximum one measurement between two smartphones, then it stops working. However, a friend recently got the UWB Car Key and this seems to work without any issues on his Pixel.

@hzhou3
Copy link

hzhou3 commented Jul 18, 2023

Hi @ Sn0wfreezeDev, can you share how you managed to get one measurement? What are the phones you use? I wonder when it stops working if you see the same message (i.e., medium error) or different errors. Thank you!

@codetang-2417
Copy link

Due to the need to use S21+and embedded devices for ranging, I made significant changes to the source code. But I haven't made any changes to the core functions of UWB, so you can confirm if the GMS service of both phones is the latest version, and both devices have UWB function enabled in their settings. But I work for the company and the source code is not yet publicly available, so I'm sorry.

You can debug the source code in Android Studio, and view the debug log through the logcat function. If there is a problem in the create uwb client part, the debug log will tell you, but it may not be red, and may tell you in the form of a warning. This is usually caused by the driver bug of S21+. You need to turn on Airplane mode, restart UWB, or reboot the phone, and then check that Bluetooth, Nearby, uwb and other functions are all turned on, and enable the positioning function (may be required). Good luck to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests