Script to detect if Mesh node is 'meshed'

Hi All

Im trying to program a simple script that will run every 10 seconds on an RB433 with a mesh interface. These are going to be portable units, so wanted to have the units beep every 10 seconds if no mesh connection to another device to allow the operator to site them better.

As soon as they get a meshed up with another unit, the nodes stop beeping (theres no external lights etc on the cases I am using)

Can anyone recommend the most reliable method to check for meshed connection (ping? , or does a WDS interface come up or something?)

In the end i just checked for associated clients on the mesh network, if its 1 or greater, try and ping the main gateway. It it fails to ping gateway then sound the alarm (probably as its only meshed with another repeater, not a gateway)

Works a treat.