Commit graph

35 commits

Author SHA1 Message Date
Yakun Xu
9501bc2d46 Merge "Thread: simulate radio over Ethernet on Cuttlefish" into main am: ca7d810a50 am: a3a516bd61
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3079506

Change-Id: I77f082cbdb1a94dcde437bf5142e9a6f8472ba92
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-17 04:21:32 +00:00
Yakun Xu
ca7d810a50 Merge "Thread: simulate radio over Ethernet on Cuttlefish" into main 2024-05-17 03:52:14 +00:00
Yakun Xu
c7897c3beb Thread: simulate radio over Ethernet on Cuttlefish
This commit simulates Thread radio over Ethernet on cuttlefish.

This enables two cuttlefish instances to communicate over Thread.

Test: presubmit
Bug: 329188649

Change-Id: I48b20a9eb0bbc535e67266ca9cf7e4bbc5a676d4
2024-05-16 16:30:34 +08:00
Treehugger Robot
05d18ed954 Merge "[Thread] Add VTS config" into main am: 0ed9be7fbf am: e77efa63f9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3074046

Change-Id: If1ecb54b58db0b69d77de86323d0e49237c08efa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-08 03:33:10 +00:00
shihchienc
9f87974b00 [Thread] Add VTS config
We need to make sure there is no duplicate binder call to HAL layer.
This patch fix this.

Test: atest VtsHalThreadNetworkTargetTest
Bug: 338556737
Change-Id: Ic414ec1099049ba5e7a0c17baffcd467aa910034
2024-05-03 11:26:48 +00:00
Treehugger Robot
52607437b1 Merge "Thread HAL: support dynamic radio URLs" into main am: db7bab9eba am: 8517eacd26
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3064585

Change-Id: I49f0f8a5afd56fa29c974af406f8f25448995301
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 01:54:27 +00:00
Yakun Xu
c1d3f9a6d2 Thread HAL: support dynamic radio URLs
This commit enables support of dynamic radio URLs, so that the radio
URL can be runtime generated.

Bug: 329188649
Test: presubmit
Change-Id: I11a0d3de47609d59ba50c8b5317c8238f09e18dd
2024-04-29 19:11:42 +08:00
Treehugger Robot
ecdd641b0f Merge "[Thread] make sure buffer size is enough" into main am: 82bb6fcfdc am: fad8a7b6d0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3039092

Change-Id: I549ffb080560c5385c36111f72f6a7314a088971
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 08:53:10 +00:00
shihchienc
cb8a9d74a0 [Thread] make sure buffer size is enough
inotify event size is dynamic, we need to make sure read would not
return error when having inotify event.

Bug: 333829392
Test: manual check `Invalid argument` error won't happen
Change-Id: I3cac8d1519659c6b1b53c1d41013818adab876c7
2024-04-11 06:20:38 +00:00
Treehugger Robot
dc7398fa6f Merge "[threadnetwork] update the platform log API usages and implementations" into main am: f02c7e0b2f am: ce3ffbc5a2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3029147

Change-Id: Id6b7874cb4a7b82a52887da567ac028f315d9dc7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-09 07:19:06 +00:00
Zhanglong Xia
3c153add59 [threadnetwork] update the platform log API usages and implementations
The latest OpenThread has updated the usage of the platform log APIs.
This CL updates the log APIs usages and implementations.

Bug: b/333301206
Test: Run ThreadNetwork HAL and check logs.
Change-Id: I0c0999edbed1c041e2752d195e753d02b2c734f4
2024-04-08 17:07:57 +08:00
Devin Moore
a8efdb127e Vendor API level 202404 is now frozen
Ignore-AOSP-First: VINTF 202404 Finalization
Bug: 279809333
Test: build
Change-Id: Ie6d38d27a287e258c30516e0030ad8c931d06432
2024-02-20 21:05:23 +00:00
Treehugger Robot
57220562b0 Merge changes Ie1b0c687,I4e6dfdfa,I2da14a56,I47041785,I34388f76, ... into main
* changes:
  [Thread] Add socket interface support in thread chip
  [Thread] Implement read on socket interface
  [Thread] Implement write on socket interface
  [Thread] Wait until socket created to create interface
  [Thread] Implement init/deinit socket interface
  [Thread] Initialize socket interface
2024-02-01 08:45:41 +00:00
shihchienc
27711c3195 [Thread] Add socket interface support in thread chip
Bug: 313425570
Test: build pass & manual test
Change-Id: Ie1b0c687cf529659521f1dd1457fcda35af1bf49
2024-02-01 02:31:31 +00:00
shihchienc
1623351bc0 [Thread] Implement read on socket interface
Bug: 313425570
Test: build pass & manual test
Change-Id: I4e6dfdfa73f7145e8f36d05abf1531d7796b4b9e
2024-02-01 02:31:28 +00:00
shihchienc
5b2cd32368 [Thread] Implement write on socket interface
Bug: 313425570
Test: build pass & manual test
Change-Id: I2da14a563b795b0044362c1c248b53c1d3505d39
2024-01-31 08:56:33 +00:00
shihchienc
005f602d23 [Thread] Wait until socket created to create interface
Bug: 313425570
Test: build pass & manual test
Change-Id: I4704178519ed032ad352a3ab252e80478c179574
2024-01-31 07:37:55 +00:00
shihchienc
31ecb33558 [Thread] Implement init/deinit socket interface
Bug: 313425570
Test: build pass & manual test
Change-Id: I34388f76972f9b88f390a04b100c2fbf61019a1d
2024-01-31 07:35:20 +00:00
shihchienc
429bf4a484 [Thread] Initialize socket interface
Bug: 31342557
Test: build pass & manual test
Change-Id: I9d2ef2f6da8d9c856498f4d89423f76c369cbc62
2024-01-29 09:53:20 +00:00
Zhanglong Xia
558eb0b696 Update VTS test for the function hardwareReset()
The function `hardwareReset()` throws
`EX_UNSUPPORTED_OPERATION` if the Thread radio chip doesn't
support the hardware reset. Current VTS test assumes that the
Thread radio chip must support the hardware reset.

This CL updates the VTS test to verify the return value
`EX_UNSUPPORTED_OPERATION`.

bug: b/320393041
Test: run vts -m VtsHalThreadNetworkTargetTest
Change-Id: I7b0b2a4e850a1eda085a6d6c24cdd8aae6498aac
2024-01-16 14:40:53 +08:00
Zhanglong Xia
7760812a21 remove the com.android.threadnetwork from apex_available list
The ot-daemon has been moved from the com.android.threadnetwork to
com.android.tethering. No need to add the com.android.threadnetwork
to the apex_available list.

Bug: b/312573093
Test: Build
Change-Id: I2216e0d2a1d30738c405a174909d174cbc1f0bc7
2023-11-22 09:45:37 +08:00
Zhanglong Xia
5cc95e3373 update the thread_radio based on latest definition of SpinelInterface
OpenThread has changed the functions of SpinelInterface, which
causes the build errors of the Thread HAL service. This commit
updates the thread_radio based on the latest definition of
SpinelInterface.

Bug: b/304914440
Test: Build and run Thread stack on cuttlefish.
Change-Id: Ie92aedc925c771748424bdbae0ae1d340b154bb2
2023-10-12 15:26:50 +08:00
Zhanglong Xia
71d812a897 Merge "Rename threadnetwork-service-sim.rc to threadnetwork-service.rc" into main 2023-09-13 14:20:36 +00:00
Zhanglong Xia
c1c8836d22 Rename threadnetwork-service-sim.rc to threadnetwork-service.rc
Bug: 297800630
Test: Build and run Thread Network HAL on cuttlefish.
Change-Id: Id71481c125c752fefac2cedea098cb8b4679c3be
2023-09-13 18:19:52 +08:00
Kangping Dong
b559648555 [Thread] move Thread into com.android.tethering
Test: build
Bug: 296211911
Merged-In: I52320be04ceb9855a37db59b7ef961d2c8555357
Change-Id: Iaf32f4517e8f729576cd274983562940cf4e191d
2023-08-29 02:25:14 +00:00
Jooyung Han
de60dd2ae5 Merge changes from topic "threadnetwork-apex" into main
* changes:
  Move threadnetwork HAL to VAPEX
  Mark threadnetwork HAL as updatable-via-apex
  Add apexkey "com.android.hardware"
2023-08-25 07:17:09 +00:00
Jooyung Han
f8bd1f0b00 Move threadnetwork HAL to VAPEX
com.android.hardware.threadnetwork is a new VAPEX containing
threadnetwork HAL. It also includes ot-rcp.

Bug: 296966113
Test: vts-tf > run vts -m VtsHalTheadNetworkTargetTest
Change-Id: Id2028d755f9b0dcc06ccd817bddf3195efb5595b
2023-08-24 17:40:46 +09:00
Zhanglong Xia
3297a174d6 remove manually freeing the variable mDeathRecipient
The variable `mDeathRecipient` will automatically free the allocated
memory when it is destructed. This CL deletes the code for manually
releasing the variable `mDeathRecipient` to avoid the same variable
being freed twice.

Bug: 296617022
Test: Run fuzzer test.
Change-Id: I733f7f8d26e48a9434d41c5098f39ad91208abeb
2023-08-24 15:38:05 +08:00
Zhanglong Xia
2f5e431e3f Merge "fix the Thread Network fuzz testing error" into main 2023-07-11 08:10:50 +00:00
Zhanglong Xia
a6165dcccf change the Thread Network HAL api from 'reset' to 'hardwareReset'
This CL changes the API from 'reset' to 'hardwareReset' to make the
the definition of the API clearer. This CL also optimizes the Thread
Network HAL default implementation.

Bug: 289867661
Test: Run Thread stack on cuttlefish.
Change-Id: Id742453d9d7a0d369ac8f16905efdacfcfba1dbc
2023-07-07 11:22:57 +08:00
Zhanglong Xia
7f7e8647fa fix the Thread Network fuzz testing error
The current fuzz testing comunicates with the Thread radio chip
simulation program `ot-rcp`. The 'ot-rcp' is not installed by all
devices, which causes the fuzz testing program is unable to find
the program '/vendor/bin/ot-rcp'.

This commit enables the HAL to talk to the '/dev/null' to avoid
'/vendor/bin/ot-rcp' not being found.

Bug: 289627270
Test: Run the fuzz test on cuttlefish
Change-Id: If410d7d75abe05c7c2d2c82fa0450e925b9a48bb
2023-07-06 13:45:23 +08:00
Zhanglong Xia
7ae6d6f4ff add Spinel SPI interface support
This commit enables the Thread Network HAL to support the Spinel
SPI interface.

Bug: 277286756
Test: Build and run otbr-agent on the emulator.
Change-Id: I6726eead5686f0afb33e5e2035ebc9021eca5afa
2023-07-03 11:59:17 +08:00
Zhanglong Xia
5c027015c3 add fuzz test and fix the Thread network HAL compile errors
Bug: 288825495
Test: Build and run fuzz test in cuttlefish

Change-Id: If14bd95657d6a71737a348ccbc6d1b05bbcc1f4c
2023-06-26 17:55:39 +08:00
Zhanglong Xia
24e527475f Add Thread network HAL
Bug: b/203492431
Test: Build and run the VTS test and run otbr-agent on Android emulator.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b82b0478059dd6203f43d5917558e34fd4ed44d5)
Merged-In: If58b5a8c75e40376ae6c6e93554afe750496308b
Change-Id: If58b5a8c75e40376ae6c6e93554afe750496308b
2023-06-14 22:24:24 +08:00
Kangping Dong
c756ab2e12 add OWNERS file for the threadnetwork HAL project
Test: N/A
Bug: 262471085
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:90bf9095167d0478c0ae4371ac82daf22a4efc73)
Merged-In: I024e7d5c1fe3adf7ae03f77d1580bd1f19f750c1
Change-Id: I024e7d5c1fe3adf7ae03f77d1580bd1f19f750c1
2023-05-26 16:17:38 +00:00