webwx: added wait_scan function