Community discussions

MikroTik App
 
ishanjain
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Sep 29, 2020 8:40 am

Connections from smartbulb stuck at syn_received

Sun Sep 25, 2022 6:17 pm

Hello everyone!

I am using a Mikrotik RB450GX4(version 7.5) and Omada EAP245 for Wifi.

I have 3 Tuya products, 1 Smart bulb and 2 Smart plugs. All three are running into the exact same problem.


I am trying to pair the devices with the Tuya app on my phone. The phone is connected to a network created in the mikrotik router. The pairing process fails and throws an error like, "device timed out".

By capturing packets on the router, I can see that the bulb tried to talk to,
13.233.239.58:443
13.235.158.83:443
and both of these connections were stuck at syn-ack.
The devices sent a syn to the those address, Those addresses replied with a syn-ack, Then the router tried to send syn-ack to the devices and failed. Ultimately, This connection is not established and pairing process fails.

All 3 devices work perfectly fine when I create a hotspot on my phone/tablet and try to pair them to the app by connecting them to that hotspot. The latency to these devices as I am pairing is usually 10-50ms and sometimes spiking to 5000ms.

I have searched the forum and asked in other groups but I have not been able to figure out why these syn-ack is not arriving at the bulb. I can reach the https servers on those addresses from another device in the same vlan just fine but I connections from the bulb/plugs gets stuck. I also can't blame the bulb/plugs because they work perfectly fine with my phone's hotspot.

I have also tested the devices with other Wifi APs(Archer A6, C20, A7) and I have the same issue with all 4 APs.


So, Now I am out of ideas of why this is not working and I am interested to know if anyone here has an idea of what may be happening?

The network topology? looks like, Mikrotik router -> TP Link SG2210MP Switch -> Omada EAP 245 -> Bulb
 
ishanjain
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Sep 29, 2020 8:40 am

Re: Connections from smartbulb stuck at syn_received

Sat Feb 04, 2023 6:48 pm

I had given up on using all of my tuya based products but tried it again today and literally all the connections from tuya products still get stuck at syn received and I am no closer to finding out why this happens. :(
 
ishanjain
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Sep 29, 2020 8:40 am

Re: Connections from smartbulb stuck at syn_received

Sat Feb 04, 2023 8:16 pm

wireshark.png

This was captured on all interfaces. 10.0.10.19 sends a SYN packet to 3.6.251.0, It's masqueraded to the public address of WAN and then sent to destination. The destination sends back syn+ack. Routers switches it back to the LAN address and sends SYN+ACK to 10.0.10.19.

Some how, 10.0.10.19 never receives this syn+ack packet and sends a syn packet again. This keeps happening in a loop.

While this was happening, I had ping 10.0.10.19 running separately and it was working perfectly fine. (~50-70ms latency, 0 packet loss).

I thought maybe this is an issue with the device at 10.0.10.19 but every thing works perfectly(no stuck connections) if I make a hotspot on my phone and try to connect that device to my phone's network.
You do not have the required permissions to view the files attached to this post.
 
ishanjain
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Sep 29, 2020 8:40 am

Re: Connections from smartbulb stuck at syn_received

Sat Feb 04, 2023 9:13 pm

My home network diagram
network.phy.diagram.excalidraw.compressed.png
The tuya Device is connected to Archer A6 #2.
In the packets captured on the router, I see it tries to send the SYN+ACK after masquerading to 10.0.10.19. I am not sure if it's dropped by any firewall rules? I had tried after disabling all rules and it still didn't work. This packet will go from Router -> SG2210MP -> Archer A6 #2 running Openwrt -> Tuya device. I ran a packet capture on the Archer A6 and I don't see any packets coming in.
wireshark2.png
So far, I have no reason to suspect SG2210MP could be responsible here since in the past I have tried it without involving that switch and I had this problem and I can reach the address `3.6.251.0` or `3.110.250.34` from Archer A6 #2 or any other non-tuya devices down stream from SG2210MP.

I have also tried capturing ALL packets with src/dst address 10.0.10.19 and IP Protocol=ICMP and I did not see any packets except for the echo request/reply packets(because I was testing connection by pinging the device). I tried this thinking maybe it was generating ICMP messages some where? but that was not the case.
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: Ahrefs [Bot] and 76 guests