GL-S200 thread commissioning

Hi @t1nux
Disabling IPv6 on the main router will not affect the Thread subnet.
Can you capture the IPv6 address allocation process on your PC with Wireshark when IPv6 is enabled on your main router?

Hi @lancer
I totally agree that the main router's IPv6 settings do not influence the thread network, but routing to the thread network is obviously influenced by certain IPv6 settings on the main router, as access to the thread network only works for the weird conditions I described above.
I do not know where the issue lies, but it must be either the main router or the S200. I hope we can find a working and reliable solution soon, as I now have added a number of additional matter/thread devices, and I would like to further extend my smart home based on matter/thread.

I will see how to obtain the wireshark log for IPv6 address allocation in the next days.

Sorry, I did not manage to get the wireshark logs. However, I am pretty sure the issue is with the S200 and not the main router, my PC or the home assistant server, see below for details.

During the following tests I was continuously pinging a thread device in the thread network provided by wpan0 on the S200. Pinging was initiated from my PC on the main network. The main router (not the S200) is set to native IPv6 and was rebooted quite some time before starting the tests. The S200 it also connected to that same main network on the WAN port.

When I start the test, I reboot the S200. Until the boot process is done, I obviously do not get pings through, but right after rebooting the S200 is done, I am getting a couple of successful pings. This is not successful for more than maybe 20 sec. After that, I cannot get any more successful pings.

If I now go to the luci interface in the S200, to Network > Interfaces, and I restart WAN6, I can again get a few successful pings from the thread device.
As I did not change anything on the main router or my PC and just made a changes on the S200, the issues must lie there.

I do not know how to troubleshoot this, but I am kindly asking for help on how to do this, as it is quite clearly an issue on the S200. I can provide outputs from the luci interface, or from commands executed via SSH.

Thanks in advance, t1nux

Hi @t1nux
Before commissioning, you need to make sure your phone can receive the mDNS service information sent by S200, and the OMR address of S200 can be pinged from your phone. I also tested a Raspberry Pi TBR and an Apple Homepod mini connected directly to the main router, and they also failed to commission the Matter device. Is the IPv6 address assigned by your main router a global ipv6 address?


image

Hi @lancer

I should probably rename the topic of this whole conversation. I initially thought it was about commissioning, but now I know it is about reaching (eg. pinging) the thread devices when certain IPv6 setting are in place. I will try to rename it later.

So, I can get everything working (see my post from August 4), but the conditions are unstable, temporary, and not persistent between reboots of the S200 or the main router. All info is given in that post. In this unstable but working state, everything works, i.e. commissioning (via mobile phone), pinging (from PC or phone), and general operation of thread devices from home-assistant.

As I wrote in my post form August 21, it seems clear that the issue is related to the S200. Please have a look at that post for all the info.

And for you question from your last post, in normal IPv6 operation (i.e. when things are not working), the S200 does seem to get a global IPv6 address. However, I think this is also the case in the "working" case, see the data in the post from August 04 (ip addr output from the S200).

Hi @t1nux
The new firmware version is coming soon. Could you help try it out before the official release?

Hi @lancer

Yes, I can try the new firmware. Currently, I have the most recent version installed (4.1.5), and there is no beta version that is more recent on the FW download page. If you could upload a beta version, I'd be happy to give it a try.

Hi @t1nux
I have uploaded the S200 4.7.0-0500 beta firmware, you can download from GL.iNet download center .

This is still not working using 4.7.0-0500 beta. The issues actually got worse, because the work-around trick I mentioned of switching the main router to stateful does not work anymore.

When trying to continuously ping a thread device with the not-working (but default) settings on the main router, restarting the WAN6 device still gets a few pings through.

The issues with the S200 remains.

PS: I'm using eth0 as backbone router interface. I mentioned this in one of the posts, I just wanted to mention it again.

Hi @t1nux
Could you please check this issue? Why can ot-ctl ping work, but sys ping fails? · Issue #10677 · openthread/openthread · GitHub

Hi @lancer

I had a look at the issue. It seems the route that was missing for you is there in my case. I do not know what else to try, but if you want me to run any commands on the S200 via SSH I can do that and post the output here.

PS: I went back to firmware 4.1.5 as the trick described in my post from Aug 4 did not work anymore on 4.7.0.

Hi @t1nux
Can you give me the results of using ping and ot-ctl ping commands to verify on the S200?

Hi @lancer

Sorry for the late reply. Here are the results. Please read the last point carefully, as that pretty much shows that the issue must be with the S200. This was also explained already in my post from August 21.

main router: IPv6 set to stateful (thread working)

S200

thread IPs

  • fd12:6e50:9cad:1:31f5:afbb:782b:27a3
  • fd7e:31c9:d496:111c:0:ff:fe00:fc11
  • fd7e:31c9:d496:111c:0:ff:fe00:fc10
  • fd7e:31c9:d496:111c:0:ff:fe00:fc38
  • fd7e:31c9:d496:111c:0:ff:fe00:fc00
  • fd7e:31c9:d496:111c:0:ff:fe00:e800
  • fd7e:31c9:d496:111c:1128:b8e4:aee3:153
  • fe80:0:0:0:442:e820:549e:753a

Eve Energy

thread IPs

  • fd7e:31c9:d496:111c:0:ff:fe00:c400
  • fd12:6e50:9cad:1:5301:e885:c445:1b33
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a
  • fe80:0:0:0:b459:61d9:e9aa:33e7

pinging from PC

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> not working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> not working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> not working

pinging from S200

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> not working

ot-ctl pinging from S200

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> working

main router: IPv6 set to stateless (thread not working)

pinging from PC

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> not working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> not working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> not working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> not working

pinging from S200

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> not working

ot-ctl pinging from S200

  • fd7e:31c9:d496:111c:0:ff:fe00:c400 -> working
  • fd12:6e50:9cad:1:5301:e885:c445:1b33 -> working
  • fd7e:31c9:d496:111c:cde8:c58a:cd95:992a -> working
  • fe80:0:0:0:b459:61d9:e9aa:33e7 -> working

issues

As you can see, I can get thread working, if the main network router is set to stateful IPv6, or if I disable IPv6 on it. However, that only works, if I switch from stateless to stateful while the S200 is running. If either the main router or the S200 is rebooted, it does not work anymore.

important to note

Also, if I set my main router to stateless (ie. thread not working) and I reboot the S200, right after the S200 is finished rebooting, I get a few (~20) successful pings from my PC to thread devices, but that stops very quickly. Similarly, if I use the luci interface of the S200, go to Network > Interfaces, and I restart WAN6, I can get a few successful pings with same stateless configuration on the main router. I also explained this in my post from August 21. I think this clearly shows that the issue originates from the S200.
Would it be possible to evaluate this a bit more closely? Could I test this with an S20 instead? Is there any more info I can provide?
I feel the thread part on the S200 is working, and that the issue lies with the communication to the main LAN, but it must clearly be related to the S200.
Also, please note also that I already tested the beta firmware, with which the issue got worse and even the trick with switching to stateful on the main route did not work anymore.

I would really appreciate if you could take a closer look at this. Thank you!

Hi @t1nux
As shown in the figure below, the PC is configured with a routing table to the Thread network, so the OMR address of the Thread device can be pinged on the PC.




Can you check the PC has configured routable IPv6 addresses and routes to the IPv6 prefix assigned to the Thread network?

Wishing you a Merry Christmas!

1 Like

Hi @t1nux
Maybe I know the root cause. The main router allocates the global IPv6 address prefix and uses a stateless address. However, OTBR uses the automatically generated OMR address prefix and does not use the global IPv6 address prefix allocated by the main router, which causes this problem.

In theory, OTBR tracks the suitable on-link prefixes on the infrastructure network. A suitable on-link prefix must have the on-link flag set and either the auto-configuration flag or DHCPv6 preferred flag set. But it is not.
I am not sure whether the OT stack has implemented this correctly, and I have already feedback on this to the official OT developers.

Currently, IPv6 is not widely used in my area, many situations are uncertain. Therefore I can only offer a temporary solution.
You can use the ifstatus wan6 command on the S200 to view the ipv6-prefix information assigned by the main router. Then use the ot-ctl prefix command to configure it.

Hi @t1nux
We have updated beta firmware 4.7.0-0501_beta1 for this issue, can you try it?

Hi @lancer

We are getting closer to a solution I think.

I installed 4.7.0-0501_beta1. I can now ping (and also generally connect using HA to) the thread devices with default setting on the main router.

However, thread has become very unstable on the S200 now. I don't know if this is related to the changes related to this or other changes in the update to 4.7, but it now happens often that I lose connectivity to some or all of the thread devices. When that happens they also show as offline in the web UI on the S200. Most times, a simple reboot of the S200 helps to make the thread devices available again, but sometimes I need to restart the S200 every few hours or so.

Here is a voltage chart of the Eve Energy showing the downtimes. I installed the new firmware on January 7, I think.

Please let me know if I can provide more info.

EDIT: It sometimes also happens, that devices become available again, after having gone offline. But that doesn't happen often, mostly, I have to reboot the S200 again.

And also, this instability for thread, that also shows in the S200 webUI, didn't occur in the 4.5 firmware.

Hi @t1nux
Can you help confirm whether the IPv6 address prefix assigned from the ISP or main router changes frequently? You can log in to S200 and use ifstatus wan6 command to record the ipv6-prefix field.

Hello @lancer
Via UPnP, HA logs the IP of the main router. That is given as the color bar at the very top in the following image, together with the logged voltage of the Eve thread device. I clipped the actual IP for obvious reasons, but the color changes if the IP changes, so this should be enough.


This is IPv4 though, as UPnP does not seem to log the external IPv6 address. I'm writing down the IPv6 and prefix from now on to be sure. If I need to restart the S200 again, I'll log these parameters every time.

I guess the IPv6 address will not change more often than the IPv4 though. So, I would assume the thread stability is not related to that. But we won't know for certain until after I show the logged data. Probably in a few days.

Hello again

Shortly after my post from yesterday, one of the thread devices became unavailable. Both the IPv6 address or route did not change on the S200 or on the main router. This time, also a reboot of the S200 did not solve the issues, and I had to re-add delete the device in the S200 UI and in HA and re-add it using HA. Re-adding worked very smoothly though.
This morning, another thread device was unavailable. Also this time a reboot of the S200 did not help. I will wait a few hours to see if it comes back before I re-add it...
Still, none of the current issues occurred with 4.5. Any idea what is going on?

It also seems that the data in the "thread devices > thread topology" section in the UI of the S200 is somewhat different to 4.5, as, it seems, lots of data is missing. It almost seems to me as this is a new issue.