This commit changes OpenThread to simulate on eth1 instead of loopback interface.
Bug: 329188649
Test: presubmit
Change-Id: I80a2842be02c03c5987ac8be8368fa86d7c6bace
This commit adds a basic multi-device test for Thread network.
Two nodes are used. One creates a network and the test verifies
the other one can discover it by Thread scan.
Test: presubmit
Bug: 329188649
Change-Id: Ice03015838bbf6fe836fac48c659a97850a89132
When there are thread devices with DUA in the thread network, BR itself
may not have a DUA address, so it doesn't have route to DUA in the
thread-wpan routing table. When thread device sends a packet from the
DUA to AIL via BR, BR rpfilter would drop the packet. Adding the route
to DUA prefix in thread-wpan solves this problem.
Bug: 335762753
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ThreadIntegrationTest#addPrefixToNetData_routeIsAddedToTunInterface
atest ThreadNetworkIntegrationTests:android.net.thread.ThreadIntegrationTest#removePrefixFromNetData_routeIsRemovedFromTunInterface
Change-Id: I5ca8f7e723116a63718734f72f1b463d9c380329
Listens to airplane mode in Thread system service and enables/disables
Thread accordingly:
1. When airplane is on, disable Thread but don't persist the state
2. If Thread is explicitly enabled when airplane mode is on, Thread will
be enabled and the choice is remembered so that Thread will not be
disabled the next time airplane mode is turned on
3. If Thread is explicitly disabled when airplane mode is on, it will be
considered that the user wants to disable when airplane mode is
turned on, so Thread will be auto disabled the next time airplane
mode is turned on
The behavior described above is consistent with Wi-Fi and bluetooth.
Bug: 322742298
Change-Id: I1750922d9c304095e4114cddfbfe24d70d0e223a
The ping timeout was 0.1s to keep the tests short, this may not be
enough to receive ping reply. When test case expects ping reply to be
received we can use a longer timeout of 1s.
Bug: 338061061
Test: atest ThreadNetworkIntegrationTests:android.net.thread.ThreadIntegrationTest#edPingsMeshLocalAddresses_oneReplyPerRequest
Change-Id: I988fb8973735d9b082c5b8c3c57566b950ae804b
Per aosp/2936050, before Android V, an App needs to explictily set
NET_CAPABILITY_LOCAL_NETWORK to request a Thread network. This CL
updates the test case so it can pass on U devices.
Bug: 336678348
Test: atest CtsThreadNetworkTestCases
Change-Id: I383e34cb94f67286c5a5ab3bad7a11d98c3c2871
The flakiness of this test case is 1%. Disable the test case to prevent
the whole test module from being demotioned.
Bug: 333078476
Bug: 333806992
Change-Id: I820f7a567a7827eee280d0f545c9f654efe5eeaa
Many Thread radio chips need to reduce their transmit power on edge
channels to pass regulatory RF certification. This CL restrcits the
dataset to select a channel from channel 11 to 24.
Bug: b/331708479
Test: atest ThreadNetworkUnitTests
Change-Id: I758c9f33629a0cafcc39bb9fde0ad45ab2699db8
It's too strict that the device must rejoin the network after being
enabled again. This probably don't work on mobile devices. remove the
CTS case for now.
Change-Id: I3a4511f4b2fddddf982206720bbb61f718bc8327
When there is an active OMR address(not deprecated), set the mesh-local
addresses as non-preferred. When there is no active OMR address, set
the mesh-local addresses as preferred.
Bug: 323624146
Test: atest ThreadNetworkIntegrationTests
Change-Id: I969c20ddadfd2d0bd97499da48efc9b32cfa7e0b
There are timing issues in the current
tunInterface_joinedNetwork_otAddressesAddedToTunInterface test that the
OT addresses (e.g. Leader ALOC) may be updated after the device
attaches while the test doesn't wait for the addresses being propagated
to the system_server.
This commit fixes this issue by waiting for the addresses check for 1
seconds before timing out.
Bug: 333078476
Change-Id: If672aab7535f200bd38b50f1ce691b7c32e4cc75
Thread is an unmetered network so we should add this capability.
Bug: 332219983
Test: `bw_costly_thread-wpan` won't show up after this CL.
Change-Id: I0818700e5e7aad04ae15b0d0fd4490ab3f12839e
The test case is flaky because the service is unexpectedly discovered
after it's already unregistered. Probably this is due to that on the
WiFi interface NsdManager somehow didn't hear the goodbye PTR for the
service so it can still 'discover' the service. Limiting the discovery
on test network may help avoid the flake because test network is
cleaner.
Bug: 331878313
Test: https://android-build.corp.google.com/builds/abtd/run/L17400030002839695
Change-Id: Icc09aae00cd90f64428387b97dbd9743140641e5
dumpHexString will create additional representations other than a HEX string, it's suitable for raw logging message but not in a Object#toString.
Change-Id: I184eb10bafa2db1103a4ef5cf82250db52aec278
The country code is lost after the ot-daemon is restarted. This
CL stores the country code to persistent settings and reads
out the previously stored country code to set the country code
when the ot-daemon is initialized.
Bug: b/326021472
Test: atest ThreadNetworkUnitTests
Change-Id: I6982a57ba4845f5a45f3366400c531398e82339e
* Struct.java is removed from net-utils-device-common-bpf and
net-utils-device-common-struct's source list
* Created a lib net-utils-device-common-struct-base for Struct.java
* Updated libs that require Struct.java to include
net-utils-device-common-struct-base.
* Replaced net-utils-multicast-forwarding-structs with
net-utils-device-common-struct in service-connectivity
Bug: 323503345
Test: build tethering module.
Change-Id: I3f60715c3d8043b7569db7612dee9d4fa1ccba59
The queueing mechanism is not needed because b/323300118 is fixed.
Bug: 331512403
Bug: 323300118
Test: atest CtsThreadNetworkTestCases
Change-Id: Id7e868db69668494c1c7e3c473931a3087dc5755
This CL checks if the device supports Thread specific features before
running the test case ThreadNetworkControllerTest. If the device
doesn't support specific features, just skip the test case.
Bug: b/330879812
Test: atest ThreadNetworkIntegrationTests
Change-Id: I1452ab02cc62228102d4a140f39abf13b79542c7
1. the OtDaemonState in OtDaemonCallbackProxy class is not cleared when
ot-daemon dies
2. register ot-daemon state callback within the IOtDaemon#initialize API
to avoid missing state changes between initialize() and
registerStateCallback()
Bug: 330441708
Change-Id: Ice58566582b40a6d25627cf01dec93da61ad3596