[ADD] Extended logic for gateway discovery and advertisement