WDS config: I really appreciate if any one help me

hi everyone
I have device make it access point WDS and another device I make it station WDS from the one device it's connected together normally
I want script or any thing to access point keeping ping to station WDS if the station WDS losing ping or hang up the access point WDS disconnect the station WDS or kick the connection

I really appreciate and grateful

thanks for all