Community discussions

MikroTik App
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Connection lost when lease extended?

Wed Oct 30, 2024 2:53 pm

I have just had a Viessmann Vitodens 200-W (Type B2HF) gas boiler installed. It has Wi-Fi (and Zigbee).

I have a hAP ax³ and a cAP ax running RouterOS 7.16.1 with CAPsMAN.

The boiler connects using DHCP and operates without problem for around an hour. Connection is then lost and the boiler reports Connection is being established. It doesn't reconnect. Turning the boiler off and on allows the connection to be re-established.

Looking at the log with DHCP debugging enabled shows that the DHCP lease is extended at about the time the connection is lost.

Do other devices exhibit similar behaviour? Is there a work around?

(I also have a Viessmann Vitotrol 300-E which also has Wi-Fi (and Zigbee) which does not exhibit this problem).
 
erlinden
Forum Guru
Forum Guru
Posts: 2592
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Connection lost when lease extended?

Wed Oct 30, 2024 3:05 pm

To rule out DHCP, can you change lease time?
Could you share your config?
/export file=anynameyoulike
Remove serial and any other private info.
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Wed Oct 30, 2024 6:25 pm

Had a look at the current config (for the hAP ax³). Here's the only line containing lease-time:
add interface=bridge lease-time=10m name=defconf
The problem definitely seems to occur every 60m which is puzzling.

Here are the lines referring to the boiler:
/interface wifi access-list
[...]
add action=accept comment=vitodens disabled=no mac-address=B8:74:24:3A:AA:F4
[...]
/ip dhcp-server lease
[...]
add address=192.168.199.40 comment=vitodens.home.verminmedia.com mac-address=\
    B8:74:24:3A:AA:F4
[...]
/ip dns static
[...]
add address=192.168.199.40 comment=defconf name=vitodens.home.verminmedia.com \
    type=A
[...]
Don't know if setting up the lease in this way uses a different lease time. Might need to use the packet sniffer to capture the DHCP traffic to see if that provides further clues.
 
erlinden
Forum Guru
Forum Guru
Posts: 2592
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: Connection lost when lease extended?

Wed Oct 30, 2024 6:48 pm

A lease time of 10 minutes is :lol:
Adjust it to what makes sense, i.e. 4 or 8 hours. Or more.

Is adding to the address list necessary?
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Thu Oct 31, 2024 12:10 pm

A lease time of 10 minutes is :lol:
Adjust it to what makes sense, i.e. 4 or 8 hours. Or more.
I blame the Mikrotik configuration example: https://help.mikrotik.com/docs/spaces/R ... DHCP#Setup: "lease time: 10m" :?
 
eddieb
Member
Member
Posts: 353
Joined: Thu Aug 28, 2014 10:53 am
Location: Netherlands

Re: Connection lost when lease extended?

Thu Oct 31, 2024 12:19 pm

some devices even ignore such a short lease-time ...
gives all kinds of unexpected results
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Thu Oct 31, 2024 5:35 pm

some devices even ignore such a short lease-time ...
gives all kinds of unexpected results
I have captured debug logs for dhcp and wireless to files from power up to the loss of connection. For DHCP, it starts with the expected discover; offer; request; ack. This is followed roughly every 5m by request; ack for a total of 13 times. Even with the short lease-time it appears to be behaving as expected. Might not be a DHCP issue.

Here are the wireless debug lines:
Oct/31/2024 12:27:04 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 associated, signal strength -21
Oct/31/2024 13:33:25 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 disassociated, connection lost, signal strength -19
Oct/31/2024 13:34:22 wireless,debug 56:6B:21:E7:B0:CE@wifi1 disassociated, SA Query timeout, signal strength -79
Oct/31/2024 13:34:23 wireless,debug 56:6B:21:E7:B0:CE@cap-wifi1 associated, signal strength -44
Oct/31/2024 13:36:21 wireless,debug 56:6B:21:E7:B0:CE@cap-wifi1 disassociated, SA Query timeout, signal strength -73
Oct/31/2024 13:36:21 wireless,debug 56:6B:21:E7:B0:CE@wifi1 associated, signal strength -68
There is no further boiler traffic after the disassociated, connection lost message.

The other device is my Google Pixel 7 Pro. Plenty of discussion about SA Query timeout on the forum but that doesn't appear to be what is happening with my boiler.

Also plenty of discussion about disassociated, connection lost on the forum. However, they seem to reassociate rather that lock up.

Any suggestions on how to narrow down the problem to Mikrotik, Viessmann or a bit of both?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 12921
Joined: Thu Mar 03, 2016 10:23 pm

Re: Connection lost when lease extended?

Thu Oct 31, 2024 8:02 pm

Here are the wireless debug lines:

Oct/31/2024 12:27:04 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 associated, signal strength -21
Oct/31/2024 13:33:25 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 disassociated, connection lost, signal strength -19

Signal strengths, mentioned here (-19dBm, -21dBm), are worrying me. Are they real? If yes, they are around 20dB too high for WiFi receivers to work comfortably. And this would mean that the boiler device's wifi and AP are almost touching. In this case, try to move AP a meter or two (approx. 5 ft) away from boiler.

If the numbers are not real, then you'd have to investigate into this issue.
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Fri Nov 01, 2024 3:19 pm


Signal strengths, mentioned here (-19dBm, -21dBm), are worrying me. Are they real? If yes, they are around 20dB too high for WiFi receivers to work comfortably. And this would mean that the boiler device's wifi and AP are almost touching. In this case, try to move AP a meter or two (approx. 5 ft) away from boiler.

If the numbers are not real, then you'd have to investigate into this issue.
Real but not realistic! When I first encountered the problem the cAP ax was roughly six metres away from the boiler through a blockwork wall. To see if the problem might be signal strength related I moved the cAP ax much closer (probably too close). The permanent deployment of the cAP ax will be at a more reasonable distance.

I turned off the cAP ax so that only the hAP ax³ was available. Here's what was in the logs:
Oct/31/2024 12:27:04 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 associated, signal strength -21
Oct/31/2024 13:33:25 wireless,debug B8:74:24:3A:AA:F4@cap-wifi2 disassociated, connection lost, signal strength -19
Oct/31/2024 21:58:46 wireless,debug B8:74:24:3A:AA:F4@wifi2 associated, signal strength -71
The last mention of the boiler MAC address in the logs was a DHCP ack at Oct/31/2024 22:58:34. Again, the connection was lost after about an hour but, this time, there was no corresponding wireless,debug message in the logs. The boiler remains stuck reporting Connection is being established.
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Fri Nov 01, 2024 5:04 pm

For the hAP ax³ the WinBox WiFi page shows the boiler as connected and the Uptime field is being incremented. However, the DHCP lease has expired because it timed out (waiting for a DHCP request?). Puzzling!
 
jaclaz
Forum Guru
Forum Guru
Posts: 1926
Joined: Tue Oct 03, 2023 4:21 pm

Re: Connection lost when lease extended?

Fri Nov 01, 2024 6:06 pm

Side question, but do you really-really need DHCP client on the boiler?
I mean, if you don't go around with your access point (be it the ax or the ax2) the boiler should be pretty much static.
Cannot you set it to a static address and see if the disconnecitons continue or stop?
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Sun Nov 03, 2024 12:45 pm

Side question, but do you really-really need DHCP client on the boiler?
I mean, if you don't go around with your access point (be it the ax or the ax2) the boiler should be pretty much static.
Cannot you set it to a static address and see if the disconnecitons continue or stop?
Just following the requirements in VITODENS 200-W: Installation and service instructions for contractors (relevant page attached). The Operating instructions give directions for setting up a static IP address. May give it a try in future.

However, the boiler is currently reporting: High limit safety cut-out has responded - Burner in a fault state. Notify contractor. No heating and hot water. Not great for a brand new boiler!
You do not have the required permissions to view the files attached to this post.
 
jaclaz
Forum Guru
Forum Guru
Posts: 1926
Joined: Tue Oct 03, 2023 4:21 pm

Re: Connection lost when lease extended?

Sun Nov 03, 2024 2:50 pm

If it is a new installation, it doesn't surprise me that much, it is not unusual that the settings need to be tweaked/tuned, these new devices have a lot of "delicate" settings.

Only anecdotal data, and likely completely unrelated to your case, but not so long ago I had a largish Viessman boiler replaced (of course they don't make anymore the old model that was installed and worked just fine) in a set of two.
The new one is one of the "smart" ones with LCD screen and stuff (as opposed to two mechanical switches and a thermal regulation knob of the old one).
After having been initially installed and tested fine, it started behaving queerly, in a few days time.
After a lot of troubleshooting it came out that in some cases the pressure on the gas line went down a little bit (when the older boiler went "full blast") and if the new one decided to fire on at that exact moment, it would fail because the sensor for gas pressure sensed it only a little bit lower than it really was (but low enough to trigger some sort of safety mechanism or whatever that inhibited the ignition).
Even changing the settings for this sensor didn't work reliably.
In the end the last two meters or so of gas pipe were changed from 1 1/4" to 2" to act as a kind of buffer, and it has not given a problem since.
 
h1ghrise
newbie
Posts: 44
Joined: Fri Apr 14, 2023 5:05 pm
Location: Vienna, Austria

Re: Connection lost when lease extended?

Mon Nov 04, 2024 2:42 pm

I had a similar issue with my IoT devices.
They kept disconnecting at random intervals (mostly when DHCP lease was renewed). Issue was solved when I put a static IP address.
I suppose (only my interpretation) is that some embedded systems (i.e. ESP8266/ESP32, which are common in IoT devices) are not handling DHCP renewals nicely.
Before I resolved the issue by assigning static IPs, I suspected the Group Key renewal as a culprit.
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Tue Nov 05, 2024 7:32 pm

Before I resolved the issue by assigning static IPs, I suspected the Group Key renewal as a culprit.
Best Group Key Rotation Interval Setting for Router: 0 or 3600? suggest that Cisco and Netgear routers use a Group Key Rotation Interval Setting of 3600 seconds. Might explain why the Wi-Fi connection is lost after around an hour?

However, the Mikrotik documentation for WiFi states that group-key-update Defaults to 24 hours. There is no group-key-update set in my current configuration. Curiouser and curiouser!
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Sat Nov 09, 2024 3:08 pm

Boiler back in action. Tried increasing lease-time to one day (86400 seconds). Good news is that the connection stayed up for well over one hour. Bad news is that when I checked this morning the connection was down and reporting Connection is being established. This was with just the hAP ax³.

Here are the wireless debug messages:
Nov/08/2024 11:40:01 wireless,debug B8:74:24:3A:AA:F4@wifi2 associated, signal strength -69
Nov/08/2024 17:48:01 wireless,debug B8:74:24:3A:AA:F4@wifi2 disassociated, connection lost, signal strength -69
Nov/08/2024 17:48:01 wireless,debug B8:74:24:3A:AA:F4@wifi2 associated, signal strength -71
Nov/08/2024 19:05:43 wireless,debug B8:74:24:3A:AA:F4@wifi2 disassociated, connection lost, signal strength -68
Nov/08/2024 19:05:43 wireless,debug B8:74:24:3A:AA:F4@wifi2 associated, signal strength -67
Nov/08/2024 19:07:43 wireless,debug B8:74:24:3A:AA:F4@wifi2 disassociated, connection lost, signal strength -68
Nov/08/2024 19:07:43 wireless,debug B8:74:24:3A:AA:F4@wifi2 associated, signal strength -67
Here are the times the MAC address appears in the dhcp debug messages:
Nov/08/2024 11:40:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 11:40:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 11:40:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 11:40:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 17:48:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 17:48:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 17:48:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 17:48:01 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:05:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:05:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:05:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:05:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:07:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:07:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:07:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:07:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/08/2024 19:07:43 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/09/2024 07:07:35 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Nov/09/2024 07:07:35 dhcp,debug,packet     chaddr = B8:74:24:3A:AA:F4
Don't know when the connection was lost.

The WinBox WiFi panel showed an uptime of 17:50:00 at 12:57:10 GMT for the boiler and the uptime counter is still incrementing.

The WinBox DHCP Server panel showed the lease for the boiler as still active with an address of 192.168.199.40.

Very odd!
 
JohnConnett
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Thu Feb 23, 2023 2:27 pm

Re: Connection lost when lease extended?

Sun Nov 10, 2024 2:23 pm

This was the sequence of DHCP operations:
Nov/08/2024 11:40:01 DISCOVER, OFFER, REQUEST, ACK
Nov/08/2024 17:48:01 DISCOVER, OFFER, REQUEST, ACK
Nov/08/2024 19:05:43 DISCOVER, OFFER, REQUEST, ACK
Nov/08/2024 19:07:43 RELEASE, DISCOVER, OFFER, REQUEST, ACK
Nov/09/2024 07:07:35 REQUEST, ACK
I don't know enough about DHCP to know if the RELEASE just two minutes after the ACK is unusual?

I have increased lease-time to eight days (691200 seconds), turned the boiler off then turned the boiler on. Will see how long this stays connected.

Who is online

Users browsing this forum: No registered users and 2 guests