implement functions to perform wifi scan's and to compute a free channel number