Example #1
0
    def listAccessPoints(self):
        self.APList = []
        if self.WlanPluginInstalled is False:
            self.APList.append((_("No networks found"), None))
        else:
            from Plugins.SystemPlugins.WirelessLan.Wlan import iWlan
            iWlan.setInterface(self.selectedInterface)
            self.w = iWlan.getInterface()
            aps = iWlan.getNetworkList()
            if aps is not None:
                print "[NetworkWizard.py] got Accespoints!"
                tmplist = []
                complist = []
                for ap in aps:
                    a = aps[ap]
                    if a['active']:
                        tmplist.append((a['bssid'], a['essid']))
                        complist.append((a['bssid'], a['essid']))

                for entry in tmplist:
                    if entry[1] == "":
                        for compentry in complist:
                            if compentry[0] == entry[0]:
                                complist.remove(compentry)
                for entry in complist:
                    self.APList.append((entry[1], entry[1]))
            if not len(aps):
                self.APList.append((_("No networks found"), None))

        self.rescanTimer.start(4000)
        return self.APList
Example #2
0
	def listAccessPoints(self):
		self.APList = []
		if self.WlanPluginInstalled is False:
			self.APList.append( ( _("No networks found"), None ) )
		else:
			from Plugins.SystemPlugins.WirelessLan.Wlan import iWlan
			iWlan.setInterface(self.selectedInterface)
			self.w = iWlan.getInterface()
			aps = iWlan.getNetworkList()
			if aps is not None:
				print "[NetworkWizard.py] got Accespoints!"
				tmplist = []
				complist = []
				for ap in aps:
					a = aps[ap]
					if a['active']:
						tmplist.append( (a['bssid'], a['essid']) )
						complist.append( (a['bssid'], a['essid']) )

				for entry in tmplist:
					if entry[1] == "":
						for compentry in complist:
							if compentry[0] == entry[0]:
								complist.remove(compentry)
				for entry in complist:
					self.APList.append( (entry[1], entry[1]) )
			if not len(aps):
				self.APList.append( ( _("No networks found"), None ) )

		self.rescanTimer.start(4000)
		return self.APList
Example #3
0
	def getAccessPoints(self, refresh = False):
		self.APList = []
		self.cleanList = []
		aps = iWlan.getNetworkList()
		if aps is not None:
			print("[WirelessLan] got Accespoints!")
			tmpList = []
			compList = []
			for ap in aps:
				a = aps[ap]
				if a['active']:
					tmpList.append( (a['essid'], a['bssid']) )
					compList.append( (a['essid'], a['bssid'], a['encrypted'], a['iface'], a['maxrate'], a['signal']) )

			for entry in tmpList:
				if entry[0] == "":
					for compentry in compList:
						if compentry[1] == entry[1]:
							compList.remove(compentry)
			for entry in compList:
				self.cleanList.append( ( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] ) )
				if entry[0] not in self.oldlist:
					self.oldlist[entry[0]] = { 'data': entry }
				else:
					self.oldlist[entry[0]]['data'] = entry

		for entry in self.cleanList:
			self.APList.append(self.buildEntryComponent( entry[0], entry[1], entry[2], entry[3], entry[4], entry[5] ))

		if refresh is False:
			self['list'].setList(self.APList)
		self.listLength = len(self.APList)
		self.setInfo()
		self.rescanTimer.start(5000)
		return self.cleanList
Example #4
0
    def listAccessPoints(self):
        self.APList = []
        if self.WlanPluginInstalled is False:
            self.APList.append((_("No networks found"), _("unavailable")))
            return self.APList
        else:
            try:
                from Plugins.SystemPlugins.WirelessLan.Wlan import iWlan
                iWlan.setInterface(self.selectedInterface)
                self.w = iWlan.getInterface()
                aps = iWlan.getNetworkList()
            except ValueError:
                self.APList = []
                self.APList.append((_("No networks found"), _("unavailable")))
                return self.APList

            if aps is not None:
                print "[NetworkWizard.py] got Accespoints!"
                tmplist = []
                complist = []
                for ap in aps:
                    a = aps[ap]
                    if a['active']:
                        tmplist.append((a['bssid'], a['essid']))
                        complist.append((a['bssid'], a['essid']))

                for entry in tmplist:
                    if entry[1] == "":
                        for compentry in complist:
                            if compentry[0] == entry[0]:
                                complist.remove(compentry)
                for entry in complist:
                    self.APList.append((entry[1], entry[1]))

            if "<hidden>" not in self.APList:
                self.APList.append(
                    (_("enter hidden network SSID"), "<hidden>"))

            self.rescanTimer.start(5000)
            return self.APList
	def listAccessPoints(self):
		self.APList = []
		if self.WlanPluginInstalled is False:
			self.APList.append( ( _("No networks found"),_("unavailable") ) )
			return self.APList
		else:
			try:
				from Plugins.SystemPlugins.WirelessLan.Wlan import iWlan
				iWlan.setInterface(self.selectedInterface)
				self.w = iWlan.getInterface()
				aps = iWlan.getNetworkList()
			except ValueError:
				self.APList = []
				self.APList.append( ( _("No networks found"),_("unavailable") ) )
				return self.APList

			if aps is not None:
				print "[NetworkWizard.py] got Accespoints!"
				tmplist = []
				complist = []
				for ap in aps:
					a = aps[ap]
					if a['active']:
						tmplist.append( (a['bssid'], a['essid']) )
						complist.append( (a['bssid'], a['essid']) )
				
				for entry in tmplist:
					if entry[1] == "":
						for compentry in complist:
							if compentry[0] == entry[0]:
								complist.remove(compentry)
				for entry in complist:
					self.APList.append( (entry[1], entry[1]) )

			if "<hidden>" not in self.APList:
				self.APList.append(( _("enter hidden network SSID"), "<hidden>" ))
			
			self.rescanTimer.start(5000)
			return self.APList