[Part solved] Lease not lasting more than 5 mins.
Posted: Thu Mar 31, 2016 7:07 am
Hi, all. I'm looking into my ESPs not responding after a short time. It appears that the ESP is disconnecting from the AP / router after about 5 mins of inactivity even if there is a long time left on the lease. Below are the edited entries from my routers log.
It crossed my mind that a lease of 1440 mins (1 day) might be to long for the ESP to handle if this was being converted into micros (a bit like the maximum length of deep sleep is 71 mins) and my be being truncated to 32 bits. If this was the case and you took the 32 LSB from 1440 x 60 x 1000 x 1000, that equates to 8 mins. That sort of works if the ESP tries to renew the lease at 50% of its duration, tries and fails then disconnects. So I thought if I reduce the duration of the lease issued to 60 mins then this would fall within a 32 bit value, this however doesn't seem to make any difference.
Any thoughts as the log is not showing any activity from the ESP just a disconnection?
Fixed IP issued by the routers DHCP.
Mostly this code https://github.com/forkineye/E131 using the unicast option.
Code: Select all
08:18:54, 31 Mar. (1882218.740000) Lease requested
08:18:54, 31 Mar. (1882218.810000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 1440 min. Link rate: 100.0 Mbps
08:18:54, 31 Mar. (1882218.810000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 1440 min
08:23:57, 31 Mar. (1882521.620000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
5 mins 3 sec lease duration.
08:27:12, 31 Mar. (1882716.400000) Lease requested
08:27:12, 31 Mar. (1882716.500000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 1440 min. Link rate: 100.0 Mbps
08:27:12, 31 Mar. (1882716.500000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 1440 min
08:32:42, 31 Mar. (1883046.920000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 30 sec lease duration..
11:25:39, 31 Mar. (1893423.540000) Lease requested
11:25:39, 31 Mar. (1893423.640000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 1440 min. Link rate: 100.0 Mbps
11:25:39, 31 Mar. (1893423.640000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 1440 min
11:30:31, 31 Mar. (1893715.440000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 52 sec lease duration.
11:38:03, 31 Mar. (1894167.470000) Lease requested
11:38:03, 31 Mar. (1894167.570000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 1440 min. Link rate: 100.0 Mbps
11:38:03, 31 Mar. (1894167.570000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 1440 min
11:43:01, 31 Mar. (1894465.500000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 58 sec lease duration.
11:44:57, 31 Mar. (1894582.140000) Lease requested
11:44:57, 31 Mar. (1894582.220000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 1440 min. Link rate: 100.0 Mbps
11:44:57, 31 Mar. (1894582.220000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 1440 min
11:49:52, 31 Mar. (1894876.980000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 55 sec lease duration.
It crossed my mind that a lease of 1440 mins (1 day) might be to long for the ESP to handle if this was being converted into micros (a bit like the maximum length of deep sleep is 71 mins) and my be being truncated to 32 bits. If this was the case and you took the 32 LSB from 1440 x 60 x 1000 x 1000, that equates to 8 mins. That sort of works if the ESP tries to renew the lease at 50% of its duration, tries and fails then disconnects. So I thought if I reduce the duration of the lease issued to 60 mins then this would fall within a 32 bit value, this however doesn't seem to make any difference.
Code: Select all
12:05:16, 31 Mar. (1895800.640000) Lease requested
12:05:16, 31 Mar. (1895800.740000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 60 min. Link rate: 100.0 Mbps
12:05:16, 31 Mar. (1895800.740000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 60 min
12:10:11, 31 Mar. (1896095.280000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 55 sec lease duration.
12:15:09, 31 Mar. (1896394.020000) Lease requested
12:15:09, 31 Mar. (1896394.090000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 60 min. Link rate: 100.0 Mbps
12:15:09, 31 Mar. (1896394.090000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 60 min
12:23:00, 31 Mar. (1896864.620000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
7 mins 51 sec lease duration.
12:25:16, 31 Mar. (1897001.160000) Lease requested
12:25:16, 31 Mar. (1897001.240000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 60 min. Link rate: 100.0 Mbps
12:25:16, 31 Mar. (1897001.240000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88). Lease duration: 60 min
12:30:12, 31 Mar. (1897296.680000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 56 sec lease duration.
12:38:46, 31 Mar. (1897810.860000) Lease requested
12:38:46, 31 Mar. (1897810.930000) Device connected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88 Lease time: 60 min. Link rate: 100.0 Mbps
12:38:46, 31 Mar. (1897810.930000) Lease for IP 192.168.1.76 renewed by host ESP_F20F88 (MAC 18:fe:34:f2:0f:88).Lease duration: 60 min
12:43:36, 31 Mar. (1898100.730000) Device disconnected: Hostname: ESP_F20F88 IP: 192.168.1.76 MAC: 18:fe:34:f2:0f:88
4 mins 50 sec lease time.
Any thoughts as the log is not showing any activity from the ESP just a disconnection?
Fixed IP issued by the routers DHCP.
Mostly this code https://github.com/forkineye/E131 using the unicast option.