-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Has anyone enabled ot-br-posix / openthread in Android Pie ? #1739
Comments
First of all, there lacks native support for Thread on Android. But the good news, we are working on it.
Switch to
This shows the routes in the If
And check the routing table and make sure our route is there:
Check if the routing table
Most important, make sure there is a rule
You can check the selected route for a destination address with below command:
Make sure it is via Now you should be able to ping your Thread mesh-local address. |
hello @wgtdkp , thank you for the guidance. now I can send SRP server responses. I added the ip rule as you suggested.
these are the addresses the Android host has:
The routes:
the rules (I manually added the 17000 entry)
A CHILD joins the network with the following addresses:
Extended discovery fails when trying to resolve the OMR addr. From the IP rules, It looks that Android host is sending the message over wifi interface. I will run few sniffer captures (ot0 and wlan0) to confirm. I want to check if any OTA CoAP activity to map EID-to-RLOC.
|
|
Is this the DNS-SD service discovery? Please share the failure log |
This is a Matter CASE session establishment between the Android host and a Matter Light-bulb. The Android host is both Matter controller and Thread BR, queries for Matter._tcp operational service. (see log attached) The mDNS query gets resolved with OMR - fd3a:303:44bf:1:656a:6592:f4d0:86ea
So Matter SDK starts sending the Sigma1, but never gets a response. Nothing gets logged in the otbr-agent service, because I suspect it's going over wifi interface. There are other interesting behavior that I see in the logs, like the the wlan0 route table:
I tried lowering the priority of ot0, but the flow still fails in Sigma1 handshake. |
What does
give now? |
What about adding this?
or
|
|
@wgtdkp , Matter over Thread is working now on the Android host. I used the Do you know if the problem is that openthread is not writing the routing policies, or that openthread is trying to write but does not have the correct permissions ? |
Great!
It may be not writing if you didn't configure specific sepolicy rules for openthread, and you should be seeing warning or error logs when adding routes. But even sepolicy rules are added, openthread is adding routes to the main table which is not used by Android (as you see there is no main table in output of |
well, the routing policy is the only change that I need to make it work. From your response, I understood that routing policies are responsibility of the integrator. Similar to the makefile for building the solution. With this said, I need to find the most elegant way to inject those policies during my service start-up. Looks that openthread is being successful in writing the routes in that 1011 table on its own. Can you share a pointer to the openthread code that modifies the route tables? I'd like to deep dive into the details. Thank you again for jumping into this topic and guide me.! |
https:/openthread/openthread/blob/main/src/posix/platform/netif.cpp |
Oh yes, you are right and I missed the routes in table I noticed that the table ID for other networks is simply their network interface name, for example, |
@wgtdkp We've done some more experimenting around with the |
I think Android modifies the Linux kernel to always create a new routing table for a new network and all routes are added to that new table. If you are just looking for building a demo The table ID is constructed by If you are looking for a production solution, better raise an feature request will additional details of your use cases. The Thread team is working on porting Thread to the Android system. |
@wgtdkp I noticed that OMR routes used a netlink file descriptor (message type
Now we generate two routes for each on mesh address, 1) whichever one that the kernel assigns (id = |
@AlanLCollins , |
Will leave it to @AlanLCollins, But here gives a heads up of the official Android Thread support:
It currently doesn't run on Android, but you should be able to in the next months. |
Hello @jacqueshsu , few items to consider:
|
@AlanLCollins , |
so, is there any progress? |
Only the chip-tool is working to support matter over WiFi, and Ethernet, can’t over overthread. |
@jacqueshsu , https:/project-chip/connectedhomeip/blob/master/docs/guides/chip_tool_guide.md |
Yes, but it’s App. I rebuild it for android tool chain, also build dbus and bluez for android. |
I have a Border router on Android Pie. All Link-local messages can be Tx and Rx with no issues. but when it comes to a routable address I get unreachable network error from the libc sockets sendmsg ().
(especulation starts here >> ) I am following a clue that adding new routes might be a process that crosses the boundaries between system and vendor partitions, which normally requires a HIDL interface.
Please share your thoughts/ideas on this matter.
I do get the routes using:
but
ip -6 route show
returns empty. So I tried adding routes manually, but still get the 101 error from sendmsg().ip -6 route add fdde:ad00:beef::/64 dev ot0 metric 1
I might be using incorrect approach, or perhaps I am following the incorrect clue.
The text was updated successfully, but these errors were encountered: