subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
651 views 0 comments
by anonymous

in my application the RUT240 works as a M2M access point for different wifi devices and one wired device.

One of the wifi devices needs to know the IP addresses of all other devices. Currently I have a shell script in /www/cgi-bin/ which returns /var/dhcp.leases and some modem data in a JSON format which is requested by said wifi client.
After a router reboot the wifi devices get a new IP, but the wired device not (which seems quite logical to me, since its connection is still established and there is no reason to ask for a new IP address).

One solution I thought of was to reduce the DHCP lease time to 2min so the wired client will ask for a new IP more frequently but that seems like a quite hacky way and also all other clients would do that.

The first 3 octets of the wired devices MAC address are known, since its always the same manufacturer.

I searched for a solution but programs like arp-scan or nmap aren't installed on the standard RUT OS. I also tried ping -b [broadcast IP] but there was no response from the wired device. As far as I know /proc/net/arp lists the same data as the DHCP lease file so this is also no help for me.

So is there any simple way to get the IP-address of the wired device after reboot?

This setup is replicated n-times so I'm looking for a general solution. Would be great if I can roll out a backup on all devices so no individual configuration is needed.

Best regards


1 Answer

0 votes
by anonymous


For a course of action I would suggest you install the aforementioned packages yourself.

You can install almost any package from opkg repository (there are some packages that require kernel libs that are not available on the device due to space constraints) and then use then to achieve your desired results.

To automate the process you can have a scrip in the rc.local file that would check if the package you want is installed on the device, if not, then install it. This script would run on every boot up, so it will work even on commissioning because it will always check if it is installed. When making the script, make it so it wait for 2-3 minutes after bootup, because it takes some time to get LTE connection.

Best answer