Gl-mt300n-v2 not reassign ip address to a device when reboot

hello, i flashed openwrt 18.06.04 on my gl.inet gl-mt300n-v2 and i have a strange problem with one device, a POS, plugged via lan cable.
What happens:
If i reboot the router, the device lose the ip address and remain 0.0.0.0 until i reboot the POS

What i have tried:
The POS is set in DHCP. I have tried to set a static address on the POS but it cannot connect to the internet
The router is resetted, no changes made
If i try to connect via wifi with my notebook to the router, it assigns again an IP address to both my computer and POS and the internet connection its working
I tried the same with my notebook (plug via lan and reboot the router) and the router reassign again the IP address on reboot
If i unplug and replug tha cable the IP remains 0.0.0.0

I have no ideas, how can force to reasign the ip address to the POS when the router reboots?

Please post the following in preformatted text </>
uci show network; uci show dhcp

If the cable are good and ports are not damaged, then this could also be a sign of dnsmasq not running. Can you run ps -w | grep dnsmasq on the router when one device cannot an IP while another one is still connected.


root@OpenWrt:~# uci show network; uci show dhcp
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='fdbf:d042:e67c::/48'
network.lan=interface
network.lan.type='bridge'
network.lan.ifname='eth0.1'
network.lan.proto='static'
network.lan.ipaddr='192.168.1.1'
network.lan.netmask='255.255.255.0'
network.lan.ip6assign='60'
network.lan.delegate='0'
network.wan=interface
network.wan.ifname='eth0.2'
network.wan.proto='dhcp'
network.wan_dev=device
network.wan_dev.name='eth0.2'
network.wan_dev.macaddr='94:83:c4:00:3f:6c'
network.@switch[0]=switch
network.@switch[0].name='switch0'
network.@switch[0].reset='1'
network.@switch[0].enable_vlan='1'
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device='switch0'
network.@switch_vlan[0].vlan='1'
network.@switch_vlan[0].ports='1 6t'
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device='switch0'
network.@switch_vlan[1].vlan='2'
network.@switch_vlan[1].ports='0 6t'
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].boguspriv='1'
dhcp.@dnsmasq[0].filterwin2k='0'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].nonegcache='0'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].resolvfile='/tmp/resolv.conf.auto'
dhcp.@dnsmasq[0].nonwildcard='1'
dhcp.@dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.force='1'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'

I can't do this
as soon as i connect from another device, with my computer via wifi, all start working again and bot the POS and my pc has an ip address

i have tried with the original gl.inet firmware and is working correctly
If i unplug and replug tha cable the POS has again an IP address

You already have verbose logging, so you can connect with SSH and check if there is proper communication with dnsmasq.
logread -f | grep -i dnsmasq
Then try to reproduce the problem.
I would also add a static dhcp lease for the POS or any other device that connects regularly with a higher lease time.
For example

uci add dhcp.@host[-1].dns='1'
uci add dhcp.@host[-1].name='pos'
uci add dhcp.@host[-1].mac='xx:xx:xx:xx:xx:xx'
uci add dhcp.@host[-1].ip='192.168.1.10'
uci add dhcp.@host[-1].hostid='10'
uci add dhcp.@host[-1].leasetime='30d'
uci commit dhcp
service dnsmasq restart

Add there the mac address of the pos.
This will lease the 192.168.1.10 IP to the pos for 30 days.

If this doesn't clear things a bit, we can check with tcpdump what is being exchanged.

i can't do this (or i don't know how do that)
because as soon as i try to connect from pc for the ssh connection both the POS and the pc get an IP address

Set a static IP for the PC, so that it won't trigger any dhcp event. Then keep it connected and running until the issue appears. With Ctrl-c you can exit the logreading.

what i have tried
dhcp lease and - not working
static ip for the PC - not working because, again, as soon as the pc is connected, the POS get an IP address. In any case i cannot do this test because to reproduce the issue i have to turn off/reset the router and i lose the SSH connection

it's very strange, i have tried with the original gl.inet firmware and is working as expected