summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/rtt
Commit message (Collapse)AuthorAgeFilesLines
* [WifiRtt] add check to verify bw and preamble combination validNate(Qiang) Jiang2019-11-081-0/+24
| | | | | | | | | | | | check the combination before send the request to the FW Bug: 142147874 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: I98961412cc582ca7b2f1e596017ddc8cd3fee7ab Merged-In: I98961412cc582ca7b2f1e596017ddc8cd3fee7ab (cherry picked from commit 27544a5140b9b33f9c77690d524dea21235744f3)
* [RTT] Update timeout for Aware-based RTTEtan Cohen2019-03-192-27/+54
| | | | | | | | | | | | | The Aware RTT may take longer to execute that an RTT measurement to an AP. This is due to the duty cycle which Aware has to negotiate, especially when the device is in screen off mode. Double the timeout to any ranging operation which includes any Aware ranging requests. Bug: 123001236 Test: atest android.server.wifi Change-Id: I4dcc905f530fd6ed2d9deac3282bfa84026b8104
* RTT LCI API (Service Side)Roy Want2019-02-013-13/+16
| | | | | | Bug: 111439464 Test: All unit tests pass Change-Id: I9cd0659e3ec8ce1807e03b657ce206f3e10b8201
* [WIFI][LOCATION] Convert API from Coarse -> Fine for >= QEtan Cohen2019-01-231-2/+2
| | | | | | | | | | | Convert all Wi-Fi permissions from Coarse -> Fine for: - Wi-Fi Direct (p2p) always (since new permissions for Q) - Else (Wi-Fi, Aware): target SDK >= Q Bug: 122374563 Test: atest android.net.wifi Test: atest com.android.server.wifi Change-Id: Ie56633ec520ec581c0528f363cd80e82ed9b102b
* WifiPermissionsUtil: Check location mode for current fg userRoshan Pius2019-01-081-8/+3
| | | | | | | | | | a) Use the WifiPermissionsUtil.isLocationModeEnabled() for all location mode checks in the wifi stack. b) Check the current fg user's location mode instead of the system user (0). Bug: 121336053 Test: ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I9c20b5f5f0c11abbf6e6bba2bbfd5ff4dd6df22c
* Take 2 of Migrate frameworks/opt/net/wifi to androidx.testBrett Chabot2018-12-193-3/+6
| | | | | | | | See go/jetpack-test-android-migration Test: atest FrameworksWifiTests Bug: None Change-Id: I76a3394fe1e4f5b268ed2716291b33d1db8f9f85
* Revert "Migrate frameworks/opt/net/wifi to androidx.test"Brett Chabot2018-12-193-6/+3
| | | | | | | | | This reverts commit 560ff95760cd1fc1da022e0972a5e29b739fcc52. Reason for revert: Broke master Exempt-From-Owner-Approval: build fix, pure revert Change-Id: I9f155cff6a712a6831be6af6b4dc671a35cd2ee1
* Migrate frameworks/opt/net/wifi to androidx.testBrett Chabot2018-12-143-3/+6
| | | | | | | | See go/jetpack-test-android-migration Test: make checkbuild Bug: None Change-Id: I68f37d8eaf20b82a4e26ef7914e13460495e9762
* [RTT] Handle HAL concurrencly limitations on RTT availabilityEtan Cohen2018-10-051-5/+31
| | | | | | | | | | | | | | | | | | | | The chip may not support RTT in all modes. The change handles this correctly: whenever the HAL cannot support RTT (e.g. for multi-mode chips + switching to AP mode only) the framework will be notified and can dispatch RTT availability notification to app (both when becoming non-available and then when becoming available again). This notification on exact status also fixes the following: - Initialization is precise: i.e. won't try to execute RTT commands on an as yet uninitialized chip - Can revert an early "hack" which re-tried creating a new RTT controller if the previous one simply stopped working Bug: 79565105 Bug: 111218083 Test: unit tests (new ones) Test: ACTS RangeApSupporting11McTest:test_rtt_in_and_after_softap_mode Change-Id: Ib9ef75bb679cdb0f49384260112c06684f52c693
* Revert "[RTT] Recreate RTT controller when HAL indicates it is invalid"Etan Cohen2018-10-051-83/+1
| | | | | | | | | | This reverts commit 0ebd13f268eaca16e396089983475674620632f3. Bug: 79565105 Bug: 111218083 Test: unit tests (new ones) Test: ACTS RangeApSupporting11McTest:test_rtt_in_and_after_softap_mode Change-Id: I3ba144af7a63b9781599e90eb2c1f45596d911bb
* Add missing SmallTest annotations in opt/net/wifiMichael Plass2018-07-303-0/+6
| | | | | | Bug: 73290083 Test: Unit tests Change-Id: Id09ce5ea984da892274c7f63d126dffb63ad5a7c
* [RTT] Add NPE checks for invalid MAC addresses from AwareEtan Cohen2018-07-201-5/+10
| | | | | | | | | | | | | RTT requests for Aware peers may use PeerHandles. The RTT service queries the Aware service for their corresponding MAC addresses. In some corner cases, e.g. the Aware peer just disappeared, a null MAC address may be returned. This was not handled, resulting in an NPE. Bug: 111646773 Test: new unit test added, passes Change-Id: I7d7c37322848fe7e7dd4f9f412f1e1339321e9a8
* [RTT] Recreate RTT controller when HAL indicates it is invalidEtan Cohen2018-07-111-1/+83
| | | | | | | | | | | | | | | | | | | When there is a HAL mode transition the RTT controller is destroyed. Mode transition is STA - SAP and back transitions for non-DBS devices. Modification to allow framework to detect when the controller is currently invalid and try to recreate it. Will allow recovery for non-DBS devices: otherwise RTT would only recover when Wi-Fi is toggled. Note: not a full solution since the availability APIs (broadcast + API) do not perform correctly in such transitions. That fix will be deeper and require HalDeviceManager mods. Bug: 111218083 Test: (new) unit test Test: new ACTS - RangeApSupporting11McTest:test_rtt_in_and_after_softap_mode Change-Id: I6d28ef7a50b02fe42e23b9172621bd83452658f1
* Convert RTT background throttle to a settable value (2/2).Wei Wang2018-05-021-4/+13
| | | | | | Bug: 69323456 Test: Manual test. Unit tests with runtest.sh. Change-Id: Ia67775124929258b357446c3e98991927802b6c1
* [RTT] Wi-Fi RTT MetricsEtan Cohen2018-04-103-20/+825
| | | | | | | | | | | | | | | | | | | | Add Wi-Fi RTT metrics collection. Testing: - Unit tests (new) - Integration tests: -RangeApSupporting11McTest:test_rtt_80211mc_supporting_aps - RangeAwareTest - After integration tests (i.e. full framework run) exercised consolidation by: - adb shell dumpsys wifi - adb shell dumpsys wifi wifiMetricsProto - adb shell dumpsys wifi wifiMetricsProto clean Bug: 68819947 Test: unit tests Test: integration tests + adb Change-Id: I9c98a9801bc912d7f4ae68aa7261d3a068cf3339
* [RTT] Add API for number of measurementsEtan Cohen2018-03-282-16/+18
| | | | | | | | | | Add information about the number of attemped and successful measurements used to calculate the final results (especially critical for standard deviation). Bug: 76445930 Test: unit tests & integration tests Change-Id: I801a6e0cbceebf9ea01dfb555d7b66ba04444413
* [RTT] Check RTT Initiator capabilities and constrain requestEtan Cohen2018-03-092-6/+142
| | | | | | | | | | | | | | | Read capabilities of the local RTT initiator and constrain the RTT requests per capabilities. E.g. - Support for one-sided RTT - Support for LCI/LCR - Bandwidth & preamble support: in those cases use the next best supported value. Bug: 69965964 Test: unit test "-e package com.android.server.wifi.rtt" Test: integration test "RangeApSupporting11McTest:test_rtt_80211mc_supporting_aps" Test: CTS (under review) "atest CtsNetTestCases:WifiRttTest" Change-Id: I79e73027759a5cf1f6d96c90ade5029d6cbe10dd
* [RTT] Modify public ranging results timestamp to use millisecondsEtan Cohen2018-02-131-1/+1
| | | | | | | | Per API reviews. Bug: 73088768 Test: unit tests and integration tests Change-Id: Ic53800b06f06ab45f3af34d5c0049360fe94259e
* [RTT] RangeResult RSSI now in units of dBEtan Cohen2018-02-131-1/+1
| | | | | | | | | | | Changed from units of -0.5dB to units of +1dB (original is what comes from the firmware). Per API council feedback. Bug: 73088768 Test: unit tests & integration tests Change-Id: I9c7e2c31972ff6d1d1625d45e9f7356bbd4003bc
* [RTT] RTT LCI/LCR fields as raw arraysEtan Cohen2018-02-131-10/+21
| | | | | | | | | Pass through the LCI/LCR fields as raw arrays. Only request them (from Responder AP) when in privileged mode. Bug: 71643239 Test: unit test & sanity (baseline) integration tests Change-Id: I92ec93e99aa285ca8da690ae4d2f964d481885f0
* [RTT] Add checks for 802.11mc support on AP RTT requestsEtan Cohen2018-02-123-29/+197
| | | | | | Bug: 72975604 Test: unit tests, integration tests Change-Id: I2feee521d7b71684133cc95d8cee5f95095af076
* [RTT] Update LocationMode usage to new APIEtan Cohen2018-02-051-7/+8
| | | | | | | | | Use the non-deprecated API for LocationMode tracking: allow RTT when LocationMode is enabled, disable otherwise. Bug: 72332542 Test: unit tests and integration tests passing Change-Id: Ia1b9e7e694b72d87544d13841c600fe6edc77939
* [RTT] Run HDM status change listener on a local handlerEtan Cohen2018-01-252-2/+2
| | | | | | | | | | Specify a local handler on which to run the HDM status change listener. Otherwise (with null) the status listener is run synchronous/ blocking (inline) and is causing deadlock. Bug: 72463371 Test: unit test, integration test Change-Id: I20cfc4ffe05307b30623cdd435aaa7275290b406
* [RTT] Request and pass through LCI informationEtan Cohen2018-01-222-8/+11
| | | | | | | | | Request the LCI from an AP (not from a NAN peer) and parse and pass through the result (which may be a null) to the app. Bug: 71643239 Test: unit tests Change-Id: I3ff5f6ae6f70665e9bf0aad91c75f4964c2e06fb
* RttServiceImpl: Support chained WorkSources.Narayan Kamath2018-01-081-10/+44
| | | | | | | | | Take the list of WorkChains associated with a given WorkSource into account when cancelling ranging requests and when throttling requests. Test: RttServiceImplTest Bug: 62390666 Change-Id: Ibd362a4feda6f475a0186e92973944c426df2095
* [RTT2] Run-time location permission/mode checksEtan Cohen2017-12-182-12/+51
| | | | | | | | | | | Add checks for RTT permissions: - Run-time COARSE_LOCATION permission to start an operation - Location mode monitoring, only allow when Wi-Fi based location info is explicitly permitted Bug: 70218295 Test: unit tests and integration tests Change-Id: I77e40ebabbceedec5c230dee323b56eb45489f1d
* [RTT] Convert to dynamic logging configurationEtan Cohen2017-12-141-1/+9
| | | | | | | | | Tie debugging level to Verbose Wi-Fi debuggging flag. Allow additional verbose debugging based on (original) static flag. Bug: 69432628 Test: manually enable/disable and view logs Change-Id: I64be283fac2cd3cd19cb12613d17ac50270cc802
* [RTT2] Convert APIs to use MacAddressEtan Cohen2017-12-073-28/+26
| | | | | | | | | MacAddress class is being added as a public API. Convert ad-hoc byte[] represetations to new class. Bug: 65108607 Test: unit tests and integration tests Change-Id: I8c93c9ec8dbdc6a6e2b1ed0a4dace895d3c0e32a
* [RTT2] limit max number of outstanding requests per UIDEtan Cohen2017-11-301-0/+122
| | | | | | | | | Prevent spamming of service. Limit number of oustanding requests to a large enough number that no correct use of the API will reach. Bug: 65015291 Test: unit tests and integration tests Change-Id: I675227911994f145ecea6638f049444c34fb031f
* [RTT2] Use generic Responder configurationEtan Cohen2017-11-302-32/+35
| | | | | | | | | | Use the generic Responder configuration in the service. I.e. all peer configurations are translated to their common Responder configuration by the time they make it into the service. Bug: 65014962 Test: unit tests and integration tests Change-Id: I90e4e63bb5740851082e6512ccfd217a9e81aa63
* [RTT2] Throttle requests from non-foreground apps/servicesEtan Cohen2017-11-151-1/+191
| | | | | | | | | | RTT requests from non-foreground apps/services are throttled to a low rate (1/30 minutes). Requests received more frequently are rejected - i.e. not queued. Bug: 65015291 Test: unit tests and integration tests Change-Id: Iedaf1b1b21437eceed7e2a55cf76b2df8b3c5fc2
* [RTT2] Add support for WorkSource-based managementEtan Cohen2017-11-141-23/+175
| | | | | | | | Support requests and cleanup based on WorkSource. Bug: 65015291 Test: unit tests and integration tests Change-Id: I973c0643f57fead751dde31c06f01077b402d7aa
* [RTT2] Move native initialization to local threadEtan Cohen2017-10-311-0/+2
| | | | | | | | | | | Native initialization can block for a "long" period of time. It therefore should not run on the main thread of the system service (which will delay system startup). CL moves it off to the local thread of the RTT service. Bug: 68661723 Test: unit test & integration tests Change-Id: I6e51ca080c362eec48f7810b2e013d9106376368
* [RTT2] Disable RTT on dozeEtan Cohen2017-10-301-7/+66
| | | | | | Bug: 65015291 Test: unit tests and integration tests Change-Id: I8e4458475de09b9a4410c84c516fc7e2f3889555
* [RTT2] Add RTT availability APIEtan Cohen2017-10-262-2/+85
| | | | | | | | | Add a broadcast + availability API allowing apps to keep track of when Wi-Fi RTT is available. Bug: 65014694 Test: unit tests and integration tests Change-Id: Ic74da67ef32d44ffa0b0c78ee3ec0e49e2586bc2
* [RTT2] Manage RTT native directly with HalDeviceManagerEtan Cohen2017-10-241-11/+33
| | | | | | | | | Decouples RTT native interface from Wi-Fi native and vendor HAL and use HalDeviceManager directly. Bug: 65014872 Test: unit test and integration tests Change-Id: I93f1d76e9f1b10c7ba1cd26f91dcd2b87f90861b
* [RTT2] Add time-out & clean-up codeEtan Cohen2017-10-242-13/+129
| | | | | | | | | | | Add time-out to catch HAL stuck/takes-too-long errors. Use the HAL API to cancel outstanding requests in case of app death or timeout. Bug: 64106086 Test: unit test Change-Id: I520828dedf9e656ebed41949955cee44d56d83a5
* [RTT2] Error code reconfigurationEtan Cohen2017-10-192-24/+16
| | | | | | | | | | | Error code changes: - Error code for overall failure - Error code for individual failures - Throw exception when trying to access invalid results Bug: 65108607 Test: unit tests and integration tests Change-Id: I72c1ba6df3c3c2092fd38ea3ab7d2de7d8574e49
* [RTT2] Ranging results CM -> MMEtan Cohen2017-10-191-2/+2
| | | | | | | | Change the units (and name) of the ranging result from CM to MM. Bug: 65108607 Test: unit tests & integration tests Change-Id: Ia65857b582786e7410c86e8135b966334653da77
* [RTT2] Rename API Ap -> AccessPoint, timestamp clarificationEtan Cohen2017-10-191-3/+3
| | | | | | | | | | API council feedback: - Ap -> AccessPoint - Timestamp -> add us unit Bug: 65108607 Test: unit tests & integration test suite Change-Id: Ic84989de42b4a55b4850104526a50b6c961b3fa2
* [RTT2] Add support for RTT with a Peer Wi-Fi Aware deviceEtan Cohen2017-10-193-48/+227
| | | | | | | | | | | | | Add support for ranging to peer Wi-Fi Aware devices. These can be specified either: - In-band discovery using PeerHandle (which gets translated to a MAC address for ranging but masked back out when results are reported) - Out-of-band discovery using a MAC address Bug: 65015034 Test: unit tests + integration tests Change-Id: I98f0bc06a0a408bc7fd543d564117fa303018adf
* [RTT2] Add support for queueing ranging requetsEtan Cohen2017-09-263-48/+109
| | | | | | | | Sequential ranging requests will be queued and executed in order. Bug: 65014772 Test: new unit tests + integration tests pass Change-Id: I54344da12c02170cf43991ec1b0b6caecb6b8243
* [RTT2] New Wi-Fi RTT service (v2)Etan Cohen2017-09-263-0/+537
Wi-Fi RTT service. Initial framework - supporting single RTT to AP request. Bug: 65014552 Test: unit tests and integration tests Change-Id: I33b248d2a3fb1a0fdc289da684507f94c30a6c63