-
Notifications
You must be signed in to change notification settings - Fork 12
device reset #102
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
device reset #102
Conversation
7800940 to
aa2b0d6
Compare
tests/helper.py
Outdated
|
|
||
|
|
||
| async def init(host: Host): | ||
| await host.expect_control(uci.CoreDeviceResetRsp(status=uci.Status.OK)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please test with AOSP to make sure that the HAL is behaving as expected ?
Receiving the notification on init seems fine, but receiving a response for a command that was never sent looks dangerous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with aosp and uwb cts tests and looks it works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the response is ignored ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. This rsp is sent back before the hal opened, so no callback will be called.
https://cs.android.com/android/platform/superproject/main/+/main:hardware/interfaces/uwb/aidl/default/src/uwb_chip.rs;l=101?q=uwb_chip.rs&ss=android%2Fplatform%2Fsuperproject%2Fmain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still can you please check if it is possible to avoid sending that response ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems set is_reset to true when adding the device resolve the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that is just removing the logic for checking for device reset...
I feel that the more appropriate approach should be the modify the HAL to emit the Device Reset command on startup instead..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if we send the Device Reset command on startup on the HAL side, it will receive the response when the hal is open, which is not what we wanted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the HCI HAL implementation I am intercepting the response before it is sent to host:
https://cs.android.com/android/platform/superproject/main/+/main:device/google/cuttlefish/guest/hals/bluetooth/src/hci.rs
Uh oh!
There was an error while loading. Please reload this page.