Merge "Remove requirement for VtsHalRadioV1_3 tests for sim to be present" into rvc-dev
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
index 9784f75..31ba8ab 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
@@ -40,29 +40,6 @@
],
}
-cc_library_static {
- name: "android.hardware.automotive.vehicle@2.0-grpc",
- vendor: true,
- include_dirs: [
- "external/protobuf/src",
- ],
- generated_headers: [
- "DefaultVehicleHalProtoStub_h",
- ],
- export_generated_headers: [
- "DefaultVehicleHalProtoStub_h",
- ],
- generated_sources: [
- "DefaultVehicleHalProtoStub_cc",
- ],
- shared_libs: [
- "libgrpc++_unsecure",
- ],
- cflags: [
- "-Wno-unused-parameter",
- ],
-}
-
genrule {
name: "DefaultVehicleHalProtoStub_h",
tools: [
@@ -72,13 +49,10 @@
cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
srcs: [
"VehicleHalProto.proto",
- "VehicleServer.proto",
],
out: [
"VehicleHalProto.pb.h",
"VehicleHalProto.grpc.pb.h",
- "VehicleServer.pb.h",
- "VehicleServer.grpc.pb.h",
],
}
@@ -91,12 +65,9 @@
cmd: "$(location aprotoc) -I$$(dirname $(in)) -Iexternal/protobuf/src --plugin=protoc-gen-grpc=$(location protoc-gen-grpc-cpp-plugin) $(in) --grpc_out=$(genDir) --cpp_out=$(genDir)",
srcs: [
"VehicleHalProto.proto",
- "VehicleServer.proto",
],
out: [
"VehicleHalProto.pb.cc",
"VehicleHalProto.grpc.pb.cc",
- "VehicleServer.pb.cc",
- "VehicleServer.grpc.pb.cc",
],
}
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/VehicleServer.proto b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/VehicleServer.proto
deleted file mode 100644
index 6f71d65..0000000
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/VehicleServer.proto
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-syntax = "proto3";
-
-package vhal_proto;
-
-import "google/protobuf/empty.proto";
-import "VehicleHalProto.proto";
-
-// correspond to StatusCode defined in types.hal
-enum VehicleHalStatusCode {
- OK = 0;
- TRY_AGAIN = 1;
- INVALID_ARG = 2;
- NOT_AVAILABLE = 3;
- ACCESS_DENIED = 4;
- INTERNAL_ERROR = 5;
-}
-
-message VehicleHalCallStatus {
- VehicleHalStatusCode status_code = 1;
-}
-
-message WrappedVehiclePropValue {
- VehiclePropValue value = 1;
- // An indicator on whether we should update the status of the property
- // - true: if the value is generated by (emulated/real) car, or;
- // if the value is injected to 'fake' a on car event (for debugging purpose)
- // - false: if the value is set by VHal (public interface), since Android
- // cannot change status of property on a real car
- bool update_status = 2;
-}
-
-service VehicleServer {
- rpc GetAllPropertyConfig(google.protobuf.Empty) returns (stream VehiclePropConfig) {}
-
- // Change the property value of the vehicle
- rpc SetProperty(WrappedVehiclePropValue) returns (VehicleHalCallStatus) {}
-
- // Start a vehicle property value stream
- rpc StartPropertyValuesStream(google.protobuf.Empty) returns (stream WrappedVehiclePropValue) {}
-}
-
diff --git a/current.txt b/current.txt
index 2677eb1..656f5c7 100644
--- a/current.txt
+++ b/current.txt
@@ -711,7 +711,7 @@
278817920bfd5292a7713f97f1832cca53de3de640f7670e413d97c6e7fd581c android.hardware.neuralnetworks@1.3::IDevice
127ba11efb8220dc3aec9a8f441b59eaf1c68d7f03f577833e1824de75a36b17 android.hardware.neuralnetworks@1.3::IExecutionCallback
6e904be0ddca5ae1de8eba020e6c38ed935ea7d80cd08f47787f137a0ca58555 android.hardware.neuralnetworks@1.3::IFencedExecutionCallback
-2b0b10d2ea7a18a4048cd0eb83d35c19a817aeee95f65807fc31f4ef21381397 android.hardware.neuralnetworks@1.3::IPreparedModel
+ee9dc34b9925b8367b1111c72bd6d9d375432735e451572ca5a665d8516a7744 android.hardware.neuralnetworks@1.3::IPreparedModel
eee3430cc86c97c7b407495863d8fb61da6f1a64b7721e77b9b4909b11b174e9 android.hardware.neuralnetworks@1.3::IPreparedModelCallback
acf84925f8ee0a651f2ec547ac334034de266479b93af5434f6c1f25e66aba96 android.hardware.neuralnetworks@1.3::types
b454df853441c12f6e425e8a60dd29fda20f5e6e39b93d1103e4b37495db38aa android.hardware.radio@1.5::IRadio
diff --git a/neuralnetworks/1.3/IPreparedModel.hal b/neuralnetworks/1.3/IPreparedModel.hal
index a1814b5..e7d63f4 100644
--- a/neuralnetworks/1.3/IPreparedModel.hal
+++ b/neuralnetworks/1.3/IPreparedModel.hal
@@ -92,13 +92,11 @@
* executing a {@link OperationType::WHILE}
* operation. If a loop condition model does not
* output false within this duration, the
- * execution must be aborted. If the model
- * contains a {@link OperationType::WHILE}
- * operation and no loop timeout duration is
- * provided, the maximum amount of time is {@link
- * LoopTimeoutDurationNs::DEFAULT}. When
- * provided, the duration must not exceed {@link
- * LoopTimeoutDurationNs::MAXIMUM}.
+ * execution must be aborted. If no loop timeout
+ * duration is provided, the maximum amount of
+ * time is {@link LoopTimeoutDurationNs::DEFAULT}.
+ * When provided, the duration must not exceed
+ * {@link LoopTimeoutDurationNs::MAXIMUM}.
* @param callback A callback object used to return the error status of
* the execution, shape information of model output operands, and
* duration of execution. The callback object's notify function must
@@ -170,13 +168,11 @@
* executing a {@link OperationType::WHILE}
* operation. If a loop condition model does not
* output false within this duration, the
- * execution must be aborted. If the model
- * contains a {@link OperationType::WHILE}
- * operation and no loop timeout duration is
- * provided, the maximum amount of time is {@link
- * LoopTimeoutDurationNs::DEFAULT}. When
- * provided, the duration must not exceed {@link
- * LoopTimeoutDurationNs::MAXIMUM}.
+ * execution must be aborted. If no loop timeout
+ * duration is provided, the maximum amount of
+ * time is {@link LoopTimeoutDurationNs::DEFAULT}.
+ * When provided, the duration must not exceed
+ * {@link LoopTimeoutDurationNs::MAXIMUM}.
* @return status Error status of the execution, must be:
* - NONE if execution is performed successfully
* - DEVICE_UNAVAILABLE if driver is offline or busy
@@ -258,13 +254,11 @@
* executing a {@link OperationType::WHILE}
* operation. If a loop condition model does not
* output false within this duration, the
- * execution must be aborted. If the model
- * contains a {@link OperationType::WHILE}
- * operation and no loop timeout duration is
- * provided, the maximum amount of time is {@link
- * LoopTimeoutDurationNs::DEFAULT}. When
- * provided, the duration must not exceed {@link
- * LoopTimeoutDurationNs::MAXIMUM}.
+ * execution must be aborted. If no loop timeout
+ * duration is provided, the maximum amount of
+ * time is {@link LoopTimeoutDurationNs::DEFAULT}.
+ * When provided, the duration must not exceed
+ * {@link LoopTimeoutDurationNs::MAXIMUM}.
* @param duration The length of time within which the execution is expected
* to complete after all sync fences in waitFor are signaled.
* If the execution cannot be finished within the duration,
diff --git a/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc b/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc
index a4da3b0..0b3d4c2 100644
--- a/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc
+++ b/sensors/2.0/multihal/android.hardware.sensors@2.0-service-multihal.rc
@@ -1,7 +1,7 @@
service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal
class hal
user system
- group system wakelock
+ group system wakelock context_hub
writepid /dev/cpuset/system-background/tasks
capabilities BLOCK_SUSPEND
rlimit rtprio 10 10
diff --git a/sensors/common/default/2.X/multihal/HalProxy.cpp b/sensors/common/default/2.X/multihal/HalProxy.cpp
index 518e138..869c033 100644
--- a/sensors/common/default/2.X/multihal/HalProxy.cpp
+++ b/sensors/common/default/2.X/multihal/HalProxy.cpp
@@ -260,9 +260,14 @@
RateLevel rate, configDirectReport_cb _hidl_cb) {
if (mDirectChannelSubHal == nullptr) {
_hidl_cb(Result::INVALID_OPERATION, -1 /* reportToken */);
+ } else if (sensorHandle == -1 && rate != RateLevel::STOP) {
+ _hidl_cb(Result::BAD_VALUE, -1 /* reportToken */);
} else {
- mDirectChannelSubHal->configDirectReport(clearSubHalIndex(sensorHandle), channelHandle,
- rate, _hidl_cb);
+ // -1 denotes all sensors should be disabled
+ if (sensorHandle != -1) {
+ sensorHandle = clearSubHalIndex(sensorHandle);
+ }
+ mDirectChannelSubHal->configDirectReport(sensorHandle, channelHandle, rate, _hidl_cb);
}
return Return<void>();
}
diff --git a/tv/tuner/1.0/default/Frontend.cpp b/tv/tuner/1.0/default/Frontend.cpp
index bb0d8dc..2cff9be 100644
--- a/tv/tuner/1.0/default/Frontend.cpp
+++ b/tv/tuner/1.0/default/Frontend.cpp
@@ -41,6 +41,7 @@
ALOGV("%s", __FUNCTION__);
// Reset callback
mCallback = nullptr;
+ mIsLocked = false;
return Result::SUCCESS;
}
@@ -64,6 +65,7 @@
}
mCallback->onEvent(FrontendEventType::LOCKED);
+ mIsLocked = false;
return Result::SUCCESS;
}
@@ -71,16 +73,35 @@
ALOGV("%s", __FUNCTION__);
mTunerService->frontendStopTune(mId);
+ mIsLocked = false;
return Result::SUCCESS;
}
-Return<Result> Frontend::scan(const FrontendSettings& /* settings */, FrontendScanType /* type */) {
+Return<Result> Frontend::scan(const FrontendSettings& settings, FrontendScanType type) {
ALOGV("%s", __FUNCTION__);
+ if (mType != FrontendType::DVBT) {
+ return Result::UNAVAILABLE;
+ }
+
FrontendScanMessage msg;
+
+ if (mIsLocked) {
+ msg.isEnd(true);
+ mCallback->onScanMessage(FrontendScanMessageType::END, msg);
+ return Result::SUCCESS;
+ }
+
+ uint32_t frequency = settings.dvbt().frequency;
+ if (type == FrontendScanType::SCAN_BLIND) {
+ frequency += 100;
+ }
+ msg.frequencies({frequency});
+ mCallback->onScanMessage(FrontendScanMessageType::FREQUENCY, msg);
msg.isLocked(true);
mCallback->onScanMessage(FrontendScanMessageType::LOCKED, msg);
+ mIsLocked = true;
return Result::SUCCESS;
}
@@ -88,6 +109,7 @@
Return<Result> Frontend::stopScan() {
ALOGV("%s", __FUNCTION__);
+ mIsLocked = false;
return Result::SUCCESS;
}
diff --git a/tv/tuner/1.0/default/Frontend.h b/tv/tuner/1.0/default/Frontend.h
index b954639..8a30b91 100644
--- a/tv/tuner/1.0/default/Frontend.h
+++ b/tv/tuner/1.0/default/Frontend.h
@@ -74,6 +74,7 @@
sp<Tuner> mTunerService;
FrontendType mType = FrontendType::UNDEFINED;
FrontendId mId = 0;
+ bool mIsLocked = false;
const string FRONTEND_STREAM_FILE = "/vendor/etc/dumpTs3.ts";
std::ifstream mFrontendData;
diff --git a/tv/tuner/1.0/default/Tuner.cpp b/tv/tuner/1.0/default/Tuner.cpp
index 8fb5061..6f9a5cf 100644
--- a/tv/tuner/1.0/default/Tuner.cpp
+++ b/tv/tuner/1.0/default/Tuner.cpp
@@ -106,40 +106,54 @@
return Void();
}
-Return<void> Tuner::getFrontendInfo(FrontendId /*frontendId*/, getFrontendInfo_cb _hidl_cb) {
+Return<void> Tuner::getFrontendInfo(FrontendId frontendId, getFrontendInfo_cb _hidl_cb) {
ALOGV("%s", __FUNCTION__);
- vector<FrontendStatusType> statusCaps = {
- FrontendStatusType::DEMOD_LOCK,
- FrontendStatusType::SNR,
- FrontendStatusType::FEC,
- FrontendStatusType::MODULATION,
- FrontendStatusType::PLP_ID,
- FrontendStatusType::LAYER_ERROR,
- FrontendStatusType::ATSC3_PLP_INFO,
- };
- FrontendInfo::FrontendCapabilities frontendCaps;
- FrontendIsdbtCapabilities isdbtCaps{
- .modeCap = FrontendIsdbtMode::MODE_1 | FrontendIsdbtMode::MODE_2,
- .bandwidthCap = (unsigned int)FrontendIsdbtBandwidth::BANDWIDTH_6MHZ,
- .modulationCap = (unsigned int)FrontendIsdbtModulation::MOD_16QAM,
- // ISDBT shares coderate and guard interval with DVBT
- .coderateCap = FrontendDvbtCoderate::CODERATE_4_5 | FrontendDvbtCoderate::CODERATE_6_7,
- .guardIntervalCap = (unsigned int)FrontendDvbtGuardInterval::INTERVAL_1_128,
- };
- frontendCaps.isdbtCaps(isdbtCaps);
- // assign randomly selected values for testing.
- FrontendInfo info{
- .type = FrontendType::ISDBT,
- .minFrequency = 139,
- .maxFrequency = 1139,
- .minSymbolRate = 45,
- .maxSymbolRate = 1145,
- .acquireRange = 30,
- .exclusiveGroupId = 57,
- .statusCaps = statusCaps,
- .frontendCaps = frontendCaps,
- };
+ FrontendInfo info;
+ if (frontendId >= mFrontendSize) {
+ _hidl_cb(Result::INVALID_ARGUMENT, info);
+ return Void();
+ }
+
+ switch (mFrontends[frontendId]->getFrontendType()) {
+ case FrontendType::DVBT:
+ info.type = FrontendType::DVBT;
+ break;
+ default:
+ vector<FrontendStatusType> statusCaps = {
+ FrontendStatusType::DEMOD_LOCK,
+ FrontendStatusType::SNR,
+ FrontendStatusType::FEC,
+ FrontendStatusType::MODULATION,
+ FrontendStatusType::PLP_ID,
+ FrontendStatusType::LAYER_ERROR,
+ FrontendStatusType::ATSC3_PLP_INFO,
+ };
+ FrontendInfo::FrontendCapabilities frontendCaps;
+ FrontendIsdbtCapabilities isdbtCaps{
+ .modeCap = FrontendIsdbtMode::MODE_1 | FrontendIsdbtMode::MODE_2,
+ .bandwidthCap = (unsigned int)FrontendIsdbtBandwidth::BANDWIDTH_6MHZ,
+ .modulationCap = (unsigned int)FrontendIsdbtModulation::MOD_16QAM,
+ // ISDBT shares coderate and guard interval with DVBT
+ .coderateCap =
+ FrontendDvbtCoderate::CODERATE_4_5 | FrontendDvbtCoderate::CODERATE_6_7,
+ .guardIntervalCap = (unsigned int)FrontendDvbtGuardInterval::INTERVAL_1_128,
+ };
+ frontendCaps.isdbtCaps(isdbtCaps);
+ // assign randomly selected values for testing.
+ info = {
+ .type = FrontendType::ISDBT,
+ .minFrequency = 139,
+ .maxFrequency = 1139,
+ .minSymbolRate = 45,
+ .maxSymbolRate = 1145,
+ .acquireRange = 30,
+ .exclusiveGroupId = 57,
+ .statusCaps = statusCaps,
+ .frontendCaps = frontendCaps,
+ };
+ break;
+ }
_hidl_cb(Result::SUCCESS, info);
return Void();
diff --git a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp
index 8b0413c..5e98367 100644
--- a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp
+++ b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TargetTest.cpp
@@ -47,6 +47,7 @@
#include "VtsHalTvTunerV1_0TestConfigurations.h"
#define WAIT_TIMEOUT 3000000000
+#define INVALID_ID -1
using android::Condition;
using android::IMemory;
@@ -214,7 +215,7 @@
// Helper methods
uint32_t getTargetFrequency(FrontendSettings settings, FrontendType type);
- void resetBlindScanStartingFrequency(FrontendConfig config, uint32_t resetingFreq);
+ void resetBlindScanStartingFrequency(FrontendConfig& config, uint32_t resetingFreq);
private:
bool mEventReceived = false;
@@ -340,7 +341,7 @@
}
}
-void FrontendCallback::resetBlindScanStartingFrequency(FrontendConfig config,
+void FrontendCallback::resetBlindScanStartingFrequency(FrontendConfig& config,
uint32_t resetingFreq) {
switch (config.type) {
case FrontendType::ANALOG:
@@ -856,7 +857,7 @@
AssertionResult getFrontendIds();
AssertionResult getFrontendInfo(uint32_t frontendId);
- AssertionResult openFrontend(uint32_t frontendId);
+ AssertionResult openFrontendById(uint32_t frontendId);
AssertionResult setFrontendCallback();
AssertionResult scanFrontend(FrontendConfig config, FrontendScanType type);
AssertionResult stopScanFrontend();
@@ -890,6 +891,10 @@
vector<string> goldenOutputFiles);
AssertionResult broadcastDataFlowTest(vector<string> goldenOutputFiles);
+ void broadcastSingleFilterTest(FilterConfig filterConf, FrontendConfig frontendConf);
+ void getFrontendIdByType(FrontendType feType, uint32_t& feId);
+ void scanTest(FrontendConfig frontend, FrontendScanType type);
+
FilterEventType getFilterEventType(DemuxFilterType type);
};
@@ -912,7 +917,7 @@
return AssertionResult(status == Result::SUCCESS);
}
-AssertionResult TunerHidlTest::openFrontend(uint32_t frontendId) {
+AssertionResult TunerHidlTest::openFrontendById(uint32_t frontendId) {
Result status;
mService->openFrontendById(frontendId, [&](Result result, const sp<IFrontend>& frontend) {
mFrontend = frontend;
@@ -922,7 +927,7 @@
}
AssertionResult TunerHidlTest::setFrontendCallback() {
- EXPECT_TRUE(mFrontend) << "Test with openFrontend first.";
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
mFrontendCallback = new FrontendCallback();
auto callbackStatus = mFrontend->setCallback(mFrontendCallback);
return AssertionResult(callbackStatus.isOk());
@@ -930,7 +935,7 @@
AssertionResult TunerHidlTest::scanFrontend(FrontendConfig config, FrontendScanType type) {
EXPECT_TRUE(mFrontendCallback)
- << "test with openFrontend/setFrontendCallback/getFrontendInfo first.";
+ << "test with openFrontendById/setFrontendCallback/getFrontendInfo first.";
EXPECT_TRUE(mFrontendInfo.type == config.type)
<< "FrontendConfig does not match the frontend info of the given id.";
@@ -940,7 +945,7 @@
}
AssertionResult TunerHidlTest::stopScanFrontend() {
- EXPECT_TRUE(mFrontend) << "Test with openFrontend first.";
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
Result status;
status = mFrontend->stopScan();
return AssertionResult(status == Result::SUCCESS);
@@ -948,7 +953,7 @@
AssertionResult TunerHidlTest::tuneFrontend(FrontendConfig config) {
EXPECT_TRUE(mFrontendCallback)
- << "test with openFrontend/setFrontendCallback/getFrontendInfo first.";
+ << "test with openFrontendById/setFrontendCallback/getFrontendInfo first.";
EXPECT_TRUE(mFrontendInfo.type == config.type)
<< "FrontendConfig does not match the frontend info of the given id.";
@@ -958,14 +963,14 @@
}
AssertionResult TunerHidlTest::stopTuneFrontend() {
- EXPECT_TRUE(mFrontend) << "Test with openFrontend first.";
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
Result status;
status = mFrontend->stopTune();
return AssertionResult(status == Result::SUCCESS);
}
AssertionResult TunerHidlTest::closeFrontend() {
- EXPECT_TRUE(mFrontend) << "Test with openFrontend first.";
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
Result status;
status = mFrontend->close();
mFrontend = nullptr;
@@ -987,7 +992,7 @@
AssertionResult TunerHidlTest::setDemuxFrontendDataSource(uint32_t frontendId) {
EXPECT_TRUE(mDemux) << "Test with openDemux first.";
- EXPECT_TRUE(mFrontend) << "Test with openFrontend first.";
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
auto status = mDemux->setFrontendDataSource(frontendId);
return AssertionResult(status.isOk());
}
@@ -1328,6 +1333,64 @@
}*/
/*========================= End Data Flow Tests Implementation =========================*/
+/*================================= Start Test Module =================================*/
+void TunerHidlTest::getFrontendIdByType(FrontendType feType, uint32_t& feId) {
+ ASSERT_TRUE(getFrontendIds());
+ ASSERT_TRUE(mFeIds.size() > 0);
+ for (size_t i = 0; i < mFeIds.size(); i++) {
+ ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
+ if (mFrontendInfo.type != feType) {
+ continue;
+ }
+ feId = mFeIds[i];
+ return;
+ }
+ feId = INVALID_ID;
+}
+
+void TunerHidlTest::broadcastSingleFilterTest(FilterConfig filterConf,
+ FrontendConfig frontendConf) {
+ uint32_t feId;
+ getFrontendIdByType(frontendConf.type, feId);
+ if (feId == INVALID_ID) {
+ // TODO broadcast test on Cuttlefish needs licensed ts input,
+ // these tests are runnable on vendor device with real frontend module
+ // or with manual ts installing and use DVBT frontend.
+ return;
+ }
+ ASSERT_TRUE(openFrontendById(feId));
+ ASSERT_TRUE(setFrontendCallback());
+ ASSERT_TRUE(openDemux());
+ ASSERT_TRUE(setDemuxFrontendDataSource(feId));
+ ASSERT_TRUE(openFilterInDemux(filterConf.type));
+ uint32_t filterId;
+ ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
+ ASSERT_TRUE(configFilter(filterConf.setting, filterId));
+ ASSERT_TRUE(getFilterMQDescriptor(filterId));
+ ASSERT_TRUE(startFilter(filterId));
+ // tune test
+ ASSERT_TRUE(tuneFrontend(frontendConf));
+ // broadcast data flow test
+ ASSERT_TRUE(broadcastDataFlowTest(goldenOutputFiles));
+ ASSERT_TRUE(stopTuneFrontend());
+ ASSERT_TRUE(stopFilter(filterId));
+ ASSERT_TRUE(closeFilter(filterId));
+ ASSERT_TRUE(closeDemux());
+ ASSERT_TRUE(closeFrontend());
+}
+
+void TunerHidlTest::scanTest(FrontendConfig frontendConf, FrontendScanType scanType) {
+ uint32_t feId;
+ getFrontendIdByType(frontendConf.type, feId);
+ ASSERT_TRUE(feId != INVALID_ID);
+ ASSERT_TRUE(openFrontendById(feId));
+ ASSERT_TRUE(setFrontendCallback());
+ ASSERT_TRUE(scanFrontend(frontendConf, scanType));
+ ASSERT_TRUE(stopScanFrontend());
+ ASSERT_TRUE(closeFrontend());
+}
+/*================================== End Test Module ==================================*/
+
/*=============================== Start Helper Functions ===============================*/
FilterEventType TunerHidlTest::getFilterEventType(DemuxFilterType type) {
FilterEventType eventType = FilterEventType::UNDEFINED;
@@ -1380,153 +1443,49 @@
/******************************** Start Test Entry **********************************/
/*============================== Start Frontend Tests ==============================*/
-TEST_P(TunerHidlTest, getFrontendIds) {
- description("Get Frontend ids and verify frontends exist");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-}
-
-TEST_P(TunerHidlTest, openFrontend) {
- description("Open all the existing Frontends and close them");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(closeFrontend());
- }
-}
-
TEST_P(TunerHidlTest, TuneFrontend) {
description("Tune one Frontend with specific setting and check Lock event");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
- ALOGW("[vts] expected Frontend type is %d", frontendArray[0].type);
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- ALOGW("[vts] Frontend type is %d", mFrontendInfo.type);
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(tuneFrontend(frontendArray[0]));
- ASSERT_TRUE(stopTuneFrontend());
- ASSERT_TRUE(closeFrontend());
- break;
- }
+ uint32_t feId;
+ getFrontendIdByType(frontendArray[DVBT].type, feId);
+ ASSERT_TRUE(feId != INVALID_ID);
+ ASSERT_TRUE(openFrontendById(feId));
+ ASSERT_TRUE(setFrontendCallback());
+ ASSERT_TRUE(tuneFrontend(frontendArray[DVBT]));
+ ASSERT_TRUE(stopTuneFrontend());
+ ASSERT_TRUE(closeFrontend());
}
TEST_P(TunerHidlTest, AutoScanFrontend) {
description("Run an auto frontend scan with specific setting and check lock scanMessage");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(scanFrontend(frontendScanArray[0], FrontendScanType::SCAN_AUTO));
- ASSERT_TRUE(stopScanFrontend());
- ASSERT_TRUE(closeFrontend());
- break;
- }
+ scanTest(frontendScanArray[SCAN_DVBT], FrontendScanType::SCAN_AUTO);
}
TEST_P(TunerHidlTest, BlindScanFrontend) {
description("Run an blind frontend scan with specific setting and check lock scanMessage");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(scanFrontend(frontendScanArray[0], FrontendScanType::SCAN_BLIND));
- ASSERT_TRUE(stopScanFrontend());
- ASSERT_TRUE(closeFrontend());
- break;
- }
+ scanTest(frontendScanArray[SCAN_DVBT], FrontendScanType::SCAN_BLIND);
}
/*=============================== End Frontend Tests ===============================*/
/*============================ Start Demux/Filter Tests ============================*/
-TEST_P(TunerHidlTest, OpenDemuxWithFrontendDataSource) {
- description("Open Demux with a Frontend as its data source.");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(openDemux());
- ASSERT_TRUE(setDemuxFrontendDataSource(mFeIds[i]));
- ASSERT_TRUE(closeDemux());
- ASSERT_TRUE(closeFrontend());
- break;
- }
-}
-
-TEST_P(TunerHidlTest, OpenFilterInDemux) {
- description("Open a filter in Demux.");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(openDemux());
- ASSERT_TRUE(setDemuxFrontendDataSource(mFeIds[i]));
- ASSERT_TRUE(openFilterInDemux(filterArray[0].type));
- uint32_t filterId;
- ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
- ASSERT_TRUE(closeFilter(filterId));
- ASSERT_TRUE(closeDemux());
- ASSERT_TRUE(closeFrontend());
- break;
- }
-}
-
TEST_P(TunerHidlTest, StartFilterInDemux) {
description("Open and start a filter in Demux.");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(openDemux());
- ASSERT_TRUE(setDemuxFrontendDataSource(mFeIds[i]));
- ASSERT_TRUE(openFilterInDemux(filterArray[0].type));
- uint32_t filterId;
- ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
- ASSERT_TRUE(configFilter(filterArray[0].setting, filterId));
- ASSERT_TRUE(getFilterMQDescriptor(filterId));
- ASSERT_TRUE(startFilter(filterId));
- ASSERT_TRUE(stopFilter(filterId));
- ASSERT_TRUE(closeFilter(filterId));
- ASSERT_TRUE(closeDemux());
- ASSERT_TRUE(closeFrontend());
- break;
- }
+ uint32_t feId;
+ getFrontendIdByType(frontendArray[DVBT].type, feId);
+ ASSERT_TRUE(feId != INVALID_ID);
+ ASSERT_TRUE(openFrontendById(feId));
+ ASSERT_TRUE(setFrontendCallback());
+ ASSERT_TRUE(openDemux());
+ ASSERT_TRUE(setDemuxFrontendDataSource(feId));
+ ASSERT_TRUE(openFilterInDemux(filterArray[TS_VIDEO0].type));
+ uint32_t filterId;
+ ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
+ ASSERT_TRUE(configFilter(filterArray[TS_VIDEO0].setting, filterId));
+ ASSERT_TRUE(getFilterMQDescriptor(filterId));
+ ASSERT_TRUE(startFilter(filterId));
+ ASSERT_TRUE(stopFilter(filterId));
+ ASSERT_TRUE(closeFilter(filterId));
+ ASSERT_TRUE(closeDemux());
+ ASSERT_TRUE(closeFrontend());
}
/*============================ End Demux/Filter Tests ============================*/
@@ -1546,39 +1505,30 @@
/*============================== End Descrambler Tests ==============================*/
/*============================== Start Data Flow Tests ==============================*/
-TEST_P(TunerHidlTest, BroadcastDataFlowWithAudioFilterTest) {
- description("Open Demux with a Frontend as its data source.");
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[0].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(openDemux());
- ASSERT_TRUE(setDemuxFrontendDataSource(mFeIds[i]));
- ASSERT_TRUE(openFilterInDemux(filterArray[0].type));
- uint32_t filterId;
- ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
- ASSERT_TRUE(configFilter(filterArray[0].setting, filterId));
- ASSERT_TRUE(getFilterMQDescriptor(filterId));
- ASSERT_TRUE(startFilter(filterId));
- // tune test
- ASSERT_TRUE(tuneFrontend(frontendArray[0]));
- // broadcast data flow test
- ASSERT_TRUE(broadcastDataFlowTest(goldenOutputFiles));
- ASSERT_TRUE(stopTuneFrontend());
- ASSERT_TRUE(stopFilter(filterId));
- ASSERT_TRUE(closeFilter(filterId));
- ASSERT_TRUE(closeDemux());
- ASSERT_TRUE(closeFrontend());
- break;
- }
+TEST_P(TunerHidlTest, BroadcastDataFlowVideoFilterTest) {
+ description("Test Video Filter functionality in Broadcast use case.");
+ broadcastSingleFilterTest(filterArray[TS_VIDEO1], frontendArray[DVBS]);
}
+TEST_P(TunerHidlTest, BroadcastDataFlowAudioFilterTest) {
+ description("Test Audio Filter functionality in Broadcast use case.");
+ broadcastSingleFilterTest(filterArray[TS_AUDIO0], frontendArray[DVBS]);
+}
+
+TEST_P(TunerHidlTest, BroadcastDataFlowTsFilterTest) {
+ description("Test TS Filter functionality in Broadcast use case.");
+ broadcastSingleFilterTest(filterArray[TS_TS0], frontendArray[DVBS]);
+}
+
+TEST_P(TunerHidlTest, BroadcastDataFlowSectionFilterTest) {
+ description("Test Section Filter functionality in Broadcast use case.");
+ broadcastSingleFilterTest(filterArray[TS_SECTION0], frontendArray[DVBS]);
+}
+
+TEST_P(TunerHidlTest, IonBufferTest) {
+ description("Test the av filter data bufferring.");
+ broadcastSingleFilterTest(filterArray[TS_VIDEO0], frontendArray[DVBS]);
+}
/*
* TODO: re-enable the tests after finalizing the testing stream.
*/
@@ -1662,39 +1612,6 @@
ASSERT_TRUE(recordDataFlowTest(filterConf, recordSetting, goldenOutputFiles));
}*/
-
-TEST_P(TunerHidlTest, AvBufferTest) {
- description("Test the av filter data bufferring.");
-
- ASSERT_TRUE(getFrontendIds());
- ASSERT_TRUE(mFeIds.size() > 0);
-
- for (size_t i = 0; i < mFeIds.size(); i++) {
- ASSERT_TRUE(getFrontendInfo(mFeIds[i]));
- if (mFrontendInfo.type != frontendArray[1].type) {
- continue;
- }
- ASSERT_TRUE(openFrontend(mFeIds[i]));
- ASSERT_TRUE(setFrontendCallback());
- ASSERT_TRUE(openDemux());
- ASSERT_TRUE(openFilterInDemux(filterArray[0].type));
- uint32_t filterId;
- ASSERT_TRUE(getNewlyOpenedFilterId(filterId));
- ASSERT_TRUE(configFilter(filterArray[0].setting, filterId));
- ASSERT_TRUE(startFilter(filterId));
- ASSERT_TRUE(setDemuxFrontendDataSource(mFeIds[i]));
- // tune test
- ASSERT_TRUE(tuneFrontend(frontendArray[1]));
- // broadcast data flow test
- ASSERT_TRUE(broadcastDataFlowTest(goldenOutputFiles));
- ASSERT_TRUE(stopTuneFrontend());
- ASSERT_TRUE(stopFilter(filterId));
- ASSERT_TRUE(closeFilter(filterId));
- ASSERT_TRUE(closeDemux());
- ASSERT_TRUE(closeFrontend());
- break;
- }
-}
/*============================== End Data Flow Tests ==============================*/
/******************************** End Test Entry **********************************/
} // namespace
diff --git a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h
index 31e3b51..10c6014 100644
--- a/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h
+++ b/tv/tuner/1.0/vts/functional/VtsHalTvTunerV1_0TestConfigurations.h
@@ -14,42 +14,18 @@
* limitations under the License.
*/
-#include <android-base/logging.h>
-#include <android/hardware/tv/tuner/1.0/IDemux.h>
-#include <android/hardware/tv/tuner/1.0/IDescrambler.h>
-#include <android/hardware/tv/tuner/1.0/IDvr.h>
-#include <android/hardware/tv/tuner/1.0/IDvrCallback.h>
-#include <android/hardware/tv/tuner/1.0/IFilter.h>
-#include <android/hardware/tv/tuner/1.0/IFilterCallback.h>
-#include <android/hardware/tv/tuner/1.0/IFrontend.h>
-#include <android/hardware/tv/tuner/1.0/IFrontendCallback.h>
-#include <android/hardware/tv/tuner/1.0/ITuner.h>
#include <android/hardware/tv/tuner/1.0/types.h>
#include <binder/MemoryDealer.h>
-#include <fmq/MessageQueue.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
#include <hidl/Status.h>
#include <hidlmemory/FrameworkUtils.h>
-#include <utils/Condition.h>
-#include <utils/Mutex.h>
-#include <fstream>
-#include <iostream>
-#include <map>
using android::hardware::tv::tuner::V1_0::DemuxFilterEvent;
using android::hardware::tv::tuner::V1_0::DemuxFilterMainType;
-using android::hardware::tv::tuner::V1_0::DemuxFilterPesDataSettings;
-using android::hardware::tv::tuner::V1_0::DemuxFilterPesEvent;
-using android::hardware::tv::tuner::V1_0::DemuxFilterRecordSettings;
-using android::hardware::tv::tuner::V1_0::DemuxFilterSectionEvent;
-using android::hardware::tv::tuner::V1_0::DemuxFilterSectionSettings;
using android::hardware::tv::tuner::V1_0::DemuxFilterSettings;
-using android::hardware::tv::tuner::V1_0::DemuxFilterStatus;
using android::hardware::tv::tuner::V1_0::DemuxFilterType;
-using android::hardware::tv::tuner::V1_0::DemuxQueueNotifyBits;
using android::hardware::tv::tuner::V1_0::DemuxTpid;
-using android::hardware::tv::tuner::V1_0::DemuxTsFilterSettings;
using android::hardware::tv::tuner::V1_0::DemuxTsFilterType;
using android::hardware::tv::tuner::V1_0::FrontendDvbtBandwidth;
using android::hardware::tv::tuner::V1_0::FrontendDvbtCoderate;
@@ -62,12 +38,27 @@
using android::hardware::tv::tuner::V1_0::FrontendSettings;
using android::hardware::tv::tuner::V1_0::FrontendType;
-namespace {
+typedef enum {
+ TS_VIDEO0,
+ TS_VIDEO1,
+ TS_AUDIO0,
+ TS_PES0,
+ TS_PCR0,
+ TS_SECTION0,
+ TS_TS0,
+ FILTER_MAX,
+} Filter;
-#define frontend_transponders_count 2
-#define channels_count 1
-#define frontend_scan_count 1
-#define filter_count 2
+typedef enum {
+ DVBT,
+ DVBS,
+ FRONTEND_MAX,
+} Frontend;
+
+typedef enum {
+ SCAN_DVBT,
+ SCAN_MAX,
+} FrontendScan;
struct FilterConfig {
DemuxFilterType type;
@@ -87,10 +78,10 @@
DemuxTpid audioPid;
};
-static FrontendConfig frontendArray[frontend_transponders_count];
-static FrontendConfig frontendScanArray[channels_count];
-static ChannelConfig channelArray[frontend_scan_count];
-static FilterConfig filterArray[filter_count];
+static FrontendConfig frontendArray[FILTER_MAX];
+static FrontendConfig frontendScanArray[SCAN_MAX];
+static ChannelConfig channelArray[FRONTEND_MAX];
+static FilterConfig filterArray[FILTER_MAX];
static vector<string> goldenOutputFiles;
/** Configuration array for the frontend tune test */
@@ -107,14 +98,14 @@
.isHighPriority = true,
.standard = FrontendDvbtStandard::T,
};
- frontendArray[0].type = FrontendType::DVBT, frontendArray[0].settings.dvbt(dvbtSettings);
- frontendArray[1].type = FrontendType::DVBS;
+ frontendArray[DVBT].type = FrontendType::DVBT, frontendArray[DVBT].settings.dvbt(dvbtSettings);
+ frontendArray[DVBS].type = FrontendType::DVBS;
};
/** Configuration array for the frontend scan test */
inline void initFrontendScanConfig() {
- frontendScanArray[0].type = FrontendType::DVBT;
- frontendScanArray[0].settings.dvbt({
+ frontendScanArray[SCAN_DVBT].type = FrontendType::DVBT;
+ frontendScanArray[SCAN_DVBT].settings.dvbt({
.frequency = 578000,
.transmissionMode = FrontendDvbtTransmissionMode::MODE_8K,
.bandwidth = FrontendDvbtBandwidth::BANDWIDTH_8MHZ,
@@ -130,19 +121,43 @@
/** Configuration array for the filter test */
inline void initFilterConfig() {
- // TS Video filter setting
- filterArray[0].type.mainType = DemuxFilterMainType::TS;
- filterArray[0].type.subType.tsFilterType(DemuxTsFilterType::VIDEO);
- filterArray[0].setting.ts().tpid = 119;
- filterArray[0].setting.ts().filterSettings.av({.isPassthrough = false});
+ // TS VIDEO filter setting for default implementation testing
+ filterArray[TS_VIDEO0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_VIDEO0].type.subType.tsFilterType(DemuxTsFilterType::VIDEO);
+ filterArray[TS_VIDEO0].setting.ts().tpid = 119;
+ filterArray[TS_VIDEO0].setting.ts().filterSettings.av({.isPassthrough = false});
+ filterArray[TS_VIDEO1].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_VIDEO1].type.subType.tsFilterType(DemuxTsFilterType::VIDEO);
+ filterArray[TS_VIDEO1].setting.ts().tpid = 81;
+ filterArray[TS_VIDEO1].setting.ts().filterSettings.av({.isPassthrough = false});
+ // TS AUDIO filter setting
+ filterArray[TS_AUDIO0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_AUDIO0].type.subType.tsFilterType(DemuxTsFilterType::AUDIO);
+ filterArray[TS_AUDIO0].setting.ts().tpid = 84;
+ filterArray[TS_AUDIO0].setting.ts().filterSettings.av({.isPassthrough = false});
// TS PES filter setting
- filterArray[1].type.mainType = DemuxFilterMainType::TS;
- filterArray[1].type.subType.tsFilterType(DemuxTsFilterType::PES);
- filterArray[1].setting.ts().tpid = 256;
- filterArray[1].setting.ts().filterSettings.pesData({
- .isRaw = true,
+ filterArray[TS_PES0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_PES0].type.subType.tsFilterType(DemuxTsFilterType::PES);
+ filterArray[TS_PES0].setting.ts().tpid = 256;
+ filterArray[TS_PES0].setting.ts().filterSettings.pesData({
+ .isRaw = false,
.streamId = 0xbd,
});
+ // TS PCR filter setting
+ filterArray[TS_PCR0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_PCR0].type.subType.tsFilterType(DemuxTsFilterType::PCR);
+ filterArray[TS_PCR0].setting.ts().tpid = 81;
+ filterArray[TS_PCR0].setting.ts().filterSettings.noinit();
+ // TS filter setting
+ filterArray[TS_TS0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_TS0].type.subType.tsFilterType(DemuxTsFilterType::TS);
+ filterArray[TS_TS0].setting.ts().tpid = 48;
+ filterArray[TS_TS0].setting.ts().filterSettings.noinit();
+ // TS SECTION filter setting
+ filterArray[TS_SECTION0].type.mainType = DemuxFilterMainType::TS;
+ filterArray[TS_SECTION0].type.subType.tsFilterType(DemuxTsFilterType::SECTION);
+ filterArray[TS_SECTION0].setting.ts().tpid = 48;
+ filterArray[TS_SECTION0].setting.ts().filterSettings.section({
+ .isRaw = false,
+ });
};
-
-} // namespace
diff --git a/wifi/1.4/default/android.hardware.wifi@1.0-service.rc b/wifi/1.4/default/android.hardware.wifi@1.0-service.rc
index 2317bac..64a51b0 100644
--- a/wifi/1.4/default/android.hardware.wifi@1.0-service.rc
+++ b/wifi/1.4/default/android.hardware.wifi@1.0-service.rc
@@ -2,6 +2,8 @@
interface android.hardware.wifi@1.0::IWifi default
interface android.hardware.wifi@1.1::IWifi default
interface android.hardware.wifi@1.2::IWifi default
+ interface android.hardware.wifi@1.3::IWifi default
+ interface android.hardware.wifi@1.4::IWifi default
class hal
capabilities NET_ADMIN NET_RAW SYS_MODULE
user wifi