Merge branch 'vuplus_experimental' of /opt/repository/enigma2 into vuplus_experimental
authorChang.H.S <jhs@dev3>
Tue, 16 Aug 2011 07:58:44 +0000 (16:58 +0900)
committerChang.H.S <jhs@dev3>
Tue, 16 Aug 2011 07:58:44 +0000 (16:58 +0900)
data/keymap.xml
lib/python/Plugins/SystemPlugins/Blindscan/plugin.py
lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py

index 11fa9c6..10a36de 100755 (executable)
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_YELLOW" mapto="audioSelection" flags="b" />
+                       <key id="KEY_AUDIO" mapto="audioSelection" flags="m" />
                </device>
        </map>
 
index ae0328a..1d28d2a 100644 (file)
@@ -18,247 +18,90 @@ from Tools.Directories import resolveFilename, SCOPE_DEFAULTPARTITIONMOUNTDIR, S
 
 from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eConsoleAppContainer, eDVBResourceManager
 
-class SatBlindscanSearchSupport:
-       def blindTransponderSearchSessionClosed(self, *val):
-               self.blind_search_container.appClosed.remove(self.blindScanSearchClosed)
-               self.blind_search_container.dataAvail.remove(self.getBlindTransponderData)
-               if val and len(val):
-                       if val[0]:
-                               self.tlist = self.__tlist
-                               print self.__tlist
-               if self.frontend:
-                       self.frontend = None
-                       del self.raw_channel
-
-               self.blind_search_container.sendCtrlC()
-               import time
-               time.sleep(2)
-
-               self.blind_search_container = None
-               self.blind_search_container = None
-               self.__tlist = None
-
-               if self.tlist is None:
-                       self.tlist = []
-               else:
-                       self.startScan(self.tlist, self.flags, self.feid)
-               
-       def blindScanSearchClosed(self, retval):
-               self.blind_search_session.close(True)
-
-       def getBlindTransponderData(self, str):
-               str = self.remainingdata + str
-               #split in lines
-               lines = str.split('\n')
-               #'str' should end with '\n', so when splitting, the last line should be empty. If this is not the case, we received an incomplete line
-               if len(lines[-1]):
-                       #remember this data for next time
-                       self.remainingdata = lines[-1]
-                       lines = lines[0:-1]
-               else:
-                       self.remainingdata = ""
-
-               for line in lines:
-                       data = line.split()
-                       if len(data):
-                               print data
-                               if data[0] == 'OK':
-                                       parm = eDVBFrontendParametersSatellite()
-                                       sys = {         "DVB-S" : eDVBFrontendParametersSatellite.System_DVB_S,
-                                                       "DVB-S2" : eDVBFrontendParametersSatellite.System_DVB_S2        }
-                                       qam = {         "QPSK" : parm.Modulation_QPSK,
-                                                       "8PSK" : parm.Modulation_8PSK }
-                                       inv = {         "INVERSION_OFF" : parm.Inversion_Off,
-                                                       "INVERSION_ON" : parm.Inversion_On,
-                                                       "INVERSION_AUTO" : parm.Inversion_Unknown }
-                                       fec = {         "FEC_AUTO" : parm.FEC_Auto,
-                                                       "FEC_1_2" : parm.FEC_1_2,
-                                                       "FEC_2_3" : parm.FEC_2_3,
-                                                       "FEC_3_4" : parm.FEC_3_4,
-                                                       "FEC_5_6": parm.FEC_5_6,
-                                                       "FEC_7_8" : parm.FEC_7_8,
-                                                       "FEC_8_9" : parm.FEC_8_9,
-                                                       "FEC_3_5" : parm.FEC_3_5,
-                                                       "FEC_9_10" : parm.FEC_9_10,
-                                                       "FEC_NONE" : parm.FEC_None }
-                                       roll = {        "ROLLOFF_20" : parm.RollOff_alpha_0_20,
-                                                       "ROLLOFF_25" : parm.RollOff_alpha_0_25,
-                                                       "ROLLOFF_35" : parm.RollOff_alpha_0_35 }
-                                       pilot = {       "PILOT_ON" : parm.Pilot_On,
-                                                       "PILOT_OFF" : parm.Pilot_Off }
-                                       pol = { "HORIZONTAL" : parm.Polarisation_Horizontal,
-                                                       "VERTICAL" : parm.Polarisation_Vertical }
-
-                                       sat = self.satList[0][self.scan_satselection[0].index]
-                                       parm.orbital_position = sat[0]
-                                       
-                                       parm.polarisation = pol[data[1]]
-                                       parm.frequency = int(data[2])
-                                       parm.symbol_rate = int(data[3])
-                                       parm.system = sys[data[4]]
-                                       parm.inversion = inv[data[5]]
-                                       parm.pilot = pilot[data[6]]
-                                       parm.fec = fec[data[7]]
-                                       parm.modulation = qam[data[8]]
-                                       parm.rolloff = roll[data[9]]
-                                       self.__tlist.append(parm)
-                                       flags = None
-
-       def openFrontend(self):
-               res_mgr = eDVBResourceManager.getInstance()
-               if res_mgr:
-                       self.raw_channel = res_mgr.allocateRawChannel(self.feid)
-                       if self.raw_channel:
-                               self.frontend = self.raw_channel.getFrontend()
-                               if self.frontend:
-                                       return True
-                               else:
-                                       print "getFrontend failed"
-                       else:
-                               print "getRawChannel failed"
-               else:
-                       print "getResourceManager instance failed"
-               return False
-
-       def startSatBlindscanSearch(self, nim_idx, orbpos, session):
-               if self.blindscan_start_frequency.value < 950*1000000 or self.blindscan_start_frequency.value > 2150*1000000 :
-                       self.session.open(MessageBox, _("Please check again.\nStart frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
-                       return
-               if self.blindscan_stop_frequency.value < 950*1000000 or self.blindscan_stop_frequency.value > 2150*1000000 :
-                       self.session.open(MessageBox, _("Please check again.\nStop frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
-                       return
-               if self.blindscan_start_frequency.value > self.blindscan_stop_frequency.value :
-                       self.session.open(MessageBox, _("Please check again.\nFrequency : start value is larger than stop value."), MessageBox.TYPE_ERROR)
-                       return
-               if self.blindscan_start_symbol.value < 2*1000000 or self.blindscan_start_symbol.value > 45*1000000 :
-                       self.session.open(MessageBox, _("Please check again.\nStart symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
-                       return
-               if self.blindscan_stop_symbol.value < 2*1000000 or self.blindscan_stop_symbol.value > 45*1000000 :
-                       self.session.open(MessageBox, _("Please check again.\nStop symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
-                       return
-               if self.blindscan_start_symbol.value > self.blindscan_stop_symbol.value :
-                       self.session.open(MessageBox, _("Please check again.\nSymbolrate : start value is larger than stop value."), MessageBox.TYPE_ERROR)
-                       return
-               
-               self.__tlist = [ ]
-               self.remainingdata = ""
-               self.feid = nim_idx
-               if not self.openFrontend():
-                       self.oldref = session.nav.getCurrentlyPlayingServiceReference()
-                       session.nav.stopService() # try to disable foreground service
-                       if not self.openFrontend():
-                               if session.pipshown: # try to disable pip
-                                       session.pipshown = False
-                                       del session.pip
-                                       if not self.openFrontend():
-                                               self.frontend = None # in normal case this should not happen
-
-               self.tuner = Tuner(self.frontend)
-               sat = self.satList[0][self.scan_satselection[0].index]
-
-               tab_hilow               = {"high" : 1, "low" : 0}
-               returnvalue     = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
-               if tab_hilow[self.blindscan_hi.value]:
-                       self.scan_sat.frequency.value = 12515
-               else:
-                       self.scan_sat.frequency.value = 11015
-               returnvalue = (self.scan_sat.frequency.value,
-                                        0,
-                                        self.scan_sat.polarization.value,
-                                        0,
-                                        0,
-                                        int(orbpos[0]),
-                                        eDVBFrontendParametersSatellite.System_DVB_S,
-                                        0,
-                                        0,
-                                        0)
-               self.tuner.tune(returnvalue)
-
-               self.blind_search_container = eConsoleAppContainer()
-               self.blind_search_container.appClosed.append(self.blindScanSearchClosed)
-               self.blind_search_container.dataAvail.append(self.getBlindTransponderData)
-               cmd = "vuplus_blindscan %d %d %d %d %d %d %d" % (self.blindscan_start_frequency.value/1000000, self.blindscan_stop_frequency.value/1000000, self.blindscan_start_symbol.value/1000000, self.blindscan_stop_symbol.value/1000000, self.scan_sat.polarization.value, tab_hilow[self.blindscan_hi.value], self.feid)
-               print "prepared command : ", cmd
-               self.blind_search_container.execute(cmd)
-               
-               tmpstr = _("Blindscan takes some minute.")
-               self.blind_search_session = self.session.openWithCallback(self.blindTransponderSearchSessionClosed, MessageBox, tmpstr, MessageBox.TYPE_INFO)
-
-class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
+class Blindscan(ConfigListScreen, Screen):
        skin="""
-               <screen name="Blindscan" position="center,center" size="560,250" title="Blindscan">
+               <screen name="Blindscan" position="center,center" size="560,290" title="Blindscan">
                        <ePixmap pixmap="Vu_HD/buttons/red.png" position="5,0" size="140,40" alphatest="on" />
                        <ePixmap pixmap="Vu_HD/buttons/green.png" position="145,0" size="140,40" alphatest="on" />
                        <ePixmap pixmap="Vu_HD/buttons/button_off.png" position="285,0" size="140,40" alphatest="on" />
-                       <ePixmap pixmap="Vu_HD/buttons/button_off.png" position="425,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="Vu_HD/buttons/blue.png" position="425,0" size="140,40" alphatest="on" />
                        <widget source="key_red" render="Label" position="20,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
                        <widget source="key_green" render="Label" position="160,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_blue" render="Label" position="440,0" zPosition="1" size="115,30" font="Regular;20" halign="center" valign="center" transparent="1" />
                        <widget name="config" position="5,50" size="550,200" scrollbarMode="showOnDemand" />
+                       <widget name="introduction" position="0,265" size="560,20" font="Regular;20" halign="center" />
                </screen>
                """
        def __init__(self, session): 
                Screen.__init__(self, session)
 
-               self.updateSatList()
-               self.service = session.nav.getCurrentService()
                self.current_play_service = self.session.nav.getCurrentlyPlayingServiceReference()
-               self.feinfo = None
-               self.networkid = 0
-               frontendData = None
-               if self.service is not None:
-                       self.feinfo = self.service.frontendInfo()
-                       frontendData = self.feinfo and self.feinfo.getAll(True)
-               
-               self.createConfig(frontendData)
 
-               del self.feinfo
-               del self.service
-
-               self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ],
-               {
-                       "red": self.keyCancel,
-                       "green": self.keyGo,
-                       "ok": self.keyGo,
-                       "cancel": self.keyCancel,
-               }, -2)
+               # update sat list
+               self.satList = []
+               for slot in nimmanager.nim_slots:
+                       if slot.isCompatible("DVB-S"):
+                               self.satList.append(nimmanager.getSatListForNim(slot.slot))
 
-               self.statusTimer = eTimer()
-               self.statusTimer.callback.append(self.updateStatus)
+               # make config
+               self.createConfig()
 
                self.list = []
+               self.status = ""
+
                ConfigListScreen.__init__(self, self.list)
-               
-               self["key_red"] = StaticText(_("Exit"))
-               self["key_green"] = StaticText("Start")
-               
-               #if not self.scan_nims.value == "":
-               #       self.createSetup()
-               try:
-                       if not self.scan_nims.value == "":
-                               self.createSetup()
-               except:
+               if self.scan_nims.value != None and self.scan_nims.value != "" :
+                       self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ],
+                       {
+                               "red": self.keyCancel,
+                               "green": self.keyGo,
+                               "blue":self.keyGoAll,
+                               "ok": self.keyGo,
+                               "cancel": self.keyCancel,
+                       }, -2)
+                       self["key_red"] = StaticText(_("Exit"))
+                       self["key_green"] = StaticText("Start")
+                       self["key_blue"] = StaticText("Scan All")
+                       self["introduction"] = Label(_("Press Green/OK to start the scan"))
+                       self.createSetup()
+               else :
                        self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", "SetupActions", ],
                        {
                                "red": self.keyCancel,
                                "green": self.keyNone,
+                               "blue":self.keyNone,
                                "ok": self.keyNone,
                                "cancel": self.keyCancel,
                        }, -2)
                        self["key_red"] = StaticText(_("Exit"))
                        self["key_green"] = StaticText(" ")
+                       self["key_blue"] = StaticText(" ")
+                       self["introduction"] = Label(_("Please setup your tuner configuration."))
 
        def keyNone(self):
                None
-               
-       def updateSatList(self):
-               self.satList = []
-               for slot in nimmanager.nim_slots:
-                       if slot.isCompatible("DVB-S"):
-                               self.satList.append(nimmanager.getSatListForNim(slot.slot))
+       def callbackNone(self, *retval):
+               None
+
+       def openFrontend(self):
+               res_mgr = eDVBResourceManager.getInstance()
+               if res_mgr:
+                       self.raw_channel = res_mgr.allocateRawChannel(self.feid)
+                       if self.raw_channel:
+                               self.frontend = self.raw_channel.getFrontend()
+                               if self.frontend:
+                                       return True
+                               else:
+                                       print "getFrontend failed"
                        else:
-                               self.satList.append(None)
+                               print "getRawChannel failed"
+               else:
+                       print "getResourceManager instance failed"
+               return False
 
-       def createConfig(self, frontendData):
+       def createConfig(self):
+               self.feinfo = None
+               frontendData = None
                defaultSat = {
                        "orbpos": 192,
                        "system": eDVBFrontendParametersSatellite.System_DVB_S,
@@ -268,7 +111,13 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                        "polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal,
                        "fec": eDVBFrontendParametersSatellite.FEC_Auto,
                        "fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
-                       "modulation": eDVBFrontendParametersSatellite.Modulation_QPSK }
+                       "modulation": eDVBFrontendParametersSatellite.Modulation_QPSK 
+               }
+
+               self.service = self.session.nav.getCurrentService()
+               if self.service is not None:
+                       self.feinfo = self.service.frontendInfo()
+                       frontendData = self.feinfo and self.feinfo.getAll(True)
                if frontendData is not None:
                        ttype = frontendData.get("tuner_type", "UNKNOWN")
                        if ttype == "DVB-S":
@@ -285,12 +134,15 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                                        defaultSat["fec"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
                                defaultSat["modulation"] = frontendData.get("modulation", eDVBFrontendParametersSatellite.Modulation_QPSK)
                                defaultSat["orbpos"] = frontendData.get("orbital_position", 0)
-                               
+               del self.feinfo
+               del self.service
+               del frontendData
+               
                self.scan_sat = ConfigSubsection()
                self.scan_networkScan = ConfigYesNo(default = False)
                
                # blindscan add
-               self.blindscan_hi = ConfigSelection(default = "low", choices = [("low", _("low")), ("high", _("high"))])
+               self.blindscan_hi = ConfigSelection(default = "hi_low", choices = [("low", _("low")), ("high", _("high")), ("hi_low", _("hi_low"))])
 
                #ConfigYesNo(default = True)
                self.blindscan_start_frequency = ConfigInteger(default = 950*1000000)
@@ -298,8 +150,8 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                self.blindscan_start_symbol = ConfigInteger(default = 2*1000000)
                self.blindscan_stop_symbol = ConfigInteger(default = 45*1000000)
 
-               nim_list = []
                # collect all nims which are *not* set to "nothing"
+               nim_list = []
                for n in nimmanager.nim_slots:
                        if n.config_mode == "nothing":
                                continue
@@ -312,18 +164,12 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                        nim_list.append((str(n.slot), n.friendly_full_description))
 
                self.scan_nims = ConfigSelection(choices = nim_list)
-       
-               # status
-               self.scan_snr = ConfigSlider()
-               self.scan_snr.enabled = False
-               self.scan_agc = ConfigSlider()
-               self.scan_agc.enabled = False
-               self.scan_ber = ConfigSlider()
-               self.scan_ber.enabled = False
 
                # sat
                self.scan_sat.frequency = ConfigInteger(default = defaultSat["frequency"], limits = (1, 99999))
-               self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [
+               #self.scan_sat.polarization = ConfigSelection(default = defaultSat["polarization"], choices = [
+               self.scan_sat.polarization = ConfigSelection(default = eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, choices = [
+                       (eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, _("horizontal_vertical")),
                        (eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")),
                        (eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")),
                        (eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")),
@@ -336,10 +182,35 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                for slot in nimmanager.nim_slots:
                        if slot.isCompatible("DVB-S"):
                                self.scan_satselection.append(getConfigSatlist(defaultSat["orbpos"], self.satList[slot.slot]))
-                       else:
-                               self.scan_satselection.append(None)
                return True
-                       
+
+       def createSetup(self):
+               self.list = []
+               self.multiscanlist = []
+               index_to_scan = int(self.scan_nims.value)
+               print "ID: ", index_to_scan
+
+               self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims)
+               self.list.append(self.tunerEntry)
+               
+               if self.scan_nims == [ ]:
+                       return
+               
+               self.systemEntry = None
+               self.modulationEntry = None
+               nim = nimmanager.nim_slots[index_to_scan]
+
+               self.scan_networkScan.value = False
+               if nim.isCompatible("DVB-S") :
+                       self.list.append(getConfigListEntry(_('Satellite'), self.scan_satselection[index_to_scan]))
+                       self.list.append(getConfigListEntry(_('Scan start frequency'), self.blindscan_start_frequency))
+                       self.list.append(getConfigListEntry(_('Scan stop frequency'), self.blindscan_stop_frequency))
+                       self.list.append(getConfigListEntry(_("Polarity"), self.scan_sat.polarization))
+                       self.list.append(getConfigListEntry(_("Scan band"), self.blindscan_hi))
+                       self.list.append(getConfigListEntry(_('Scan start symbolrate'), self.blindscan_start_symbol))
+                       self.list.append(getConfigListEntry(_('Scan stop symbolrate'), self.blindscan_stop_symbol))
+                       self["config"].list = self.list
+                       self["config"].l.setList(self.list)
                        
        def newConfig(self):
                cur = self["config"].getCurrent()
@@ -349,6 +220,27 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
                        (self.modulationEntry and self.systemEntry[1].value == eDVBFrontendParametersSatellite.System_DVB_S2 and cur == self.modulationEntry):
                        self.createSetup()
 
+       def checkSettings(self):
+               if self.blindscan_start_frequency.value < 950*1000000 or self.blindscan_start_frequency.value > 2150*1000000 :
+                       self.session.open(MessageBox, _("Please check again.\nStart frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
+                       return False
+               if self.blindscan_stop_frequency.value < 950*1000000 or self.blindscan_stop_frequency.value > 2150*1000000 :
+                       self.session.open(MessageBox, _("Please check again.\nStop frequency must be between 950 and 2150."), MessageBox.TYPE_ERROR)
+                       return False
+               if self.blindscan_start_frequency.value > self.blindscan_stop_frequency.value :
+                       self.session.open(MessageBox, _("Please check again.\nFrequency : start value is larger than stop value."), MessageBox.TYPE_ERROR)
+                       return False
+               if self.blindscan_start_symbol.value < 2*1000000 or self.blindscan_start_symbol.value > 45*1000000 :
+                       self.session.open(MessageBox, _("Please check again.\nStart symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
+                       return False
+               if self.blindscan_stop_symbol.value < 2*1000000 or self.blindscan_stop_symbol.value > 45*1000000 :
+                       self.session.open(MessageBox, _("Please check again.\nStop symbolrate must be between 2MHz and 45MHz."), MessageBox.TYPE_ERROR)
+                       return False
+               if self.blindscan_start_symbol.value > self.blindscan_stop_symbol.value :
+                       self.session.open(MessageBox, _("Please check again.\nSymbolrate : start value is larger than stop value."), MessageBox.TYPE_ERROR)
+                       return False
+               return True
+
        def keyLeft(self):
                ConfigListScreen.keyLeft(self)
                self.newConfig()
@@ -356,82 +248,227 @@ class Blindscan(ConfigListScreen, Screen, SatBlindscanSearchSupport):
        def keyRight(self):
                ConfigListScreen.keyRight(self)
                self.newConfig()
-               
-       def updateStatus(self):
-               print "updatestatus"
+                       
+       def keyCancel(self):
+               self.session.nav.playService(self.current_play_service)
+               for x in self["config"].list:
+                       x[1].cancel()
+               self.close()
 
        def keyGo(self):
-               if self.scan_nims.value == "":
-                       return
-               tlist = []
-               flags = None
-               removeAll = True
-               index_to_scan = int(self.scan_nims.value)
-               
-               if self.scan_nims == [ ]:
-                       self.session.open(MessageBox, _("No tuner is enabled!\nPlease setup your tuner settings before you start a service scan."), MessageBox.TYPE_ERROR)
+               if self.checkSettings() == False:
                        return
 
-               nim = nimmanager.nim_slots[index_to_scan]
-               print "nim", nim.slot
-               if nim.isCompatible("DVB-S") :
-                       print "is compatible with DVB-S"
+               tab_pol = {
+                       eDVBFrontendParametersSatellite.Polarisation_Horizontal : "horizontal", 
+                       eDVBFrontendParametersSatellite.Polarisation_Vertical : "vertical",
+                       eDVBFrontendParametersSatellite.Polarisation_CircularLeft : "circular left",
+                       eDVBFrontendParametersSatellite.Polarisation_CircularRight : "circular right",
+                       eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1 : "horizontal_vertical"
+               }
+
+               self.tmp_tplist=[]
+               tmp_pol = []
+               tmp_band = []
+               tmp_list=[self.satList[0][self.scan_satselection[0].index]]
+               
+               if self.blindscan_hi.value == "hi_low" :
+                       tmp_band=["low","high"]
+               else:
+                       tmp_band=[self.blindscan_hi.value]
+                       
+               if self.scan_sat.polarization.value ==  eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1 : 
+                       tmp_pol=["horizontal","vertical"]
                else:
-                       print "is not compatible with DVB-S"
+                       tmp_pol=[tab_pol[self.scan_sat.polarization.value]]
+
+               self.doRun(tmp_list, tmp_pol, tmp_band)
+               
+       def keyGoAll(self):
+               if self.checkSettings() == False:
                        return
 
-               flags = self.scan_networkScan.value and eComponentScan.scanNetworkSearch or 0
-               for x in self["config"].list:
-                       x[1].save()
+               self.tmp_tplist=[]
+               tmp_list=[]
+               tmp_band=["low","high"]
+               tmp_pol=["horizontal","vertical"]
+               for slot in nimmanager.nim_slots:
+                       if slot.isCompatible("DVB-S"):
+                               for s in self.satList[slot.slot]:
+                                       tmp_list.append(s)
 
-               self.flags = flags
-               self.feid = index_to_scan
-               self.tlist = []
-               orbpos = self.satList[index_to_scan][self.scan_satselection[index_to_scan].index]
-               self.startSatBlindscanSearch(index_to_scan, orbpos, self.session)
-                       
-       def keyCancel(self):
-               for x in self["config"].list:
-                       x[1].cancel()
-               self.session.nav.playService(self.current_play_service)
-               self.close()
+               self.doRun(tmp_list, tmp_pol, tmp_band)
+               
+       def doRun(self, tmp_list, tmp_pol, tmp_band):
+               self.full_data = ""
+               self.total_list=[]
+               for x in tmp_list:
+                       for y in tmp_pol:
+                               for z in tmp_band:
+                                       self.total_list.append([x,y,z])
+                                       print "add scan item : ", x, ", ", y, ", ", z
+
+               self.max_count = len(self.total_list)
+               self.is_runable = True
+               self.running_count = 0
+               self.clockTimer = eTimer()
+               self.clockTimer.callback.append(self.doClock)
+               self.clockTimer.start(1000)
+
+       def doClock(self):
+               is_scan = False
+               if self.is_runable :
+                       if self.running_count >= self.max_count:
+                               self.clockTimer.stop()
+                               del self.clockTimer
+                               self.clockTimer = None
+                               print "Done"
+                               return
+                       orb = self.total_list[self.running_count][0]
+                       pol = self.total_list[self.running_count][1]
+                       band = self.total_list[self.running_count][2]
+                       self.running_count = self.running_count + 1
+                       print "running status-[%d] : [%d][%s][%s]" %(self.running_count, orb[0], pol, band)
+                       if self.running_count == self.max_count:
+                               is_scan = True
+                       self.prepareScanData(orb, pol, band, is_scan)
+
+       def prepareScanData(self, orb, pol, band, is_scan):
+               self.is_runable = False
+               self.orb_position = orb[0]
+               self.feid = int(self.scan_nims.value)
+               tab_hilow = {"high" : 1, "low" : 0}
+               tab_pol = {
+                       "horizontal" : eDVBFrontendParametersSatellite.Polarisation_Horizontal, 
+                       "vertical" : eDVBFrontendParametersSatellite.Polarisation_Vertical,
+                       "circular left" : eDVBFrontendParametersSatellite.Polarisation_CircularLeft,
+                       "circular right" : eDVBFrontendParametersSatellite.Polarisation_CircularRight
+               }
+
+               returnvalue = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
-       def startScan(self, tlist, flags, feid, networkid = 0):
-               if len(tlist):
-                       self.session.open(ServiceScan, [{"transponders": tlist, "feid": feid, "flags": flags, "networkid": networkid}])
+               if not self.openFrontend():
+                       self.oldref = self.session.nav.getCurrentlyPlayingServiceReference()
+                       self.session.nav.stopService()
+                       if not self.openFrontend():
+                               if self.session.pipshown:
+                                       self.session.pipshown = False
+                                       del self.session.pip
+                                       if not self.openFrontend():
+                                               self.frontend = None
+               self.tuner = Tuner(self.frontend)
+
+               if tab_hilow[band]:
+                       self.scan_sat.frequency.value = 12515
                else:
-                       self.session.open(MessageBox, _("Nothing to scan!\nPlease setup your tuner settings before you start a service scan."), MessageBox.TYPE_ERROR)
+                       self.scan_sat.frequency.value = 11015
+               returnvalue = (self.scan_sat.frequency.value,
+                                        0,
+                                        tab_pol[pol],
+                                        0,
+                                        0,
+                                        orb[0],
+                                        eDVBFrontendParametersSatellite.System_DVB_S,
+                                        0,
+                                        0,
+                                        0)
+               self.tuner.tune(returnvalue)
 
-       def createSetup(self):
-               self.list = []
-               self.multiscanlist = []
-               index_to_scan = int(self.scan_nims.value)
-               print "ID: ", index_to_scan
+               cmd = "vuplus_blindscan %d %d %d %d %d %d %d" % (self.blindscan_start_frequency.value/1000000, self.blindscan_stop_frequency.value/1000000, self.blindscan_start_symbol.value/1000000, self.blindscan_stop_symbol.value/1000000, tab_pol[pol], tab_hilow[band], self.feid)
+               print "prepared command : [%s]" % (cmd)
+               self.blindscan_container = eConsoleAppContainer()
+               self.blindscan_container.appClosed.append(self.blindscanContainerClose)
+               self.blindscan_container.dataAvail.append(self.blindscanContainerAvail)
+               self.blindscan_container.execute(cmd)
 
-               self.tunerEntry = getConfigListEntry(_("Tuner"), self.scan_nims)
-               self.list.append(self.tunerEntry)
-               
-               if self.scan_nims == [ ]:
-                       return
-               
-               self.systemEntry = None
-               self.modulationEntry = None
-               nim = nimmanager.nim_slots[index_to_scan]
-               
-               self.scan_networkScan.value = False
-               if nim.isCompatible("DVB-S") :
-                       self.list.append(getConfigListEntry(_('Satellite'), self.scan_satselection[index_to_scan]))
-                       self.list.append(getConfigListEntry(_('Scan start frequency'), self.blindscan_start_frequency))
-                       self.list.append(getConfigListEntry(_('Scan stop frequency'), self.blindscan_stop_frequency))
-                       self.list.append(getConfigListEntry(_("Polarity"), self.scan_sat.polarization))
-                       self.list.append(getConfigListEntry(_("Scan band"), self.blindscan_hi))
-                       self.list.append(getConfigListEntry(_('Scan start symbolrate'), self.blindscan_start_symbol))
-                       self.list.append(getConfigListEntry(_('Scan stop symbolrate'), self.blindscan_stop_symbol))
-                       self["config"].list = self.list
-                       self["config"].l.setList(self.list)
+               tmpstr = "Look for available transponders.\nThis works will take several minutes.\n\n   - Current Status : %d/%d\n   - Orbital Positions : %s\n   - Polarization : %s\n   - Bandwidth : %s" %(self.running_count, self.max_count, orb[1], pol, band)
+               if is_scan :
+                       self.blindscan_session = self.session.openWithCallback(self.blindscanSessionClose, MessageBox, _(tmpstr), MessageBox.TYPE_INFO)
                else:
-                       self.session.open(MessageBox, _("Please setup DVB-S Tuner"), MessageBox.TYPE_ERROR)
+                       self.blindscan_session = self.session.openWithCallback(self.blindscanSessionNone, MessageBox, _(tmpstr), MessageBox.TYPE_INFO)
 
+       def blindscanContainerClose(self, retval):
+               lines = self.full_data.split('\n')
+               for line in lines:
+                       data = line.split()
+                       print "cnt :", len(data), ", data :", data
+                       if len(data) >= 10:
+                               if data[0] == 'OK':
+                                       parm = eDVBFrontendParametersSatellite()
+                                       sys = { "DVB-S" : eDVBFrontendParametersSatellite.System_DVB_S,
+                                               "DVB-S2" : eDVBFrontendParametersSatellite.System_DVB_S2}
+                                       qam = { "QPSK" : parm.Modulation_QPSK,
+                                               "8PSK" : parm.Modulation_8PSK}
+                                       inv = { "INVERSION_OFF" : parm.Inversion_Off,
+                                               "INVERSION_ON" : parm.Inversion_On,
+                                               "INVERSION_AUTO" : parm.Inversion_Unknown}
+                                       fec = { "FEC_AUTO" : parm.FEC_Auto,
+                                               "FEC_1_2" : parm.FEC_1_2,
+                                               "FEC_2_3" : parm.FEC_2_3,
+                                               "FEC_3_4" : parm.FEC_3_4,
+                                               "FEC_5_6": parm.FEC_5_6,
+                                               "FEC_7_8" : parm.FEC_7_8,
+                                               "FEC_8_9" : parm.FEC_8_9,
+                                               "FEC_3_5" : parm.FEC_3_5,
+                                               "FEC_9_10" : parm.FEC_9_10,
+                                               "FEC_NONE" : parm.FEC_None}
+                                       roll ={ "ROLLOFF_20" : parm.RollOff_alpha_0_20,
+                                               "ROLLOFF_25" : parm.RollOff_alpha_0_25,
+                                               "ROLLOFF_35" : parm.RollOff_alpha_0_35}
+                                       pilot={ "PILOT_ON" : parm.Pilot_On,
+                                               "PILOT_OFF" : parm.Pilot_Off}
+                                       pol = { "HORIZONTAL" : parm.Polarisation_Horizontal,
+                                               "VERTICAL" : parm.Polarisation_Vertical}
+                                       parm.orbital_position = self.orb_position
+                                       parm.polarisation = pol[data[1]]
+                                       parm.frequency = int(data[2])
+                                       parm.symbol_rate = int(data[3])
+                                       parm.system = sys[data[4]]
+                                       parm.inversion = inv[data[5]]
+                                       parm.pilot = pilot[data[6]]
+                                       parm.fec = fec[data[7]]
+                                       parm.modulation = qam[data[8]]
+                                       parm.rolloff = roll[data[9]]
+                                       self.tmp_tplist.append(parm)
+               self.blindscan_session.close(True)
+
+       def blindscanContainerAvail(self, str):
+               self.full_data = self.full_data + str
+
+       def blindscanSessionNone(self, *val):
+               import time
+               self.blindscan_container.sendCtrlC()
+               self.blindscan_container = None
+               time.sleep(2)
+
+               if self.frontend:
+                       self.frontend = None
+                       del self.raw_channel
+
+               if val[0] == False:
+                       self.tmp_tplist = []
+                       self.running_count = self.max_count
+
+               self.is_runable = True
+
+       def blindscanSessionClose(self, *val):
+               self.blindscanSessionNone(val[0])
+
+               if self.tmp_tplist != None and self.tmp_tplist != []:
+                       for p in self.tmp_tplist:
+                               print "data : [%d][%d][%d][%d][%d][%d][%d][%d][%d][%d]" % (p.orbital_position, p.polarisation, p.frequency, p.symbol_rate, p.system, p.inversion, p.pilot, p.fec, p.modulation, p.modulation)
+
+                       self.startScan(self.tmp_tplist, self.feid)
+               else:
+                       msg = "No found transponders!!\nPlease check the satellite connection, or scan other search condition." 
+                       if val[0] == False:
+                               msg = "Blindscan was canceled by the user."
+                       self.session.openWithCallback(self.callbackNone, MessageBox, _(msg), MessageBox.TYPE_INFO, timeout=10)
+                       self.tmp_tplist = []
+
+       def startScan(self, tlist, feid, networkid = 0):
+               self.scan_session = None
+               self.session.open(ServiceScan, [{"transponders": tlist, "feid": feid, "flags": 0, "networkid": networkid}])
 
 def main(session, **kwargs):
        session.open(Blindscan)
index 8e76996..49f90e0 100755 (executable)
@@ -67,6 +67,13 @@ class WlanSelection(Screen,HelpableScreen):
                        "green": (self.ok, _("select interface")),
                        "red": (self.close, _("exit network interface list")),
                })
+               self.updateInterfaces()
+               self.onClose.append(self.cleanup)
+
+       def updateInterfaces(self):
+               iNetwork.config_ready = False
+               iNetwork.msgPlugins()
+               iNetwork.getInterfaces()
 
        def ok(self):
 #              print len(self["menulist"].list)
@@ -81,35 +88,41 @@ class WlanSelection(Screen,HelpableScreen):
 
        def getWlandevice(self):
                list = []
-               for x in iNetwork.getAdapterList():
+               for x in iNetwork.getInstalledAdapters():
                        if x.startswith('eth'):
                                continue
-                       list.append((self.getAdapterDescription(x) + " (%s)"%x,x))
+                       description=self.getAdapterDescription(x)
+                       if description == "Unknown network adapter":
+                               list.append((description,x))
+                       else:
+                               list.append((description + " (%s)"%x,x))
                return list
 
        def getAdapterDescription(self, iface):
-               if iface == 'eth0':
-                       return _("Internal LAN adapter.")
-               else:
-                       classdir = "/sys/class/net/" + iface + "/device/"
-                       driverdir = "/sys/class/net/" + iface + "/device/driver/"
-                       if os_path.exists(classdir):
-                               files = listdir(classdir)
-                               if 'driver' in files:
-                                       if os_path.realpath(driverdir).endswith('rtw_usb_drv'):
-                                               return _("Realtak")+ " " + _("WLAN adapter.")
-                                       elif os_path.realpath(driverdir).endswith('ath_pci'):
-                                               return _("Atheros")+ " " + _("WLAN adapter.")
-                                       elif os_path.realpath(driverdir).endswith('zd1211b'):
-                                               return _("Zydas")+ " " + _("WLAN adapter.")
-                                       elif os_path.realpath(driverdir).endswith('rt73'):
-                                               return _("Ralink")+ " " + _("WLAN adapter.")
-                                       elif os_path.realpath(driverdir).endswith('rt73usb'):
-                                               return _("Ralink")+ " " + _("WLAN adapter.")
-                                       else:
-                                               return str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter")
+               classdir = "/sys/class/net/" + iface + "/device/"
+               driverdir = "/sys/class/net/" + iface + "/device/driver/"
+               if os_path.exists(classdir):
+                       files = listdir(classdir)
+                       if 'driver' in files:
+                               if os_path.realpath(driverdir).endswith('rtw_usb_drv'):
+                                       return _("Realtak")+ " " + _("WLAN adapter.")
+                               elif os_path.realpath(driverdir).endswith('ath_pci'):
+                                       return _("Atheros")+ " " + _("WLAN adapter.")
+                               elif os_path.realpath(driverdir).endswith('zd1211b'):
+                                       return _("Zydas")+ " " + _("WLAN adapter.")
+                               elif os_path.realpath(driverdir).endswith('rt73'):
+                                       return _("Ralink")+ " " + _("WLAN adapter.")
+                               elif os_path.realpath(driverdir).endswith('rt73usb'):
+                                       return _("Ralink")+ " " + _("WLAN adapter.")
                                else:
-                                       return _("Unknown network adapter.")
+                                       return str(os_path.basename(os_path.realpath(driverdir))) + " " + _("WLAN adapter")
+                       else:
+                               return _("Unknown network adapter")
+               else:
+                       return _("Unknown network adapter")
+
+       def cleanup(self):
+               iNetwork.stopGetInterfacesConsole()
 
 class WlanSetup(Screen,HelpableScreen):
        skin = """
@@ -180,6 +193,7 @@ class WlanSetup(Screen,HelpableScreen):
                        "left": self.left,
                        "right": self.right,
                }, -2)
+               self.onClose.append(self.cleanup)
 
        def loadDescription(self):
                if self["menulist"].getCurrent()[1] == 'setting':
@@ -212,6 +226,7 @@ class WlanSetup(Screen,HelpableScreen):
                self.loadDescription()
 
        def ok(self):
+               self.cleanup()
                if self["menulist"].getCurrent()[1] == 'setting':
                        self.session.openWithCallback(self.checklist, WlanConfig, self.iface)
                elif self["menulist"].getCurrent()[1] == 'scanap':
@@ -257,6 +272,10 @@ class WlanSetup(Screen,HelpableScreen):
                if data is True:
                        self.session.open(MessageBox, _("Finished restarting your network"), type = MessageBox.TYPE_INFO, timeout = 5, default = False)
 
+       def cleanup(self):
+               iNetwork.stopRestartConsole()
+               iNetwork.stopGetInterfacesConsole()
+
 wlanconfig = ConfigSubsection()
 wlanconfig.usedevice = ConfigSelection(default = "off", choices = [
        ("off", _("off")), ("on", _("on"))])
@@ -331,18 +350,23 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
                ConfigListScreen.__init__(self, self.list,session = self.session)
                self.oldInterfaceState = iNetwork.getAdapterAttribute(self.iface, "up")
                self.readWpaSupplicantConf()
-#              iNetwork.getInterfaces(self.readWlanSettings)
-               self.readWlanSettings()
                self.scanAPFailedTimer = eTimer()
                self.scanAPFailedTimer.callback.append(self.scanAPFailed)
                self.scanAplistTimer = eTimer()
                self.scanAplistTimer.callback.append(self.scanApList)
                self.Console = Console()
-               self.scanAplistTimer.start(100,True)
+#              self.scanAplistTimer.start(100,True)
+               self.updateInterfaces(self.readWlanSettings)
+               self.onClose.append(self.cleanup)
+
+       def updateInterfaces(self,callback = None):
+               iNetwork.config_ready = False
+               iNetwork.msgPlugins()
+               iNetwork.getInterfaces(callback)
 
        def readWlanSettings(self,ret=None):
                if ret is not True:
-                       print "getAddrInet Fail... "
+                       print "getInterfaces Fail... "
                if iNetwork.getAdapterAttribute(self.iface, "up") == True:
                        default_tmp = "on"
                else:
@@ -366,9 +390,9 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
 
                wlanconfig.gateway = ConfigIP(default=iNetwork.getAdapterAttribute(self.iface, "gateway") or [0,0,0,0])
 
-               self["ipaddress"] = StaticText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "ip"))))
-               self["netmask"] = StaticText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "netmask"))))
-               self["gateway"] = StaticText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "gateway"))))
+               self["ipaddress"].setText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "ip"))))
+               self["netmask"].setText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "netmask"))))
+               self["gateway"].setText(_(self.formatip(iNetwork.getAdapterAttribute(self.iface, "gateway"))))
 
                if self.encryption_key is not None:
                        default_tmp = "on"
@@ -401,6 +425,7 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
                        ("ascii", _("ASCII")), ("hex", _("HEX"))])
                default_tmp = self.encryption_key or "XXXXXXXX"
                wlanconfig.key = ConfigText(default = default_tmp, visible_width = 50, fixed_size = False)
+               self.scanAplistTimer.start(100,True)
 
        def readWpaSupplicantConf(self):
                try:
@@ -574,6 +599,8 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
                        self.createConfig()
 
        def saveWlanConfig(self):
+               if self["config"].getCurrent() == self.keyEntry or self["config"].getCurrent() == self.hiddenessidEntry :
+                       self["config"].getCurrent()[1].onDeselect(self.session)
                if self["config"].isChanged():
                        self.session.openWithCallback(self.checkNetworkShares, MessageBox, (_("Are you sure you want to restart your network interfaces?\n") ) )
                else:
@@ -581,6 +608,8 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
 
        def checkNetworkShares(self,ret = False):
                if ret == False:
+                       if self["config"].getCurrent() == self.keyEntry or self["config"].getCurrent() == self.hiddenessidEntry :
+                               self["config"].getCurrent()[1].onSelect(self.session)
                        return
                if not self.Console:
                        self.Console = Console()
@@ -596,6 +625,8 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
                        if split[2] in networks:
                                self.session.open(MessageBox, ("NOT deconfiguring network interfaces :\n network shares still mounted\n"), type = MessageBox.TYPE_ERROR, timeout = 10)
                                callback(False)
+                               if self["config"].getCurrent() == self.keyEntry or self["config"].getCurrent() == self.hiddenessidEntry :
+                                       self["config"].getCurrent()[1].onSelect(self.session)
                                return
                callback(True)
 
@@ -759,9 +790,24 @@ class WlanConfig(Screen, ConfigListScreen, HelpableScreen):
                        if data is True:
                                self.close()
 
-#      def selectionChanged(self):
-#              current = self["config"].getCurrent()
-#              print current
+       def cleanup(self):
+               iNetwork.stopRestartConsole()
+               iNetwork.stopGetInterfacesConsole()
+               iNetwork.stopDeactivateInterfaceConsole()
+               self.stopwlanscanapConsole()
+               self.stopCheckNetworkSharesConsole()
+
+       def stopwlanscanapConsole(self):
+               if self.wlanscanap is not None:
+                       if len(self.wlanscanap.appContainers):
+                               for name in self.wlanscanap.appContainers.keys():
+                                       self.wlanscanap.kill(name)
+
+       def stopCheckNetworkSharesConsole(self):
+               if self.Console is not None:
+                       if len(self.Console.appContainers):
+                               for name in self.Console.appContainers.keys():
+                                       self.Console.kill(name)
 
 class WlanScanAp(Screen,HelpableScreen):
        skin = """
@@ -847,6 +893,7 @@ class WlanScanAp(Screen,HelpableScreen):
                self.scanAplistTimer = eTimer()
                self.scanAplistTimer.callback.append(self.scanApList)
                self.scanAplistTimer.start(100,True)
+               self.onClose.append(self.cleanup)
                
        def left(self):
                self["menulist"].pageUp()
@@ -874,6 +921,7 @@ class WlanScanAp(Screen,HelpableScreen):
                global selectap
                selectAp=self["menulist"].getCurrent()[0]
                selectap = selectAp
+               self.cleanup()
                self.session.open(WlanConfig,self.iface)
 #              self.close()
 
@@ -967,6 +1015,15 @@ class WlanScanAp(Screen,HelpableScreen):
        def ScanAPclose(self,data):
                self.close()
 
+       def cleanup(self):
+               self.stopwlanscanapConsole()
+
+       def stopwlanscanapConsole(self):
+               if self.wlanscanap is not None:
+                       if len(self.wlanscanap.appContainers):
+                               for name in self.wlanscanap.appContainers.keys():
+                                       self.wlanscanap.kill(name)
+
 class NetworkAdapterTest(Screen):
        def __init__(self, session,iface):
                Screen.__init__(self, session)
@@ -1224,6 +1281,7 @@ class NetworkAdapterTest(Screen):
                        self["InfoText"].show()
                        self["key_red"].setText(_("Back"))
                if self.activebutton == 6: # Edit Settings
+                       self.cleanup()
                        self.session.open(WlanConfig,self.iface)
                        self["shortcuts"].setEnabled(True)              
                        self["infoshortcuts"].setEnabled(False)
@@ -1349,6 +1407,7 @@ class NetworkAdapterTest(Screen):
                                                
        def cleanup(self):
                iNetwork.stopLinkStateConsole()
+               iNetwork.stopPingConsole()
                iNetwork.stopDNSConsole()
 
        def AccessPointInfo(self,iface):
@@ -1358,7 +1417,7 @@ class NetworkAdapterTest(Screen):
 
        def readAP(self,result,retval,extra_args):
                (callback) = extra_args
-               self.apState = False
+               self.apState = None
                if self.iwconfigConsole is not None:
                        if retval == 0:
                                self.iwconfigConsole = None
@@ -1396,6 +1455,7 @@ class Wlanstatus(Screen):
                        "red": self.close,
                }, -2)
                self.readstatus()
+               self.onClose.append(self.cleanup)
 
        def readstatus(self):
                self.wlanstatus = Console()
@@ -1423,6 +1483,15 @@ class Wlanstatus(Screen):
        def ok(self):
                pass
 
+       def cleanup(self):
+               self.stopWlanStatusConsole()
+
+       def stopWlanStatusConsole(self):
+               if self.wlanstatus is not None:
+                       if len(self.wlanstatus.appContainers):
+                               for name in self.wlanstatus.appContainers.keys():
+                                       self.wlanstatus.kill(name)
+
 def openconfig(session, **kwargs):
        session.open(WlanSelection)
 
@@ -1431,7 +1500,7 @@ def selSetup(menuid, **kwargs):
        if menuid != "system":
                return [ ]
        else:
-               for x in iNetwork.getAdapterList():
+               for x in iNetwork.getInstalledAdapters():
                        if x.startswith('eth'):
                                continue
                        list.append(x)