Commit graph

134 commits

Author SHA1 Message Date
Ayush Jain
e63e865777 Merge "uwb: Keep VTS timeout to be consistent with UWB stack" into main 2024-03-21 16:33:18 +00:00
Bhakthavatsala Raghavendra
2ad3630302 uwb: Keep VTS timeout to be consistent with UWB stack
Change-Id: I17367f955ced5ea3d109af06122678f8e6e8cda1
2024-03-16 19:58:31 -07:00
Henri Chataing
8954a83c93 Merge changes I422445af,I9c995127 into main
* changes:
  uwb/aidl/default: Use write_all instead of write in sendUciMessage
  uwb/aidl/default: Log incoming and outgoing packet bytes
2024-03-15 15:28:07 +00:00
Henri Chataing
cd3a3402b5 uwb/aidl/default: Use write_all instead of write in sendUciMessage
write_all ensures that the full buffer is being written.

Bug: 329316454
Test: TreeHugger
Change-Id: I422445aff32cdeba8fba9497a4296e6eda2e60ce
2024-03-15 15:26:17 +00:00
Henri Chataing
67b4c13cf7 uwb/aidl/default: Log incoming and outgoing packet bytes
Bug: 329316454
Test: TreeHugger
Change-Id: I9c9951273ed593a2090d199830a973f013b3da68
2024-03-15 15:26:17 +00:00
Charlie Boutier
4e2937b460 Merge "uwb_hal: handle data_packet parsing" into main 2024-03-14 18:35:35 +00:00
Charlie Boutier
bb2f43591e uwb_hal: handle data_packet parsing
Bug: 328680098
Test: atest CtsUwbMultiDeviceTestCase_FiraRangingTests -s 0.0.0.0:6520 -s 0.0.0.0:6521
Change-Id: I59eae757b3f4f838959360baa24d5a5b9775db54
2024-03-13 18:37:01 +00:00
Mathieu Mandret
6bab73f7ea Disable UWB before starting VtsHalUwbTargetTest
VtsHalUwbTargetTest opens/closes UWB HAL multiple times.
However UWB HAL only accepts 1 client at a time so if
UWB is enabled Android Framework will have UWB HAL open
and prevent any other client from opening it.

Matching NFC VTS behavior from VtsAidlHalNfcTargetTest.cpp, VtsHalUwbTargetTest now disables
UWB before running its tests.

Test: atest VtsHalUwbTargetTest
Bug: 328326697
Change-Id: I4dfff45015232bbd0a4445e42b13db3ff2d9e87c
2024-03-13 14:57:35 +01:00
Aditya Choudhary
ad2ba1b851 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
2024-02-05 15:45:22 +00:00
Jeff Vander Stoep
e8934d0991 Replace use of deprecated logging functions
This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.

with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.

See crate documentation [1] and code [2].

[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227

Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
Change-Id: I0ca9596433967be70e9d55acb6cfbf9322741bf8
2024-01-31 10:49:31 +01:00
Ayush Jain
a7000cfe15 [hal] Add support for CCC capability UWBS_MAX_PPM.
Define the capability tag.

Test: make com.android.uwb
Bug: 308660074
Change-Id: Iaa7c3e0292f3719cadae7c53d920f057c8dd7e68
2024-01-04 20:20:42 +00:00
ziyiw
965dd14687 Send DeviceResetCmd after task handle is dropped.
Previously the command was sent before the task handle is dropped. This
may cause race condition that the DeviceResetRsp may be consumed by the
reader created in open(). In this case, the
consume_device_reset_rsp_and_ntf will wait until timeout.

Bug: 316421259
Test: manual
Change-Id: I680d3ea79344f9b5f07a36877837bfc1b8e0532a
2023-12-19 21:19:24 +00:00
ziyiw
49aa335f8c [uwb-chip] Send DeviceResetCmd and poll rsp and ntf before hal is closed.
Bug: 315324807
Test: manual
Change-Id: I802551f77e031a32b04b49ab5d3134356dd1cd46
2023-12-14 04:23:08 +00:00
Andrew Walbran
116bf2a6b4 Fix for nix 0.27.1.
Bug: 314091492
Test: m rust
Change-Id: I4cc495c69d11a0b93cb7bcc74183c295ec60aa32
2023-12-05 16:18:09 +00:00
Jooyung Han
3d66ca3689 Cleanup: use shared apex_key
Bug: 296524155
Test: m
Change-Id: I353d4803d0e6bd16d4a5617ca7790d33ff589747
2023-10-10 13:46:47 +09:00
Xin Li
a737141254 Merge "Merge Android 14" into main 2023-10-06 05:34:12 +00:00
Henri Chataing
7e798080c8 UWB: Cleanup in default HAL
Resolve comments on I8ad8072fe01c8d1f466d8debf0ccf5831b3eddf8

Bug: 302005209
Test: m android.hardware.uwb-service
Change-Id: I1c4348fa7548441555c46cac88c2e5787d764f03
2023-10-06 00:11:08 +00:00
Bob Wang
625d52ae10 Merge "[UWB HAL] Use AsyncFd to read the buffer only when it's readable." into main am: 4e3c5aca14
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2766185

Change-Id: I4665614ebfe72260217be365be89e2c2597e58bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-03 17:45:25 +00:00
ziyiw
4fec12a6f0 [UWB HAL] Use AsyncFd to read the buffer only when it's readable.
This CL fixes the issue that some bytes are missing after we toggle uwb
off and on.

Test: atest CtsUwbTestCases
Bug: 302005209

Change-Id: I8ad8072fe01c8d1f466d8debf0ccf5831b3eddf8
2023-10-03 00:58:04 +00:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Jooyung Han
83497068b9 Move uwb-service into VAPEX
Bug: 296487624
Test: launch cuttlefish / uwb-service runs
Change-Id: I5436d9215ad396fe6cd151690d299dd345c56cb0
2023-08-21 15:12:07 +09:00
Jooyung Han
3e0519690f Move uwb-service.rc
Previously, .rc file is installed separately. Now it's installed as part
of the uwb-service binary installation.

Bug: 296487624
Test: launch cuttlefish / uwb-service runs with /dev/hvc9
Change-Id: I49108c74a5ca964818c90407cc7916d80439d5ab
2023-08-21 12:57:20 +09:00
Henri Chataing
77971b371b uwb: Rewrite implementation of sendUciMessage to use the opened File
The current implementation used fs::write() as workaround since
the write permission was missing from the fs::open() invocation

Test: m android.hardware.uwb-service
Change-Id: Ifdb460843fcb9525ad498f928b1dc2ed9beb5410
2023-08-16 17:10:20 +00:00
Shreshta Manu
595041e6fb [uwb-interfaces] Add support for prioritized channel list
Test: compiles
Bug: 293959095
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cef396ca26136d812405e78009e7a1374ca89e5c)
Merged-In: I18da378128b96b73ae457045354d22a4add988d0
Change-Id: I18da378128b96b73ae457045354d22a4add988d0
2023-08-08 20:08:45 +00:00
Jin Chen
1b1aa3bb9a [uwb](hal) Add radar data packet format
* Update based on Android UWB radar UCI spec v1.1 (go/uwb-radar-uci).

Test: Compile
Bug: 237097302
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:86974637e8e2a447a527ac828bf27958c008b339)
Merged-In: I8e8de979ea2f69396b049c2107cba16e71793cb0
Change-Id: I8e8de979ea2f69396b049c2107cba16e71793cb0
2023-07-13 18:09:02 +00:00
Jin Chen
cb3c1de918 [uwb](hal) Add radar support
* Adding radar session type, capabilities, oids, and app configs based
  on the Android UWB radar UCI spec v1.0.

Test: Compile
Bug: 237097302
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:db326d178686dd981dbb81804534b51502392ae2)
Merged-In: Ia0b901859b38127db8532118f2427338fdf502a8
Change-Id: Ia0b901859b38127db8532118f2427338fdf502a8
2023-06-28 21:11:53 +00:00
Charlie Boutier
032c7153b2 Merge "Uwb Hal: use fs::write instead of File::write" am: 995445a080 am: ccd01a2756 am: 9329fd19e0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2575093

Change-Id: I816a308e2c120f63441f96a8b743f91812713ac5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 21:47:11 +00:00
Charlie Boutier
3561c84d77 Uwb Hal: use fs::write instead of File::write
Test: launch_cvd -enable_host_uwb
Change-Id: I1f9038f585ca79c33b8168db69da0e71fa414c6d
2023-05-02 00:06:28 +00:00
Charlie Boutier
25d2f7f4ff Merge "Revert "Revert "uwb(hal): Implement UCI over serial in the defau..."" am: 29567e796b am: 57cccf0cd7 am: 33fc82390c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2530005

Change-Id: If6bce69d107ce972ba6d96a8af626d2d6ac20f77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-18 00:07:08 +00:00
Charlie Boutier
29567e796b Merge "Revert "Revert "uwb(hal): Implement UCI over serial in the defau..."" 2023-04-17 23:22:04 +00:00
Charlie Boutier
d572dd0bc7 Revert "Revert "uwb(hal): Implement UCI over serial in the defau..."
Revert submission 2528605-revert-2215484-pica_cf-BZDQSZLKEP

Reason for revert: revert^2

Reverted changes: /q/submissionid:2528605-revert-2215484-pica_cf-BZDQSZLKEP

Change-Id: I0c64b449c5da236a7cd63f88a605d48b9c471c67
2023-04-10 18:14:23 +00:00
Sam Wu
62531b1267 Merge "Revert "uwb(hal): Implement UCI over serial in the default HAL"" am: 9f8fac2faa am: d567cecdbb am: 57f9808c23
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2528604

Change-Id: I0603d78b7565d868c4044e219abcc401d9df4f77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-08 01:25:05 +00:00
Sam Wu
9f8fac2faa Merge "Revert "uwb(hal): Implement UCI over serial in the default HAL"" 2023-04-07 23:45:06 +00:00
Sam Wu
63bcd88052 Revert "uwb(hal): Implement UCI over serial in the default HAL"
Revert submission 2215484-pica_cf

Reason for revert: DroidMonitor: Potential culprit for Bug X - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:2215484-pica_cf

Change-Id: Ifd9f5cf04631e19a33b29b4b2917eaab2b506e23
2023-04-07 18:35:20 +00:00
Charlie Boutier
9eb209dce8 Merge "uwb(hal): Implement UCI over serial in the default HAL" am: 77ee578477 am: d0e586d474 am: 20abb491c8
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2215484

Change-Id: Ia894b0a5598abb18fb3a02e6d8f17f78dde011bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-06 17:29:27 +00:00
Charlie Boutier
77ee578477 Merge "uwb(hal): Implement UCI over serial in the default HAL" 2023-04-06 16:09:27 +00:00
ziyiw
46b5ac8692 Add min uwb initiation time as new vendor capability.
Test: manual
Bug: 245854896
Merged-In: I640b54356d4a7dc338d995596147aa6716278b54
Change-Id: I12436cad527255d8f88e9ca34409aee0a59b3c92
2023-04-04 20:06:49 +00:00
ziyiw
090e46a17f [automerge] Add min uwb initiation time as new vendor capability. 2p: 2f83e56e61
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/22399100

Bug: 245854896
Change-Id: I8507e1257fe809ad0db8c184c1638cfa4396f66c
2023-04-03 20:34:07 +00:00
ziyiw
2f83e56e61 Add min uwb initiation time as new vendor capability.
Test: manual
Bug: 245854896
Change-Id: I640b54356d4a7dc338d995596147aa6716278b54
2023-04-03 20:31:44 +00:00
David Duarte
e432bdd45b uwb(hal): Implement UCI over serial in the default HAL
Bug: 229824143
Test: manual with cuttlefish
Change-Id: Ia29e618b8c9b53f295f66ff0b94965d4f571f8e4
2023-04-03 17:32:44 +00:00
Roshan Pius
cca5eefb32 uwb[aidl]: Added LAST_STS_INDEX_USED config into CCC open ranging params
Add LAST_STS_INDEX_USED to CCC ranging

Bug: 268762844
Test: test CCC
Merged-In: I56514e7d7d0c927e6bf8e257547f7baeadd3770c
Change-Id: I56514e7d7d0c927e6bf8e257547f7baeadd3770c
2023-03-28 11:52:18 -07:00
Roshan Pius
fff90a26ae [automerge] uwb[aidl]: Added LAST_STS_INDEX_USED config into CCC open ranging params 2p: 9bd47ef77c
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/22292494

Bug: 268762844
Change-Id: I5cc5234025cfd386e122825eb5cc081df98d3dd0
2023-03-27 16:41:27 +00:00
Roshan Pius
9bd47ef77c uwb[aidl]: Added LAST_STS_INDEX_USED config into CCC open ranging params
Add LAST_STS_INDEX_USED to CCC ranging

Bug: 268762844
Test: test CCC
Change-Id: I56514e7d7d0c927e6bf8e257547f7baeadd3770c
2023-03-27 09:40:12 -07:00
ziyiw
617c2baaaa Add new reason code and status code for session conflict.
Also assigned a new number to the UWB regulation off status/reason code.

Test: compile
Bug: 272361935
Merged-In: I4cbf2443d7e3ec914ee465d9128fef5225a74712
Change-Id: Ib219ea213be050944a0bbd601f79ccbbba18f299
2023-03-14 19:58:03 +00:00
ziyiw
1c2d1bda32 [automerge] Add new reason code and status code for session conflict. 2p: fbe75bbcf1
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/21996393

Bug: 272361935
Change-Id: If679383a5b702334dc490e25c53755458947a158
2023-03-14 00:20:21 +00:00
ziyiw
fbe75bbcf1 Add new reason code and status code for session conflict.
Also assigned a new number to the UWB regulation off status/reason code.

Test: compile
Bug: 272361935
Change-Id: I4cbf2443d7e3ec914ee465d9128fef5225a74712
2023-03-14 00:17:23 +00:00
Ayush Jain
471879fcfe Merge "Add a Vendor-dependent UCI Reason code for UWB OFF" into tm-mainline-prod 2023-03-03 22:41:43 +00:00
Ayush Jain
93752a76ff Merge changes from topic "presubmit-am-de536539e6c7464a871423c40221150c" into udc-dev
* changes:
  [automerge] Add a Vendor-dependent UCI Reason code for UWB OFF 2p: ff9268b13b
  Add a Vendor-dependent UCI Reason code for UWB OFF
2023-03-03 22:41:43 +00:00
Presubmit Automerger Backend
5c7f972d00 [automerge] Add a Vendor-dependent UCI Reason code for UWB OFF 2p: ff9268b13b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/21683422

Bug: 267554906
Change-Id: Iaac1b79eb02ecc621b7423650abb2ef1e0bb9d2a
2023-03-01 23:02:13 +00:00
Ayush Jain
ff9268b13b Add a Vendor-dependent UCI Reason code for UWB OFF
Add a UCI reason code (sent in a SESSION_STATUS_NTF) for the scenario when UWB needs to be turned off due to Regulatory reasons.

Ran the "m android.hardware.uwb.fira_android-update-api" command to
update the generated AIDL API.

Bug: 267554906
Test: Compile make.com.google.android.uwb
Change-Id: I52d9f2dae203c3e2d3d26a8a5c30a2f2a969b591
2023-03-01 23:00:44 +00:00