'scan for available ports. return a list of device names.'

def scanserial(self):

    baselist = []
    if (os.name == 'nt'):
        try:
            key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'HARDWARE\\DEVICEMAP\\SERIALCOMM')
            i = 0
            while 1:
                baselist += [_winreg.EnumValue(key, i)[1]]
                i += 1
        except:
            pass
    for g in ['/dev/ttyUSB*', '/dev/ttyACM*', '/dev/tty.*', '/dev/cu.*', '/dev/rfcomm*']:
        baselist += glob.glob(g)
    return filter(self._bluetoothSerialFilter, baselist)
