Merge remote branch 'dm/experimental' into vuplus_experimental
authorChang.H.S <jhs@dev3>
Thu, 22 Sep 2011 01:27:06 +0000 (10:27 +0900)
committerChang.H.S <jhs@dev3>
Thu, 22 Sep 2011 01:27:06 +0000 (10:27 +0900)
112 files changed:
RecordTimer.py
SleepTimer.py [changed mode: 0644->0755]
configure.ac
data/defaults/Dream/settings.8000 [changed mode: 0644->0755]
data/keymap.xml
data/keymaps/dream-de.info
data/menu.xml
data/prev.png
data/rcpositions.xml [changed mode: 0644->0755]
data/setup.xml
data/skin.xml
data/skin_default/icons/dmm_logo.png
data/skin_default/icons/input_rcnew-configured.png
data/skin_default/icons/input_rcnew.png
data/skin_default/icons/input_rcold-configured.png
data/skin_default/icons/input_rcold.png
data/skin_default/picon_default.png
data/skin_default/rc.png
data/skin_default/rcold.png
data/skin_default/spinner/wait1.png
data/skin_default/spinner/wait2.png
data/skin_default/spinner/wait3.png
data/skin_default/spinner/wait4.png
data/startwizard.xml [changed mode: 0644->0755]
data/tutorialwizard.xml [changed mode: 0644->0755]
lib/driver/Makefile.am [changed mode: 0644->0755]
lib/driver/memtest.cpp [new file with mode: 0755]
lib/driver/memtest.h [new file with mode: 0755]
lib/driver/sc_test.cpp [new file with mode: 0755]
lib/driver/sc_test.h [new file with mode: 0755]
lib/dvb/decoder.cpp
lib/dvb/decoder.h
lib/dvb/dvb.cpp [changed mode: 0644->0755]
lib/dvb/frontend.cpp [changed mode: 0644->0755]
lib/dvb/pmt.cpp
lib/dvb/pmt.h
lib/gdi/glcddc.cpp [changed mode: 0644->0755]
lib/gdi/lcd.cpp [changed mode: 0644->0755]
lib/python/Components/AVSwitch.py [changed mode: 0644->0755]
lib/python/Components/Converter/ServiceInfo.py
lib/python/Components/Harddisk.py
lib/python/Components/Scanner.py
lib/python/Components/TunerInfo.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/Process.py [changed mode: 0644->0755]
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/SystemPlugins/Blindscan/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/Blindscan/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Blindscan/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/Blindscan/meta/plugin_blindscan.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/Blindscan/plugin.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py
lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/FactoryTest/testdb [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/Makefile.am
lib/python/Plugins/SystemPlugins/ManualFancontrol/InstandbyOn.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/ManualFancontrol/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/ManualFancontrol/__init__.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/ManualFancontrol/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/ManualFancontrol/meta/plugin_manualfancontrol.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/ManualFancontrol/plugin.py [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/OldSoftwareUpdate/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
lib/python/Plugins/SystemPlugins/SoftwareManager/imagewizard.xml
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/plugin.py
lib/python/Plugins/SystemPlugins/WirelessLanSetup/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/WirelessLanSetup/__init__.py [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/WirelessLanSetup/meta/Makefile.am [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/WirelessLanSetup/meta/plugin_wirelesslansetup.xml [new file with mode: 0644]
lib/python/Plugins/SystemPlugins/WirelessLanSetup/plugin.py [new file with mode: 0755]
lib/python/Screens/About.py
lib/python/Screens/AudioSelection.py
lib/python/Screens/ChannelSelection.py [changed mode: 0644->0755]
lib/python/Screens/DefaultWizard.py [changed mode: 0644->0755]
lib/python/Screens/InfoBar.py [changed mode: 0644->0755]
lib/python/Screens/InfoBarGenerics.py [changed mode: 0644->0755]
lib/python/Screens/InputDeviceSetup.py
lib/python/Screens/LanguageSelection.py
lib/python/Screens/Makefile.am
lib/python/Screens/NetworkSetup.py
lib/python/Screens/PluginBrowser.py
lib/python/Screens/ServiceScan.py
lib/python/Screens/SleepTimerEdit.py [changed mode: 0644->0755]
lib/python/Screens/Subtitles.py [new file with mode: 0755]
lib/python/Screens/TaskView.py [changed mode: 0644->0755]
lib/python/Screens/Wizard.py
lib/python/Tools/KeyBindings.py [changed mode: 0644->0755]
lib/python/enigma_python.i [changed mode: 0644->0755]
lib/service/servicedvb.cpp
main/bsod.cpp

index d8bed8f..d3ccd75 100755 (executable)
@@ -297,13 +297,13 @@ class RecordTimerEntry(timer.TimerEntry, object):
                                self.record_service = None
                        if self.afterEvent == AFTEREVENT.STANDBY:
                                if not Screens.Standby.inStandby: # not already in standby
-                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A finished record timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
                        elif self.afterEvent == AFTEREVENT.DEEPSTANDBY:
                                if not Screens.Standby.inTryQuitMainloop: # not a shutdown messagebox is open
                                        if Screens.Standby.inStandby: # in standby
                                                RecordTimerEntry.TryQuitMainloop() # start shutdown handling without screen
                                        else:
-                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                                               Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A finished record timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                        return True
 
        def setAutoincreaseEnd(self, entry = None):
old mode 100644 (file)
new mode 100755 (executable)
index 221e8f0..a6f39ef
@@ -26,12 +26,12 @@ class SleepTimerEntry(timer.TimerEntry):
                if self.state == self.StateRunning:
                        if config.SleepTimer.action.value == "shutdown":
                                if config.SleepTimer.ask.value and not Screens.Standby.inTryQuitMainloop:
-                                       Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
                                else:
                                        self.shutdown(True)
                        elif config.SleepTimer.action.value == "standby":
                                if config.SleepTimer.ask.value and not Screens.Standby.inStandby:
-                                       Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+                                       Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
                                else:
                                        self.standby(True)
 
index 0c54f5b..27beb1e 100644 (file)
@@ -200,6 +200,17 @@ lib/python/Plugins/SystemPlugins/Videomode/Makefile
 lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile
 lib/python/Plugins/SystemPlugins/WirelessLan/Makefile
 lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile
+lib/python/Plugins/SystemPlugins/FactoryTest/Makefile
+lib/python/Plugins/SystemPlugins/Fancontrol/Makefile
+lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile
+lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile
+lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile
+lib/python/Plugins/SystemPlugins/WirelessLanSetup/Makefile
+lib/python/Plugins/SystemPlugins/WirelessLanSetup/meta/Makefile
+lib/python/Plugins/SystemPlugins/ManualFancontrol/Makefile
+lib/python/Plugins/SystemPlugins/ManualFancontrol/meta/Makefile
+lib/python/Plugins/SystemPlugins/Blindscan/Makefile
+lib/python/Plugins/SystemPlugins/Blindscan/meta/Makefile
 lib/python/Tools/Makefile
 lib/service/Makefile
 lib/components/Makefile
@@ -209,4 +220,5 @@ tools/Makefile
 tools/enigma2.sh
 enigma2.pc
 ])
+AC_DEFINE(BUILD_VUPLUS,1,[Define to 1 for vuplus])
 AC_OUTPUT
old mode 100644 (file)
new mode 100755 (executable)
index 1fe4a4c..2787d5d
@@ -1 +1 @@
-config.misc.rcused=0
\ No newline at end of file
+config.misc.rcused=0
index f167024..10a36de 100755 (executable)
@@ -90,6 +90,8 @@
                        <key id="KEY_RECORD" mapto="instantRecord" flags="m" />
                </device>
                <device name="dreambox remote control (native)">
+<!--   ikseong insert KEY_RECORD action        -->
+                       <key id="KEY_RECORD" mapto="instantRecord" flags="m" />
                        <key id="KEY_RED" mapto="instantRecord" flags="b" />
                </device>
        </map>
                <key id="KEY_ENTER" mapto="ok" flags="m" />
                <key id="KEY_EXIT" mapto="back" flags="m" />
                <key id="KEY_ESC" mapto="back" flags="m" />
+<!--   ikseong for factory test        -->
+               <key id="KEY_SUBTITLE" mapto="test" flags="m" />
+               <key id="KEY_RADIO" mapto="testexit" flags="m" />
+               <key id="KEY_PAUSE" mapto="agingend" flags="m" />
+               <key id="KEY_STOP" mapto="agingfinish" flags="m" />             
+               <key id="KEY_GREEN" mapto="agingstart" flags="m" />
        </map>
        
        <map context="InfobarMenuActions">
                <key id="KEY_VIDEO" mapto="showMovies" flags="m" />
                <key id="KEY_RADIO" mapto="showRadio" flags="m" />
                <key id="KEY_TV" mapto="showTv" flags="m" />
+<!--   ikseong insert KEY_SUBTITLE action for subtitle hotkey  -->
+               <key id="KEY_SUBTITLE" mapto="showSubtitle" flags="m" />
        </map>
 
        <map context="InfobarAudioSelectionActions">
                </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>
 
                        <key id="KEY_BLUE" mapto="seekFwd" flags="b" />
                        <key id="KEY_RED" mapto="seekBackManual" flags="l" />
                        <key id="KEY_BLUE" mapto="seekFwdManual" flags="l" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_REWIND, KEY_FASTFORWARD -->
+                       <key id="KEY_PAUSE" mapto="pauseService" flags="m" />
+                       <key id="KEY_PLAY" mapto="playpauseService" flags="m" />
+                       <key id="KEY_REWIND" mapto="seekBack" flags="b" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
+                       <key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAY" mapto="playpauseService" flags="m" />
                        <key id="KEY_BLUE" mapto="seekFwd" flags="b" />
                        <key id="KEY_RED" mapto="seekBackManual" flags="l" />
                        <key id="KEY_BLUE" mapto="seekFwdManual" flags="l" />
+<!--   ikseong insert KEY_REWIND, KEY_FASTFORWARD      -->
+                       <key id="KEY_REWIND" mapto="seekBack" flags="b" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
+                       <key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
+                       <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PREVIOUSSONG" mapto="seekBack" flags="b" />
                <device name="dreambox remote control (native)">
                        <key id="KEY_YELLOW" mapto="timeshiftStart" flags="b" />
                        <key id="KEY_TV" mapto="timeshiftStop" flags="m" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_STOP    -->
+                       <key id="KEY_PLAY" mapto="timeshiftStart" flags="m" />
+                       <key id="KEY_PAUSE" mapto="timeshiftStart" flags="m" />
+                       <key id="KEY_STOP" mapto="timeshiftStop" flags="m" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAY" mapto="timeshiftStart" flags="m" />
                <device name="dreambox remote control (native)">
                        <key id="KEY_RED" mapto="timeshiftActivateEnd" flags="b" />
                        <key id="KEY_YELLOW" mapto="timeshiftActivateEndAndPause" flags="b" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_REWIND  -->
+                       <key id="KEY_PLAY" mapto="timeshiftActivateEndAndPause" flags="m" />
+                       <key id="KEY_REWIND" mapto="timeshiftActivateEnd" flags="m" />
+                       <key id="KEY_PAUSE" mapto="timeshiftActivateEndAndPause" flags="m" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PREVIOUSSONG" mapto="timeshiftActivateEnd" flags="m" />
        <map context="MoviePlayerActions">
                <device name="dreambox remote control (native)">
                        <key id="KEY_TV" mapto="leavePlayer" flags="m" />
+                       <key id="KEY_STOP" mapto="leavePlayer" flags="m" />
+<!--   ikseong insert KEY_SUBTITLE action for subtitle hotkey  -->
+                       <key id="KEY_SUBTITLE" mapto="showSubtitle" flags="m" />                
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_TV" mapto="leavePlayer" flags="m" />
                        <key id="KEY_RADIO" mapto="shift_record" flags="l" />
                        <key id="KEY_PREVIOUS" mapto="previous" flags="m" />
                        <key id="KEY_NEXT" mapto="next" flags="m" />
+<!--   ikseong insert KEY_PAUSE, KEY_PLAY, KEY_STOP, KEY_RECORD, KEY_REWIND, KEY_FASTFORWARD   -->
+                       <key id="KEY_PAUSE" mapto="pause" flags="m" />
+                       <key id="KEY_PLAY" mapto="play" flags="m" />
+                       <key id="KEY_STOP" mapto="stop" flags="b" />
+                       <key id="KEY_STOP" mapto="shift_stop" flags="l" />
+                       <key id="KEY_RECORD" mapto="shift_record" flags="l" />
                </device>
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PLAYPAUSE" mapto="pause" flags="m" />
index d7f5b07..1156ab3 100644 (file)
@@ -1,2 +1,2 @@
 kmap=dream-de.kmap
-name=Dreambox Keyboard Deutsch
+name=Keyboard Deutsch
index 6e10354..03e582c 100755 (executable)
@@ -62,7 +62,7 @@
                                <!--<item text="Remote Control"><setup id="rc" /></item>-->
                                <!--<item text="OSD"><setup id="osd" /></item>-->
                                <item level="0" text="Network" entryID="network_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
-                               <item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>
+                               <!--<item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>-->
                                <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item text="Keyboard"><setup id="keyboard" /></item>
                                <!--<menu level="1" text="Network..." entryID="network_setup">
@@ -83,6 +83,7 @@ def msgClosed(ret):
                from os import system, _exit
                system("rm -R /etc/enigma2")
                system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+               system("/usr/bin/showiframe /boot/backdrop.mvi")
                _exit(0)
 self.session.openWithCallback(msgClosed, FactoryReset)
 </code>
index 8c14a9f..895c6e8 100644 (file)
Binary files a/data/prev.png and b/data/prev.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 373ed73..3508025
@@ -1,88 +1,92 @@
+<!--   ikseong modify position as 750S RCU     -->
 <rcs>
        <rc id="0">
                <button name="SHIFT" pos="58,21" />
-               <button name="POWER" pos="90,21" />
+               <button name="POWER" pos="110,50" />
                <button name="DREAMSELECT" pos="54,53" />
                <button name="TVSELECT" pos="98,53" />
-               <button name="1" pos="37,83" />
-               <button name="2" pos="76,83" />
-               <button name="3" pos="115,83" />
-               <button name="4" pos="37,105" />
-               <button name="5" pos="76,105" />
-               <button name="6" pos="115,105" />
-               <button name="7" pos="37,126" />
-               <button name="8" pos="76,126" />
-               <button name="9" pos="115,126" />
-               <button name="ARROWLEFT" pos="37,148" />
-               <button name="0" pos="76,148" />
-               <button name="ARROWRIGHT" pos="115,148" />
-               <button name="VOL+" pos="30,184" />
-               <button name="VOL-" pos="39,208" />
-               <button name="MUTE" pos="76,179" />
-               <button name="EXIT" pos="76,201" />
-               <button name="BOUQUET+" pos="122,184" />
-               <button name="BOUQUET-" pos="113,208" />
-               <button name="INFO" pos="28,238" />
-               <button name="MENU" pos="124,238" />
-               <button name="OK" pos="77,266" />
-               <button name="UP" pos="77,241" />
-               <button name="DOWN" pos="77,291" />
-               <button name="LEFT" pos="48,266" />
-               <button name="RIGHT" pos="106,266" />
-               <button name="HELP" pos="32,298" />
-               <button name="PVR" pos="121,298" />
-               <button name="RED" pos="34,333" />
-               <button name="GREEN" pos="61,335" />
-               <button name="YELLOW" pos="90,335" />
-               <button name="BLUE" pos="118,333" />
-               <button name="REWIND" pos="37,365" />
-               <button name="PLAYPAUSE" pos="64,366" />
-               <button name="STOP" pos="90,366" />
-               <button name="FORWARD" pos="117,365" />
-               <button name="TV" pos="40,397" />
-               <button name="RADIO" pos="65,399" />
-               <button name="TEXT" pos="89,399" />
-               <button name="RECORD" pos="113,397" />
+               <button name="SUBTITLE" pos="60,70" />
+               <button name="1" pos="43,98" />
+               <button name="2" pos="74,98" />
+               <button name="3" pos="106,98" />
+               <button name="4" pos="43,126" />
+               <button name="5" pos="74,126" />
+               <button name="6" pos="106,126" />
+               <button name="7" pos="43,152" />
+               <button name="8" pos="74,152" />
+               <button name="9" pos="106,152" />
+               <button name="ARROWLEFT" pos="43,180" />
+               <button name="0" pos="74,180" />
+               <button name="ARROWRIGHT" pos="106,180" />
+               <button name="VOL+" pos="41,310" />
+               <button name="VOL-" pos="42,341" />
+               <button name="MUTE" pos="35,29" />
+               <button name="EXIT" pos="75,320" />
+               <button name="BOUQUET+" pos="105,317" />
+               <button name="BOUQUET-" pos="105,347" />
+               <button name="INFO" pos="75,340" />
+               <button name="MENU" pos="41,370" />
+               <button name="OK" pos="75,257" />
+               <button name="UP" pos="75,240" />
+               <button name="DOWN" pos="75,288" />
+               <button name="LEFT" pos="45,257" />
+               <button name="RIGHT" pos="105,257" />
+               <button name="HELP" pos="105,370" />
+               <button name="PVR" pos="64,370" />
+               <button name="RED" pos="39,206" />
+               <button name="GREEN" pos="63,206" />
+               <button name="YELLOW" pos="87,206" />
+               <button name="BLUE" pos="110,206" />
+               <button name="REWIND" pos="41,392" />
+               <button name="PLAYPAUSE" pos="86,392" />
+               <button name="STOP" pos="86,412" />
+               <button name="FORWARD" pos="109,392" />
+               <button name="TV" pos="41,412" />
+               <button name="RADIO" pos="109,412" />
+               <button name="TEXT" pos="38,72" />
+               <button name="RECORD" pos="64,412" />
        </rc>
        <rc id="1">
                <button name="SHIFT" pos="59,23" />
-               <button name="POWER" pos="93,23" />
+               <button name="POWER" pos="107,29" />
                <button name="DREAMSELECT" pos="51,55" />
                <button name="TVSELECT" pos="97,55" />
-               <button name="1" pos="38,81" />
-               <button name="2" pos="77,81" />
-               <button name="3" pos="113,81" />
-               <button name="4" pos="38,102" />
-               <button name="5" pos="77,102" />
-               <button name="6" pos="113,102" />
-               <button name="7" pos="38,122" />
-               <button name="8" pos="77,122" />
-               <button name="9" pos="113,122" />
-               <button name="ARROWLEFT" pos="38,143" />
-               <button name="0" pos="77,143" />
-               <button name="ARROWRIGHT" pos="113,143" />
-               <button name="VOL+" pos="31,181" />
-               <button name="VOL-" pos="42,206" />
-               <button name="MUTE" pos="76,172" />
-               <button name="EXIT" pos="76,194" />
-               <button name="BOUQUET+" pos="119,181" />
-               <button name="BOUQUET-" pos="111,206" />
-               <button name="INFO" pos="27,233" />
-               <button name="MENU" pos="125,233" />
-               <button name="OK" pos="77,262" />
-               <button name="UP" pos="76,235" />
-               <button name="DOWN" pos="76,289" />
-               <button name="LEFT" pos="45,262" />
-               <button name="RIGHT" pos="108,262" />
-               <button name="AUDIO" pos="31,295" />
-               <button name="VIDEO" pos="121,295" />
-               <button name="RED" pos="34,329" />
-               <button name="GREEN" pos="62,330" />
-               <button name="YELLOW" pos="89,330" />
-               <button name="BLUE" pos="118,329" />
-               <button name="TV" pos="37,362" />
-               <button name="RADIO" pos="62,363" />
-               <button name="TEXT" pos="89,363" />
-               <button name="HELP" pos="114,362" />
+               <button name="SUBTITLE" pos="64,73" />
+               <button name="1" pos="40,100" />
+               <button name="2" pos="76,100" />
+               <button name="3" pos="102,100" />
+               <button name="4" pos="40,108" />
+               <button name="5" pos="76,108" />
+               <button name="6" pos="102,108" />
+               <button name="7" pos="40,152" />
+               <button name="8" pos="76,152" />
+               <button name="9" pos="102,152" />
+               <button name="ARROWLEFT" pos="43,180" />
+               <button name="0" pos="76,180" />
+               <button name="ARROWRIGHT" pos="108,180" />
+               <button name="VOL+" pos="41,316" />
+               <button name="VOL-" pos="42,350" />
+               <button name="MUTE" pos="35,29" />
+               <button name="EXIT" pos="75,320" />
+               <button name="BOUQUET+" pos="106,316" />
+               <button name="BOUQUET-" pos="105,350" />
+               <button name="INFO" pos="76,342" />
+               <button name="MENU" pos="42,370" />
+               <button name="OK" pos="76,255" />
+               <button name="UP" pos="76,240" />
+               <button name="DOWN" pos="76,288" />
+               <button name="LEFT" pos="43,255" />
+               <button name="RIGHT" pos="106,255" />
+               <button name="RECORD" pos="65,414" />
+               <button name="AUDIO" pos="87,370" />
+               <button name="VIDEO" pos="64,370" />
+               <button name="RED" pos="40,204" />
+               <button name="GREEN" pos="64,204" />
+               <button name="YELLOW" pos="88,204" />
+               <button name="BLUE" pos="112,204" />
+               <button name="TV" pos="42,414" />
+               <button name="RADIO" pos="110,414" />
+               <button name="TEXT" pos="40,72" />
+               <button name="HELP" pos="108,370" />
        </rc>
-</rcs>
\ No newline at end of file
+</rcs>
index 8620709..ef0f1bc 100755 (executable)
                        <item level="0" text="Aspect Ratio">config.av.aspectratio</item>
                        <item level="0" text="TV System">config.av.tvsystem</item>
                        <item level="1" text="WSS on 4:3">config.av.wss</item>
-                       <item level="1" text="AC3 default">config.av.defaultac3</item>
-                       <item level="1" text="General AC3 delay (ms)">config.av.generalAC3delay</item>
+                       <item level="1" text="Dolby Digital default">config.av.defaultac3</item>
+                       <item level="1" text="General Dolby Digital delay (ms)">config.av.generalAC3delay</item>
                        <item level="1" text="General PCM delay (ms)">config.av.generalPCMdelay</item>
-                       <item level="1" text="AC3 downmix" requires="CanDownmixAC3">config.av.downmix_ac3</item>
+                       <item level="1" text="Dolby Digital downmix" requires="CanDownmixAC3">config.av.downmix_ac3</item>
                        <item level="1" text="Auto scart switching" requires="ScartSwitch">config.av.vcrswitch</item>
                </setup>
                <setup key="usage" title="Customize">
index b4b6cbc..ccd8eb7 100755 (executable)
                        <convert type="ConditionalShowHide" />
                </widget>
                <!-- Crypt icon (encrypted service?) -->
-               <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" />
+               <!-- ikseong
+               <ePixmap position="563,48" zPosition="0" size="107,15" pixmap="skin_default/icons/icons_off.png" />     -->
+               <ePixmap position="563,48" zPosition="0" size="80,15" pixmap="skin_default/icons/icons_off.png" />              
                <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_crypt.png" position="563,48" zPosition="1" size="12,16" alphatest="on">
                        <convert type="ServiceInfo">IsCrypted</convert>
                        <convert type="ConditionalShowHide" />
                        <convert type="ConditionalShowHide" />
                </widget>
                <!-- Audio icon (is there multichannel audio?) -->
+<!--   ikseong         
                <widget source="session.CurrentService" render="Pixmap" pixmap="skin_default/icons/icon_dolby.png" position="645,48" zPosition="1" size="26,16" alphatest="on">
                        <convert type="ServiceInfo">IsMultichannel</convert>
                        <convert type="ConditionalShowHide" />
-               </widget>
+               </widget>       -->
                <!-- Progressbar (current event duration)-->
                <ePixmap pixmap="skin_default/progress_bg.png" position="48,77" size="84,7" transparent="1" alphatest="on" />
                <widget source="session.Event_Now" render="Progress" pixmap="skin_default/progress_small.png" position="50,78" zPosition="1" size="80,5" transparent="1">
index 56f2965..71e9cb0 100644 (file)
Binary files a/data/skin_default/icons/dmm_logo.png and b/data/skin_default/icons/dmm_logo.png differ
index 6b16d39..c3cd6eb 100644 (file)
Binary files a/data/skin_default/icons/input_rcnew-configured.png and b/data/skin_default/icons/input_rcnew-configured.png differ
index 19cdeea..690c54c 100644 (file)
Binary files a/data/skin_default/icons/input_rcnew.png and b/data/skin_default/icons/input_rcnew.png differ
index 8d62685..c3cd6eb 100644 (file)
Binary files a/data/skin_default/icons/input_rcold-configured.png and b/data/skin_default/icons/input_rcold-configured.png differ
index ef8680b..690c54c 100644 (file)
Binary files a/data/skin_default/icons/input_rcold.png and b/data/skin_default/icons/input_rcold.png differ
index 61ec818..028f3d3 100644 (file)
Binary files a/data/skin_default/picon_default.png and b/data/skin_default/picon_default.png differ
index 9f5457d..2ea45e7 100644 (file)
Binary files a/data/skin_default/rc.png and b/data/skin_default/rc.png differ
index 030046a..8f28e12 100644 (file)
Binary files a/data/skin_default/rcold.png and b/data/skin_default/rcold.png differ
index 940e91a..49ffcc2 100644 (file)
Binary files a/data/skin_default/spinner/wait1.png and b/data/skin_default/spinner/wait1.png differ
index d534276..d19f3d3 100644 (file)
Binary files a/data/skin_default/spinner/wait2.png and b/data/skin_default/spinner/wait2.png differ
index 5534e35..229a91c 100644 (file)
Binary files a/data/skin_default/spinner/wait3.png and b/data/skin_default/spinner/wait3.png differ
index a052264..b96ad21 100644 (file)
Binary files a/data/skin_default/spinner/wait4.png and b/data/skin_default/spinner/wait4.png differ
old mode 100644 (file)
new mode 100755 (executable)
index a6b773e..c13a502
@@ -1,6 +1,7 @@
 <wizard>
                <step id="start" nextstep="introduction">
-                       <text value="Welcome.\n\nThis start wizard will guide you through the basic setup of your Dreambox.\nPress the OK button on your remote control to move to the next step." />
+                       <text value="Welcome.\n\nThis start wizard will guide you through the basic setup of your STB.\nPress the OK button on your remote control to move to the next step." />                        
+
                        <code>
 self.clearSelectedKeys()
 self.selectKey("OK")
@@ -128,7 +129,8 @@ self.condition = config.misc.startwizard.doservicescan.value and nimmanager.some
                        </list>
                </step>
                <step id="finisheddefaultsatlists">
-                       <text value="Do you want to enable the parental control feature on your dreambox?" />
+                       <text value="Do you want to enable the parental control feature on your STB?" />                        
+
                        <list>
                                <listentry caption="Yes" step="parentalsetup" />
                                <listentry caption="No" step="end" />
@@ -169,12 +171,14 @@ config.ParentalControl.setuppin.value = config.ParentalControl.servicepin[0].val
 config.ParentalControl.setuppin.save()
                        </code>
 
-                       <text value="After the start wizard is completed, you need to protect single services. Refer to your dreambox's manual on how to do that." />
+                       <text value="After the start wizard is completed, you need to protect single services. Refer to your STB's manual on how to do that." />
+
                </step>
                <step id="end" laststep="true">
                        <condition>
 self.condition = self.isLastWizard
                        </condition>
-                       <text value="Thank you for using the wizard. Your box is now ready to use.\nPlease press OK to start using your Dreambox." />
+                       <text value="Thank you for using the wizard. Your box is now ready to use.\nPlease press OK to start using your STB." />
+
                </step>
 </wizard>
old mode 100644 (file)
new mode 100755 (executable)
index bd2486b..2a8fffa
@@ -3,7 +3,7 @@
                        <text value="Do you want to view a tutorial?" />
                        <list>
                                <listentry caption="Yes, view the tutorial" step="next" />
-                               <listentry caption="No, just start my dreambox" step="end" />
+                               <listentry caption="No, just start my STB" step="end" />
                        </list>
                </step>
 
old mode 100644 (file)
new mode 100755 (executable)
index b498a6c..3412288
@@ -16,7 +16,9 @@ libenigma_driver_a_SOURCES = \
        rc.cpp \
        rcconsole.cpp \
        rcinput.cpp \
-       rfmod.cpp
+       rfmod.cpp \
+       memtest.cpp \
+       sc_test.cpp
 
 driverincludedir = $(pkgincludedir)/lib/driver
 driverinclude_HEADERS = \
diff --git a/lib/driver/memtest.cpp b/lib/driver/memtest.cpp
new file mode 100755 (executable)
index 0000000..94bc6aa
--- /dev/null
@@ -0,0 +1,55 @@
+#include <lib/driver/memtest.h>\r
+#include <errno.h>\r
+#include <lib/base/eerror.h>\r
+#include <lib/base/estring.h>\r
+\r
+#define TESTSIZE 32*1024\r
+\r
+eMemtest *eMemtest::instance;\r
+\r
+eMemtest::eMemtest()\r
+{\r
+       instance = this;\r
+\r
+}\r
+\r
+eMemtest::~eMemtest()\r
+{\r
+       instance=NULL;\r
+\r
+}\r
+/*\r
+*      return value\r
+*      0 - ok\r
+*      1 - fail\r
+*/\r
+int eMemtest::dramtest()\r
+{\r
+       int result=0;\r
+       int i;\r
+       char memt[TESTSIZE];\r
+       eDebug("dramtest start");\r
+\r
+       \r
+       for(i=0;i<TESTSIZE;i++)\r
+               memt[i]=0x13;\r
+       \r
+       for(i=0;i<TESTSIZE;i++)\r
+       {\r
+               if(memt[i]!=0x13)\r
+               {\r
+                       result=1;\r
+                       break;\r
+               }\r
+       }\r
+       \r
+       return result;\r
+               \r
+}\r
+\r
+int eMemtest::flashtest()\r
+{\r
+       int result=0;\r
+       \r
+       return result;\r
+}\r
diff --git a/lib/driver/memtest.h b/lib/driver/memtest.h
new file mode 100755 (executable)
index 0000000..a054eef
--- /dev/null
@@ -0,0 +1,21 @@
+#ifdef BUILD_VUPLUS /* ikseong  */\r
+#ifndef __memtest_h\r
+#define __memtest_h\r
+\r
+#include <lib/base/object.h>\r
+#include <lib/python/connections.h>\r
+\r
+class eMemtest\r
+{\r
+       static eMemtest *instance;\r
+public:\r
+       eMemtest();\r
+       ~eMemtest();\r
+       int dramtest();\r
+       int flashtest();\r
+       static eMemtest *getInstance() { return instance; }\r
+\r
+};\r
+#endif\r
+#endif\r
+\r
diff --git a/lib/driver/sc_test.cpp b/lib/driver/sc_test.cpp
new file mode 100755 (executable)
index 0000000..cfb1fcd
--- /dev/null
@@ -0,0 +1,325 @@
+#include <lib/dvb/dvb.h>\r
+#include <lib/dvb/frontendparms.h>\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <limits.h>\r
+#include <string.h>\r
+#include <errno.h>\r
+#include <sys/ioctl.h>\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <sys/poll.h>\r
+#include <fcntl.h>\r
+#include <time.h>\r
+#include <unistd.h>\r
+#include <termios.h>\r
+#include <lib/driver/sc_test.h>\r
+#include <errno.h>\r
+#include <lib/base/eerror.h>\r
+#include <lib/base/estring.h>\r
+\r
+#include <stdint.h>\r
+#include <sys/time.h>\r
+#include <poll.h>\r
+\r
+\r
+#define SC_CHECK_TIMEOUT       5\r
+#define SC_REMOVE_TIMEOUT      10\r
+\r
+\r
+#define SMART_CARD0    "/dev/sci0"                     /* upper smart card */\r
+#define SMART_CARD1    "/dev/sci1"                     /* lower smart card */\r
+\r
+#define SC_SUCCESS                     0\r
+#define NO_DEV_FOUND           -1\r
+#define SC_NOT_INSERTED        -2\r
+#define SC_NOT_VALID_ATR       -3\r
+#define SC_NOT_REMOVED         -4\r
+#define SC_READ_TIMEOUT        -5\r
+\r
+\r
+#define SCI_IOW_MAGIC                  's'\r
+\r
+/* ioctl cmd table */\r
+//#include "sci_global.h"\r
+#define IOCTL_SET_RESET                        _IOW(SCI_IOW_MAGIC, 1,  unsigned long)\r
+#define IOCTL_SET_MODES                        _IOW(SCI_IOW_MAGIC, 2,  SCI_MODES)\r
+#define IOCTL_GET_MODES                        _IOW(SCI_IOW_MAGIC, 3,  SCI_MODES)\r
+#define IOCTL_SET_PARAMETERS           _IOW(SCI_IOW_MAGIC, 4,  SCI_PARAMETERS)\r
+#define IOCTL_GET_PARAMETERS           _IOW(SCI_IOW_MAGIC, 5,  SCI_PARAMETERS)\r
+#define IOCTL_SET_CLOCK_START          _IOW(SCI_IOW_MAGIC, 6,  unsigned long)\r
+#define IOCTL_SET_CLOCK_STOP           _IOW(SCI_IOW_MAGIC, 7,  unsigned long)\r
+#define IOCTL_GET_IS_CARD_PRESENT      _IOW(SCI_IOW_MAGIC, 8,  unsigned long)\r
+#define IOCTL_GET_IS_CARD_ACTIVATED    _IOW(SCI_IOW_MAGIC, 9,  unsigned long)\r
+#define IOCTL_SET_DEACTIVATE           _IOW(SCI_IOW_MAGIC, 10, unsigned long)\r
+#define IOCTL_SET_ATR_READY            _IOW(SCI_IOW_MAGIC, 11, unsigned long)\r
+#define IOCTL_GET_ATR_STATUS           _IOW(SCI_IOW_MAGIC, 12, unsigned long)\r
+#define IOCTL_DUMP_REGS                        _IOW(SCI_IOW_MAGIC, 20, unsigned long)\r
+\r
+eSctest *eSctest::instance;\r
+\r
+eSctest::eSctest()\r
+{\r
+       instance = this;\r
+\r
+}\r
+\r
+eSctest::~eSctest()\r
+{\r
+       instance=NULL;\r
+\r
+}\r
+\r
+int eSctest::n_check_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       int readok=0;\r
+       \r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error\n");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d\n", fd);\r
+\r
+\r
+       ::ioctl(fd, IOCTL_GET_IS_CARD_PRESENT, &modem_status);\r
+\r
+       if( modem_status )\r
+               eDebug("card is now inserted\n");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted\n");\r
+               ::close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+\r
+       /* now smart card is inserted, let's do reset */\r
+\r
+       ::ioctl(fd, IOCTL_SET_RESET, &modem_status);\r
+\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+\r
+       while(poll(&pollfd, 1, 1000)>=0 && count--){\r
+\r
+               eDebug("pollfd.revents : 0x%x\n", pollfd.revents);\r
+               if(pollfd.revents & POLLIN){\r
+                       eDebug(">>read \n");\r
+                       cnt = read(fd, buf, 64);\r
+                       eDebug("<<read cnt:%d\n", cnt);                 \r
+                       if(cnt) \r
+                       {\r
+                               if(buf[0]==0x3b||buf[0]==0x3f)\r
+                               {\r
+                                       eDebug("read -%d : 0x%x",cnt, buf[0]);\r
+                                       readok = 1;\r
+                               }\r
+                               break;\r
+                       }\r
+                       else\r
+                               eDebug("no data\n");\r
+               }\r
+       }\r
+\r
+       ::close(fd);\r
+       \r
+       if (readok == 0) return SC_NOT_VALID_ATR;\r
+       if(!count) return SC_READ_TIMEOUT;\r
+       return SC_SUCCESS;\r
+}\r
+\r
+int eSctest::check_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       int readok=0;\r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d", fd);\r
+\r
+       ::tcflush(fd, TCIFLUSH);\r
+\r
+       ::ioctl(fd, TIOCMGET, &modem_status);\r
+\r
+       if( modem_status & TIOCM_CAR)\r
+               eDebug("card is now inserted");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted");\r
+               close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+\r
+       /* now smart card is inserted, let's do reset */\r
+\r
+       modem_status |= TIOCM_RTS;\r
+       ::ioctl(fd, TIOCMSET, &modem_status);\r
+\r
+       modem_status &= ~TIOCM_RTS;\r
+       ::ioctl(fd, TIOCMSET, &modem_status);\r
+\r
+\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+\r
+       while(poll(&pollfd, 1, 1000)>=0 && count--){\r
+\r
+               eDebug("pollfd.revents : 0x%x %d", pollfd.revents,count);\r
+               if(pollfd.revents & POLLIN){\r
+                       eDebug(">>read ");\r
+                       cnt = ::read(fd, buf, 64);\r
+                       eDebug("<<read cnt:%d", cnt);\r
+                       if(cnt) \r
+                       {\r
+                               int i;\r
+                               for( i = 0 ; i < cnt ; i ++)\r
+                               {\r
+                                       if(buf[i]!=0x0)\r
+                                               readok = 1;\r
+                                       eDebug("read : 0x%x", buf[i]);\r
+                               }\r
+                               break;\r
+                       }\r
+                       else\r
+                               eDebug("no data");\r
+               }\r
+       }\r
+       \r
+       ::close(fd);\r
+       eDebug("readok = %d",readok);\r
+       if (readok == 0) return SC_NOT_VALID_ATR;\r
+       if(count<=0 ) return SC_READ_TIMEOUT;\r
+       return SC_SUCCESS;\r
+}\r
+int eSctest::eject_smart_card(char *dev_name)\r
+{\r
+       int fd;\r
+       struct pollfd pollfd;\r
+       unsigned char buf[64];\r
+       int cnt = 0;\r
+       int modem_status;\r
+       int count = SC_CHECK_TIMEOUT;\r
+       \r
+       fd = ::open(dev_name, O_RDWR);\r
+       \r
+       if(fd < 0){\r
+               eDebug("sci0 open error");\r
+               return NO_DEV_FOUND;\r
+       }\r
+       else\r
+               eDebug("sci0 is opened fd : %d", fd);\r
+\r
+       ::tcflush(fd, TCIFLUSH);\r
+\r
+       ::ioctl(fd, TIOCMGET, &modem_status);\r
+\r
+       if( modem_status & TIOCM_CAR)\r
+               eDebug("card is now inserted");\r
+       else\r
+       {\r
+               eDebug("card is NOT inserted");\r
+               close(fd);\r
+               return SC_NOT_INSERTED;\r
+       }\r
+       /* now we can get the ATR */\r
+\r
+       pollfd.fd = fd;\r
+       pollfd.events = POLLIN|POLLOUT|POLLERR|POLLPRI;\r
+\r
+       /* let's wait until card is removed for count secs.*/\r
+       count = SC_REMOVE_TIMEOUT;      \r
+       do{\r
+               ::ioctl(fd, TIOCMGET, &modem_status);\r
+               eDebug("modem_status : 0x%x %d", modem_status,count);\r
+               sleep(1);       \r
+\r
+       }\r
+       while((modem_status&TIOCM_CAR) && count--);\r
+\r
+       if(count<=0 ) return SC_NOT_REMOVED;\r
+       \r
+       ::close(fd);            \r
+       return SC_SUCCESS;\r
+}\r
+\r
+\r
+int eSctest::VFD_Open()\r
+{\r
+       VFD_fd = open("/dev/dbox/lcd0", O_RDWR);\r
+       return VFD_fd;\r
+}\r
+\r
+int eSctest::turnon_VFD()\r
+{ \r
+       ioctl(VFD_fd, 0xa0a0a0a0, 0);\r
+}\r
+\r
+int eSctest::turnoff_VFD()\r
+{\r
+       ioctl(VFD_fd, 0x01010101, 0);   \r
+}\r
+\r
+void eSctest::VFD_Close()\r
+{\r
+       close(VFD_fd);\r
+}\r
+\r
+extern int frontend0_fd;\r
+extern int frontend1_fd;\r
+\r
+int eSctest::getFrontendstatus(int fe)\r
+{\r
+       fe_status_t status;\r
+\r
+       int m_fd;\r
+       int res;\r
+\r
+       if (fe == 0)\r
+               m_fd = frontend0_fd;\r
+       else if (fe==1)\r
+               m_fd = frontend1_fd;\r
+       else \r
+               return -1;\r
+\r
+       if (m_fd < 0)\r
+       {\r
+               eDebug("%d open error ",fe);\r
+               return -1;\r
+       }\r
+       else\r
+               eDebug("%d open ok!!!! ",m_fd);\r
+       \r
+       if ( ioctl(m_fd, FE_READ_STATUS, &status) < 0)\r
+               eDebug("%d read error ",fe);            \r
+\r
+       if (status&FE_HAS_LOCK)\r
+               return 1;\r
+       else\r
+               return 0;\r
+\r
+}\r
+\r
diff --git a/lib/driver/sc_test.h b/lib/driver/sc_test.h
new file mode 100755 (executable)
index 0000000..8529120
--- /dev/null
@@ -0,0 +1,139 @@
+#ifdef BUILD_VUPLUS /* ikseong  */
+#ifndef __sc_test_h
+#define __sc_test_h
+
+#include <lib/base/object.h>
+#include <lib/python/connections.h>
+
+class eSctest
+{
+       static eSctest *instance;
+protected:
+       int VFD_fd;
+       
+public:
+       eSctest();
+       ~eSctest();
+       int n_check_smart_card(char *dev_name);
+       int check_smart_card(char *dev_name);
+       int eject_smart_card(char *dev_name);
+       int VFD_Open();
+       void VFD_Close();
+       int turnon_VFD();
+       int turnoff_VFD();
+       int getFrontendstatus(int fe);
+       
+       static eSctest *getInstance() { return instance; }
+};
+
+#if !defined(_sci_global_h_)
+#define _sci_global_h_
+
+#define INT int
+#define UCHAR unsigned char
+#define ULONG unsigned long
+
+#define SCI_CLASS_A                 1   /* only 5V Vcc to Smart Card */
+#define SCI_CLASS_B                 2   /* only 3V Vcc to Smart Card */
+#define SCI_CLASS_AB                3   /* 5V or 3V Vcc to Smart Card */
+#define SCI_NUMBER_OF_CONTROLLERS   2   /* number of SCI controllers */
+
+#define SCI_BUFFER_SIZE             512
+
+#define SCI_CLOCK_STOP_DISABLED     0
+#define SCI_CLOCK_STOP_LOW          1
+#define SCI_CLOCK_STOP_HIGH         2
+
+#define SCI_MAX_ATR_SIZE            33
+
+#define SCI_MAX_F                   80000000
+#define SCI_MAX_ETU                 0xFFF
+#define SCI_MAX_WWT                 0xFFFFFFFF
+#define SCI_MAX_CWT                 0xFFFF
+#define SCI_MAX_BWT                 0xFFFFFFFF
+#define SCI_MAX_EGT                 0xFF
+
+#define SCI_MIN_F                   1000000
+#define SCI_MIN_ETU                 8
+#define SCI_MIN_WWT                 12
+#define SCI_MIN_CWT                 12
+#define SCI_MIN_BWT                 971
+#define SCI_MIN_EGT                 0
+
+#define SCI_SYNC                    0x00000001
+#define SCI_DATA_ANY                0x00000002
+
+/* Reserved for Future Use defined as 0 */
+#define RFU                         0
+
+/* error codes */
+typedef enum
+{
+    SCI_ERROR_OK = 0,
+    SCI_ERROR_DRIVER_NOT_INITIALIZED = -1691,
+    SCI_ERROR_FAIL,
+    SCI_ERROR_KERNEL_FAIL,
+    SCI_ERROR_NO_ATR,
+    SCI_ERROR_TS_CHARACTER_INVALID,
+    SCI_ERROR_LRC_FAIL,
+    SCI_ERROR_CRC_FAIL,
+    SCI_ERROR_LENGTH_FAIL,
+    SCI_ERROR_PARITY_FAIL,
+    SCI_ERROR_RX_OVERFLOW_FAIL,
+    SCI_ERROR_TX_OVERFLOW_FAIL,
+    SCI_ERROR_TX_UNDERRUN_FAIL,
+    SCI_ERROR_CARD_NOT_PRESENT,
+    SCI_ERROR_CARD_NOT_ACTIVATED,
+    SCI_ERROR_AWT_TIMEOUT,
+    SCI_ERROR_WWT_TIMEOUT,
+    SCI_ERROR_CWT_TIMEOUT,
+    SCI_ERROR_BWT_TIMEOUT,
+    SCI_ERROR_PARAMETER_OUT_OF_RANGE,
+    SCI_ERROR_TRANSACTION_ABORTED,
+    SCI_ERROR_CLOCK_STOP_DISABLED,
+    SCI_ERROR_TX_PENDING,
+    SCI_ERROR_ATR_PENDING
+}
+SCI_ERROR;
+
+/* SCI driver modes */
+typedef struct sci_modes
+{
+    INT emv2000;
+    INT dma;
+    INT man_act;
+    INT rw_mode;
+}
+SCI_MODES;
+
+/* SCI communication parameters */
+typedef struct sci_parameters
+{
+    UCHAR T;
+    ULONG FI;                          // Contains the clock rate conversion. This factor is used as an index into a table of maximum operating frequencies. When the smart card is reset, the smart card driver library uses this value to calculate a new clock frequency. 
+    ULONG ETU;                 //elementary time unit 
+    ULONG WWT;
+    ULONG CWT;
+    ULONG BWT;
+    ULONG EGT;                 //Extra Guard Time 
+    ULONG clock_stop_polarity;
+    UCHAR check;
+    UCHAR P;
+    UCHAR I;
+    UCHAR U;
+}
+SCI_PARAMETERS;
+
+/* SCI ATR status */
+typedef enum
+{
+    SCI_WITHOUT_ATR = 0,
+    SCI_ATR_READY
+}
+SCI_ATR_STATUS;
+
+#endif /* _sci_global_h_ */
+
+#endif
+#endif
+
index a89f72b..97cb99d 100644 (file)
@@ -206,6 +206,10 @@ int eDVBAudio::startPid(int pid, int type)
        case aDTSHD:
                bypass = 0x10;
                break;
+        case aDDP:
+                bypass = 0x22;
+                break;
+
        }
 
        eDebugNoNewLine("AUDIO_SET_BYPASS(%d) - ", bypass);
index 7610b65..ed8b6c7 100644 (file)
@@ -13,7 +13,7 @@ private:
        ePtr<eDVBDemux> m_demux;
        int m_fd, m_fd_demux, m_dev, m_is_freezed;
 public:
-       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD };
+       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD, aDDP  };
        eDVBAudio(eDVBDemux *demux, int dev);
        enum { aMonoLeft, aStereo, aMonoRight };
        void setChannel(int channel);
old mode 100644 (file)
new mode 100755 (executable)
index 0b1bdc2..af46823
@@ -1187,8 +1187,22 @@ void eDVBChannel::frontendStateChanged(iDVBFrontend*fe)
                }
        } else if (state == iDVBFrontend::stateFailed)
        {
+#ifdef BUILD_VUPLUS /* ikseong  */
+               if (m_current_frontend_parameters)
+               {
+                       eDebug("OURSTATE: lost lock, trying to retune");
+                       ourstate = state_tuning;
+                       m_frontend->get().tune(*m_current_frontend_parameters);
+               } 
+               else
+               {
+                       eDebug("OURSTATE: failed");
+                       ourstate = state_failed;
+               }
+#else
                eDebug("OURSTATE: failed");
                ourstate = state_failed;
+#endif         
        } else
                eFatal("state unknown");
 
old mode 100644 (file)
new mode 100755 (executable)
index 5718896..7777bf6
@@ -490,6 +490,11 @@ void eDVBFrontend::reopenFrontend()
        openFrontend();
 }
 
+#ifdef BUILD_VUPLUS /* ikseong */
+int frontend0_fd;
+int frontend1_fd;
+#endif
+
 int eDVBFrontend::openFrontend()
 {
        if (m_state != stateClosed)
@@ -514,6 +519,15 @@ int eDVBFrontend::openFrontend()
                                eWarning("failed! (%s) %m", m_filename);
                                return -1;
                        }
+#ifdef BUILD_VUPLUS /* ikseong */
+                       else
+                       {                               
+                               if (m_dvbid==0)
+                                       frontend0_fd = m_fd;
+                               else if (m_dvbid==1)
+                                       frontend1_fd = m_fd;
+                       }
+#endif
                }
                else
                        eWarning("frontend %d already opened", m_dvbid);
@@ -738,6 +752,10 @@ void eDVBFrontend::timeout()
        m_tuning = 0;
        if (m_state == stateTuning)
        {
+#ifdef BUILD_VUPLUS /* ikseong  */
+               eDVBFrontend *sec_fe = this;
+               sec_fe->m_data[CSW] = sec_fe->m_data[UCSW] = sec_fe->m_data[TONEBURST] = -1; // reset diseqc
+#endif
                m_state = stateFailed;
                m_stateChanged(this);
        }
index e5e6331..227928b 100644 (file)
@@ -18,6 +18,7 @@
 #include <dvbsi++/teletext_descriptor.h>
 #include <dvbsi++/video_stream_descriptor.h>
 #include <dvbsi++/registration_descriptor.h>
+#include <dvbsi++/ac3_descriptor.h>
 
 eDVBServicePMTHandler::eDVBServicePMTHandler()
        :m_ca_servicePtr(0), m_dvb_scan(0), m_decode_demux_num(0xFF), m_no_pat_entry_delay(eTimer::create())
@@ -471,9 +472,28 @@ int eDVBServicePMTHandler::getProgramInfo(program &program)
                                                                        audio.type = audioStream::atAACHE; // MPEG4-AAC
                                                                        break;
                                                                case AC3_DESCRIPTOR:
-                                                                       isaudio = 1;
+                                                               {    
+                                                                       Ac3Descriptor *ac = (Ac3Descriptor*)(*desc);
+
+                                                                       isaudio = 1; 
                                                                        audio.type = audioStream::atAC3;
+
+                                                                       if(ac->getAc3TypeFlag())
+                                                                       {    
+
+                                                                               uint8_t ac3type = ac->getAc3Type();
+                                                                               if( ( ac3type & 0x80 ) && ( (ac3type<<5) == 0xA0 || (ac3type<<5) == 0xC0) ) // From EN-300 468 v1.7.1 Table D.1
+                                                                                       audio.type = audioStream::atDDP;
+                                                                       }    
+
+                                                                       break;
+                                                               }     
+                                                               case ENHANCED_AC3_DESCRIPTOR:
+                                                                       isaudio = 1; 
+                                                                       audio.type = audioStream::atDDP;
                                                                        break;
+     
+
                                                                case REGISTRATION_DESCRIPTOR: /* some services don't have a separate AC3 descriptor */
                                                                {
                                                                        RegistrationDescriptor *d = (RegistrationDescriptor*)(*desc);
index 0c44f35..4be8000 100644 (file)
@@ -145,7 +145,7 @@ public:
        {
                int pid,
                    rdsPid; // hack for some radio services which transmit radiotext on different pid (i.e. harmony fm, HIT RADIO FFH, ...)
-               enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD };
+               enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD, atDDP  };
                int type; // mpeg2, ac3, dts, ...
                
                int component_tag;
old mode 100644 (file)
new mode 100755 (executable)
index bade53b..8ac8cd3
@@ -36,7 +36,11 @@ void gLCDDC::exec(const gOpcode *o)
        {
        case gOpcode::flush:
 //             if (update)
+#ifndef BUILD_VUPLUS /* ikseong  */
                        lcd->update();
+#else
+                       ;
+#endif
        default:
                gDC::exec(o);
                break;
old mode 100644 (file)
new mode 100755 (executable)
index 518ee1b..a5ac351
@@ -183,6 +183,9 @@ eDBoxLCD *eDBoxLCD::getInstance()
 
 void eDBoxLCD::update()
 {
+#ifdef BUILD_VUPLUS /* ikseong  */
+       return ;
+#endif
        if (lcdfd >= 0)
        {
                if (!is_oled || is_oled == 2)
old mode 100644 (file)
new mode 100755 (executable)
index 2658f9b..37d47f3
@@ -73,8 +73,8 @@ def InitAVSwitch():
        # when YUV is not enabled, don't let the user select it
        if config.av.yuvenabled.value:
                colorformat_choices["yuv"] = _("YPbPr")
-
-       config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="rgb")
+#      ikseong
+       config.av.colorformat = ConfigSelection(choices=colorformat_choices, default="cvbs")
        config.av.aspectratio = ConfigSelection(choices={
                        "4_3_letterbox": _("4:3 Letterbox"),
                        "4_3_panscan": _("4:3 PanScan"), 
index fa3518c..e2fa12c 100644 (file)
@@ -71,7 +71,7 @@ class ServiceInfo(Converter, object):
                                while idx < n:
                                        i = audio.getTrackInfo(idx)
                                        description = i.getDescription();
-                                       if "AC3" in description or "DTS" in description:
+                                       if "AC3" in description or "DTS" in description or "Dolby Digital" in description:
                                                return True
                                        idx += 1
                        return False
index 30a7b60..b13639e 100644 (file)
@@ -1,5 +1,7 @@
 from os import system, listdir, statvfs, popen, makedirs, stat, major, minor, path, access
-from Tools.Directories import SCOPE_HDD, resolveFilename
+#      ikseong
+from Tools.Directories import SCOPE_HDD, resolveFilename, fileExists
+
 from Tools.CList import CList
 from SystemInfo import SystemInfo
 import time
@@ -95,7 +97,13 @@ class Harddisk:
                return ret
 
        def diskSize(self):
-               line = readFile(self.sysfsPath('size'))
+               #       ikseong
+               try:
+                       line = readFile(self.sysfsPath('size'))
+               except:
+                       harddiskmanager.removeHotplugPartition(self.device)
+                       print "error remove",self.device
+                       return -1
                try:
                        cap = int(line)
                except:
@@ -109,14 +117,20 @@ class Harddisk:
                return "%d.%03d GB" % (cap/1000, cap%1000)
 
        def model(self):
-               if self.device[:2] == "hd":
-                       return readFile('/proc/ide/' + self.device + '/model')
-               elif self.device[:2] == "sd":
-                       vendor = readFile(self.sysfsPath('device/vendor'))
-                       model = readFile(self.sysfsPath('device/model'))
-                       return vendor + '(' + model + ')'
-               else:
-                       assert False, "no hdX or sdX"
+               #       ikseong
+               try:
+                       if self.device[:2] == "hd":
+                               return readFile('/proc/ide/' + self.device + '/model')
+                       elif self.device[:2] == "sd":
+                               vendor = readFile(self.sysfsPath('device/vendor'))
+                               model = readFile(self.sysfsPath('device/model'))
+                               return vendor + '(' + model + ')'
+                       else:
+                               assert False, "no hdX or sdX"
+               except:
+                       harddiskmanager.removeHotplugPartition(self.device)
+                       print "error remove",self.device
+                       return -1
 
        def free(self):
                try:
@@ -228,7 +242,12 @@ class Harddisk:
                return (res >> 8)
 
        def createMovieFolder(self):
+#      ikseong
                try:
+                       if not fileExists("/hdd", 0):
+                               print "not found /hdd"
+                               system("ln -s /media/hdd /hdd")
+#                              
                        makedirs(resolveFilename(SCOPE_HDD))
                except OSError:
                        return -1
@@ -337,6 +356,10 @@ class Harddisk:
                idle_time = t - self.last_access
 
                stats = self.readStats()
+               #       ikseong
+               if stats == -1:
+                       self.setIdleTime(0)
+                       return
                print "nr_read", stats[0], "nr_write", stats[1]
                l = sum(stats)
                print "sum", l, "prev_sum", self.last_stat
@@ -533,6 +556,7 @@ class HarddiskManager:
        def getAutofsMountpoint(self, device):
                return "/autofs/%s/" % (device)
 
+
        def is_hard_mounted(self, device):
                mounts = file('/proc/mounts').read().split('\n')
                for x in mounts:
@@ -601,6 +625,9 @@ class HarddiskManager:
        def HDDList(self):
                list = [ ]
                for hd in self.hdd:
+                       #       ikseong
+                       if hd.model() == -1:
+                               continue
                        hdd = hd.model() + " - " + hd.bus()
                        cap = hd.capacity()
                        if cap != "":
index e01c61f..a004204 100644 (file)
@@ -1,7 +1,7 @@
 from Plugins.Plugin import PluginDescriptor
 from Components.PluginComponent import plugins
 
-from os import path as os_path, walk as os_walk
+from os import path as os_path, walk as os_walk, system
 from mimetypes import guess_type, add_type
 
 add_type("application/x-debian-package", ".ipk")
@@ -128,6 +128,8 @@ def scanDevice(mountpoint):
        for p in paths_to_scan:
                path = os_path.join(mountpoint, p.path)
 
+                cmd = "ls " + path
+                system(cmd)
                for root, dirs, files in os_walk(path):
                        for f in files:
                                path = os_path.join(root, f)
old mode 100644 (file)
new mode 100755 (executable)
index 39f54c0..68d5464
@@ -60,7 +60,9 @@ class TunerInfo(GUIComponent):
                        value = self.getValue(self.LOCK)
 
                if self.type == self.SNR_DB:
-                       if value != 0x12345678:
+#      ikseong         
+#                      if value != 0x12345678:
+                       if value is not None and value != 0x12345678:
                                self.setText("%3.02f dB" % (value / 100.0))
                        else:
                                self.setText("")
old mode 100644 (file)
new mode 100755 (executable)
index 6dbcd49..51e0352
@@ -31,7 +31,7 @@ class DVDProject:
                self.target = None
                self.settings = ConfigSubsection()
                self.settings.name = ConfigText(fixed_size = False, visible_width = 40)
-               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("Dreambox format data DVD (HDTV compatible)"))])
+               self.settings.authormode = ConfigSelection(choices = [("menu_linked", _("Linked titles with a DVD menu")), ("just_linked", _("Direct playback of linked titles without menu")), ("menu_seperate", _("Seperate titles with a main menu")), ("data_ts", _("STB format data DVD (HDTV compatible)"))])
                self.settings.titlesetmode = ConfigSelection(choices = [("single", _("Simple titleset (compatibility for legacy players)")), ("multi", _("Complex (allows mixing audio tracks and aspects)"))], default="multi")
                self.settings.output = ConfigSelection(choices = [("iso", _("Create DVD-ISO")), ("dvd", _("Burn DVD"))])
                self.settings.isopath = ConfigText(fixed_size = False, visible_width = 40)
old mode 100644 (file)
new mode 100755 (executable)
index a928ae2..816551c
@@ -902,7 +902,7 @@ class DVDJob(Job):
                                tool = "genisoimage"
                                isopathfile = getISOfilename(self.project.settings.isopath.getValue(), volName)
                                burnargs = [ "-o", isopathfile ]
-                       burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, self.workspace + "/dvd" ]
+                       burnargs += [ "-dvd-video", "-publisher", "STB", "-V", volName, self.workspace + "/dvd" ]
                        BurnTask(self, burnargs, tool)
                RemoveDVDFolder(self)
 
@@ -948,7 +948,7 @@ class DVDdataJob(Job):
                        burnargs += ["-iso-level", "4", "-allow-limited-size" ]
                elif self.project.settings.dataformat.getValue() == "udf":
                        burnargs += ["-udf", "-allow-limited-size" ]
-               burnargs += [ "-publisher", "Dreambox", "-V", volName, "-follow-links", self.workspace ]
+               burnargs += [ "-publisher", "STB", "-V", volName, "-follow-links", self.workspace ]
                BurnTask(self, burnargs, tool)
                RemoveDVDFolder(self)
 
@@ -969,6 +969,6 @@ class DVDisoJob(Job):
                        burnargs = [ "-Z", "/dev/" + harddiskmanager.getCD(), "-dvd-compat" ]
                        if getSize(imagepath)/(1024*1024) > self.project.MAX_SL:
                                burnargs += [ "-use-the-force-luke=4gms", "-speed=1", "-R" ]
-                       burnargs += [ "-dvd-video", "-publisher", "Dreambox", "-V", volName, imagepath ]
+                       burnargs += [ "-dvd-video", "-publisher", "STB", "-V", volName, imagepath ]
                tool = "growisofs"
                BurnTask(self, burnargs, tool)
index 2cbeb63..e2a8675 100755 (executable)
@@ -212,7 +212,7 @@ class TitleList(Screen, HelpableScreen):
                if source is None:
                        return None
                if not source.getPath().endswith(".ts"):
-                       self.session.open(MessageBox,text = _("You can only burn Dreambox recordings!"), type = MessageBox.TYPE_ERROR)
+                       self.session.open(MessageBox,text = _("You can only burn STB recordings!"), type = MessageBox.TYPE_ERROR)
                        return None
                t = self.project.addService(source)
                try:
@@ -350,7 +350,7 @@ class TitleList(Screen, HelpableScreen):
                t = self.current_edit_title
                t.titleEditDone(cutlist)
                if t.VideoType != 0:
-                       self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a Dreambox format data DVD (which will not play in stand-alone DVD players) instead?"), type = MessageBox.TYPE_YESNO)
+                       self.session.openWithCallback(self.DVDformatCB,MessageBox,text = _("The DVD standard doesn't support H.264 (HDTV) video streams. Do you want to create a STB format data DVD (which will not play in stand-alone DVD players) instead?"), type = MessageBox.TYPE_YESNO)
                else:
                        self.updateTitleList()
 
index 6ff1c5a..75fba2d 100644 (file)
@@ -137,8 +137,9 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
 
                self.seek_target = None
 
-               from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
-               hotplugNotifier.append(self.hotplugCB)
+#      ikseong
+#              from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
+#              hotplugNotifier.append(self.hotplugCB)
 
                class MoviePlayerActionMap(NumberActionMap):
                        def __init__(self, player, contexts = [ ], actions = { }, prio=0):
@@ -168,8 +169,11 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                                "prevBouquet": (self.switchToPlayList, _("switch to playlist")),
                                "nextBouquet": (self.switchToFileList, _("switch to filelist")),
                                "delete": (self.deletePlaylistEntry, _("delete playlist entry")),
-                               "shift_stop": (self.clear_playlist, _("clear playlist")),
-                               "shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")),
+#ikseong                               
+#                              "shift_stop": (self.clear_playlist, _("clear playlist")),
+#                              "shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")),
+                               "shift_stop": self.clear_playlist,
+                               "shift_record": self.playlist.PlayListShuffle,
                                "subtitles": (self.subtitleSelection, _("Subtitle selection")),
                        }, -2)
 
@@ -248,8 +252,9 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                if config.mediaplayer.saveDirOnExit.getValue():
                        config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
                        config.mediaplayer.defaultDir.save()
-               from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
-               hotplugNotifier.remove(self.hotplugCB)
+#      ikseong                 
+#      from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
+#      hotplugNotifier.remove(self.hotplugCB)
                del self["coverArt"].picload
                self.close()
 
@@ -277,13 +282,13 @@ class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoB
                currPlay = self.session.nav.getCurrentService()
                sTagAudioCodec = currPlay.info().getInfoString(iServiceInformation.sTagAudioCodec)
                print "[__evAudioDecodeError] audio-codec %s can't be decoded by hardware" % (sTagAudioCodec)
-               self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sTagAudioCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
+               self.session.open(MessageBox, _("This STB can't decode %s streams!") % sTagAudioCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
 
        def __evVideoDecodeError(self):
                currPlay = self.session.nav.getCurrentService()
                sTagVideoCodec = currPlay.info().getInfoString(iServiceInformation.sTagVideoCodec)
                print "[__evVideoDecodeError] video-codec %s can't be decoded by hardware" % (sTagVideoCodec)
-               self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sTagVideoCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
+               self.session.open(MessageBox, _("This STB can't decode %s streams!") % sTagVideoCodec, type = MessageBox.TYPE_INFO,timeout = 20 )
 
        def __evPluginError(self):
                currPlay = self.session.nav.getCurrentService()
diff --git a/lib/python/Plugins/SystemPlugins/Blindscan/Makefile.am b/lib/python/Plugins/SystemPlugins/Blindscan/Makefile.am
new file mode 100755 (executable)
index 0000000..6ab9e22
--- /dev/null
@@ -0,0 +1,8 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/Blindscan
+
+SUBDIRS = meta
+
+install_PYTHON =        \
+       __init__.py \
+       plugin.py 
+
diff --git a/lib/python/Plugins/SystemPlugins/Blindscan/__init__.py b/lib/python/Plugins/SystemPlugins/Blindscan/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/Blindscan/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/Blindscan/meta/Makefile.am
new file mode 100755 (executable)
index 0000000..62195c6
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_blindscan.xml
diff --git a/lib/python/Plugins/SystemPlugins/Blindscan/meta/plugin_blindscan.xml b/lib/python/Plugins/SystemPlugins/Blindscan/meta/plugin_blindscan.xml
new file mode 100755 (executable)
index 0000000..1954e92
--- /dev/null
@@ -0,0 +1,16 @@
+<default>
+         <prerequisites>
+                    <tag type="System" />
+         </prerequisites>
+          <info>
+                    <author>doliyu and oskwon</author>
+                    <name>Blindscan</name>
+                    <packagename>enigma2-plugin-systemplugins-blindscan</packagename>
+                    <shortdescription>vuplus blindscan...</shortdescription>
+                    <description>vuplus blindscan...</description>
+          </info>
+
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-blindscan" />
+       </files>
+</default>
diff --git a/lib/python/Plugins/SystemPlugins/Blindscan/plugin.py b/lib/python/Plugins/SystemPlugins/Blindscan/plugin.py
new file mode 100644 (file)
index 0000000..1d28d2a
--- /dev/null
@@ -0,0 +1,478 @@
+from Plugins.Plugin import PluginDescriptor
+
+from Screens.Screen import Screen
+from Screens.ServiceScan import ServiceScan
+from Screens.MessageBox import MessageBox
+from Screens.DefaultWizard import DefaultWizard
+
+from Components.Label import Label
+from Components.TuneTest import Tuner
+from Components.ConfigList import ConfigListScreen
+from Components.Sources.StaticText import StaticText
+from Components.ActionMap import NumberActionMap, ActionMap
+from Components.NimManager import nimmanager, getConfigSatlist
+from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
+
+from Tools.HardwareInfo import HardwareInfo
+from Tools.Directories import resolveFilename, SCOPE_DEFAULTPARTITIONMOUNTDIR, SCOPE_DEFAULTDIR, SCOPE_DEFAULTPARTITION
+
+from enigma import eTimer, eDVBFrontendParametersSatellite, eComponentScan, eDVBSatelliteEquipmentControl, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersCable, eConsoleAppContainer, eDVBResourceManager
+
+class Blindscan(ConfigListScreen, Screen):
+       skin="""
+               <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/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.current_play_service = self.session.nav.getCurrentlyPlayingServiceReference()
+
+               # update sat list
+               self.satList = []
+               for slot in nimmanager.nim_slots:
+                       if slot.isCompatible("DVB-S"):
+                               self.satList.append(nimmanager.getSatListForNim(slot.slot))
+
+               # make config
+               self.createConfig()
+
+               self.list = []
+               self.status = ""
+
+               ConfigListScreen.__init__(self, self.list)
+               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 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:
+                               print "getRawChannel failed"
+               else:
+                       print "getResourceManager instance failed"
+               return False
+
+       def createConfig(self):
+               self.feinfo = None
+               frontendData = None
+               defaultSat = {
+                       "orbpos": 192,
+                       "system": eDVBFrontendParametersSatellite.System_DVB_S,
+                       "frequency": 11836,
+                       "inversion": eDVBFrontendParametersSatellite.Inversion_Unknown,
+                       "symbolrate": 27500,
+                       "polarization": eDVBFrontendParametersSatellite.Polarisation_Horizontal,
+                       "fec": eDVBFrontendParametersSatellite.FEC_Auto,
+                       "fec_s2": eDVBFrontendParametersSatellite.FEC_9_10,
+                       "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":
+                               defaultSat["system"] = frontendData.get("system", eDVBFrontendParametersSatellite.System_DVB_S)
+                               defaultSat["frequency"] = frontendData.get("frequency", 0) / 1000
+                               defaultSat["inversion"] = frontendData.get("inversion", eDVBFrontendParametersSatellite.Inversion_Unknown)
+                               defaultSat["symbolrate"] = frontendData.get("symbol_rate", 0) / 1000
+                               defaultSat["polarization"] = frontendData.get("polarization", eDVBFrontendParametersSatellite.Polarisation_Horizontal)
+                               if defaultSat["system"] == eDVBFrontendParametersSatellite.System_DVB_S2:
+                                       defaultSat["fec_s2"] = frontendData.get("fec_inner", eDVBFrontendParametersSatellite.FEC_Auto)
+                                       defaultSat["rolloff"] = frontendData.get("rolloff", eDVBFrontendParametersSatellite.RollOff_alpha_0_35)
+                                       defaultSat["pilot"] = frontendData.get("pilot", eDVBFrontendParametersSatellite.Pilot_Unknown)
+                               else:
+                                       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 = "hi_low", choices = [("low", _("low")), ("high", _("high")), ("hi_low", _("hi_low"))])
+
+               #ConfigYesNo(default = True)
+               self.blindscan_start_frequency = ConfigInteger(default = 950*1000000)
+               self.blindscan_stop_frequency = ConfigInteger(default = 2150*1000000)
+               self.blindscan_start_symbol = ConfigInteger(default = 2*1000000)
+               self.blindscan_stop_symbol = ConfigInteger(default = 45*1000000)
+
+               # collect all nims which are *not* set to "nothing"
+               nim_list = []
+               for n in nimmanager.nim_slots:
+                       if n.config_mode == "nothing":
+                               continue
+                       if n.config_mode == "advanced" and len(nimmanager.getSatListForNim(n.slot)) < 1:
+                               continue
+                       if n.config_mode in ("loopthrough", "satposdepends"):
+                               root_id = nimmanager.sec.getRoot(n.slot_id, int(n.config.connectedTo.value))
+                               if n.type == nimmanager.nim_slots[root_id].type: # check if connected from a DVB-S to DVB-S2 Nim or vice versa
+                                       continue
+                       nim_list.append((str(n.slot), n.friendly_full_description))
+
+               self.scan_nims = ConfigSelection(choices = nim_list)
+
+               # 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 = eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, choices = [
+                       (eDVBFrontendParametersSatellite.Polarisation_CircularRight + 1, _("horizontal_vertical")),
+                       (eDVBFrontendParametersSatellite.Polarisation_Horizontal, _("horizontal")),
+                       (eDVBFrontendParametersSatellite.Polarisation_Vertical, _("vertical")),
+                       (eDVBFrontendParametersSatellite.Polarisation_CircularLeft, _("circular left")),
+                       (eDVBFrontendParametersSatellite.Polarisation_CircularRight, _("circular right"))])
+               self.scan_scansat = {}
+               for sat in nimmanager.satList:
+                       self.scan_scansat[sat[0]] = ConfigYesNo(default = False)
+               
+               self.scan_satselection = []
+               for slot in nimmanager.nim_slots:
+                       if slot.isCompatible("DVB-S"):
+                               self.scan_satselection.append(getConfigSatlist(defaultSat["orbpos"], self.satList[slot.slot]))
+               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()
+               print "cur is", cur
+               if cur == self.tunerEntry or \
+                       cur == self.systemEntry or \
+                       (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()
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+               self.newConfig()
+                       
+       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.checkSettings() == False:
+                       return
+
+               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:
+                       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
+
+               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.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)
+
+               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.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)
+
+               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)
+
+               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.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)
+                                                           
+def Plugins(**kwargs):            
+       return PluginDescriptor(name=_("Blindscan"), description="scan type(DVB-S)", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
+
index f34f0a3..93ee28e 100755 (executable)
@@ -1,6 +1,7 @@
 <default>
          <prerequisites>
                     <hardware type="dm8000" />
+                    <hardware type="dm500hd" />
                     <tag type="CI" />
                     <tag type="System" />
          </prerequisites>
index b345428..5f2f82a 100644 (file)
@@ -57,6 +57,10 @@ class CIselectMainMenu(Screen):
                                        appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
                                elif state == 2:
                                        appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
+                               #       ikseong                                 
+                               else :
+                                       appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
+                               #
                                self.list.append( (appname, ConfigNothing(), 0, slot) )
                else:
                        self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )
index ab74de4..25a06eb 100644 (file)
@@ -176,7 +176,7 @@ class CrashlogAutoSubmitConfiguration(Screen, ConfigListScreen):
                        self.enableVKeyIcon()
                        self.showKeypad()
                elif current == self.AnonCrashlogEntry:
-                       self["status"].setText(_("Adds enigma2 settings and dreambox model informations like SN, rev... if enabled."))
+                       self["status"].setText(_("Adds enigma2 settings and STB model informations like SN, rev... if enabled."))
                        self.disableVKeyIcon()
                elif current == self.NetworkEntry:
                        self["status"].setText(_("Adds network configuration if enabled."))
@@ -333,15 +333,16 @@ def mxServerFound(mxServer,session):
                if crashlog.startswith("enigma2_crash_") and crashlog.endswith(".log"):
                        print "[CrashlogAutoSubmit] - found crashlog: ",os.path.basename(crashlog)
                        crashLogFilelist.append('/media/hdd/' + crashlog)
-
-       if len(crashLogFilelist):
-               if config.plugins.crashlogautosubmit.sendmail.value == "send":
-                       Notifications.AddNotificationWithCallback(handleAnswer, ChoiceBox, title=_("Crashlogs found!\nSend them to Dream Multimedia?"), list = list)
-               elif config.plugins.crashlogautosubmit.sendmail.value == "send_always":
-                       send_mail()
-       else:
-               print "[CrashlogAutoSubmit] - no crashlogs found."
-
+#      ikseong
+#      if len(crashLogFilelist):
+#              if config.plugins.crashlogautosubmit.sendmail.value == "send":
+#                      session.openWithCallback(handleAnswer, ChoiceBox, title=_("Crashlogs found!\nSend them to Dream Multimedia ?"), list = list)
+#              elif config.plugins.crashlogautosubmit.sendmail.value == "send_always":
+#                      send_mail()
+#      else:   
+#              print "[CrashlogAutoSubmit] - no crashlogs found."
+#
+       print "block to handle Crashlogs "
 
 def getMailExchange(host):
        print "[CrashlogAutoSubmit] - getMailExchange"
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/Makefile.am
new file mode 100755 (executable)
index 0000000..36e60c8
--- /dev/null
@@ -0,0 +1,10 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/FPGAUpgrade
+
+SUBDIRS = meta
+
+install_PYTHON =        \
+       __init__.py \
+       plugin.py \
+       fpga.py \
+       fpga.conf \
+       _fpga.so
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so
new file mode 100644 (file)
index 0000000..078852e
Binary files /dev/null and b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/_fpga.so differ
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf
new file mode 100644 (file)
index 0000000..2482692
--- /dev/null
@@ -0,0 +1 @@
+http://archive.vuplus.com/download/fpga/
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.py
new file mode 100644 (file)
index 0000000..437e654
--- /dev/null
@@ -0,0 +1,100 @@
+# This file was automatically generated by SWIG (http://www.swig.org).
+# Version 1.3.39
+#
+# Do not make changes to this file unless you know what you are doing--modify
+# the SWIG interface file instead.
+# This file is compatible with both classic and new-style classes.
+
+from sys import version_info
+if version_info >= (2,6,0):
+    def swig_import_helper():
+        from os.path import dirname
+        import imp
+        fp = None
+        try:
+            fp, pathname, description = imp.find_module('_fpga', [dirname(__file__)])
+        except ImportError:
+            import _fpga
+            return _fpga
+        if fp is not None:
+            try:
+                _mod = imp.load_module('_fpga', fp, pathname, description)
+            finally:
+                fp.close()
+                return _mod
+    _fpga = swig_import_helper()
+    del swig_import_helper
+else:
+    import _fpga
+del version_info
+try:
+    _swig_property = property
+except NameError:
+    pass # Python < 2.2 doesn't have 'property'.
+def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+    if (name == "thisown"): return self.this.own(value)
+    if (name == "this"):
+        if type(value).__name__ == 'SwigPyObject':
+            self.__dict__[name] = value
+            return
+    method = class_type.__swig_setmethods__.get(name,None)
+    if method: return method(self,value)
+    if (not static) or hasattr(self,name):
+        self.__dict__[name] = value
+    else:
+        raise AttributeError("You cannot add attributes to %s" % self)
+
+def _swig_setattr(self,class_type,name,value):
+    return _swig_setattr_nondynamic(self,class_type,name,value,0)
+
+def _swig_getattr(self,class_type,name):
+    if (name == "thisown"): return self.this.own()
+    method = class_type.__swig_getmethods__.get(name,None)
+    if method: return method(self)
+    raise AttributeError(name)
+
+def _swig_repr(self):
+    try: strthis = "proxy of " + self.this.__repr__()
+    except: strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+try:
+    _object = object
+    _newclass = 1
+except AttributeError:
+    class _object : pass
+    _newclass = 0
+
+
+DP_NO_ACTION_FOUND = _fpga.DP_NO_ACTION_FOUND
+DP_DEVICE_INFO_ACTION_CODE = _fpga.DP_DEVICE_INFO_ACTION_CODE
+DP_READ_IDCODE_ACTION_CODE = _fpga.DP_READ_IDCODE_ACTION_CODE
+DP_ERASE_ACTION_CODE = _fpga.DP_ERASE_ACTION_CODE
+DP_PROGRAM_ACTION_CODE = _fpga.DP_PROGRAM_ACTION_CODE
+DP_VERIFY_ACTION_CODE = _fpga.DP_VERIFY_ACTION_CODE
+NO_SRC_FILE_PATH = _fpga.NO_SRC_FILE_PATH
+NO_TAR_DEVICE_PATH = _fpga.NO_TAR_DEVICE_PATH
+FAIL_OPEN_SRC_FILE = _fpga.FAIL_OPEN_SRC_FILE
+ZERO_SRC_FILE_SIZE = _fpga.ZERO_SRC_FILE_SIZE
+FAIL_OPEN_DEVICE = _fpga.FAIL_OPEN_DEVICE
+class Fpga(_object):
+    __swig_setmethods__ = {}
+    __setattr__ = lambda self, name, value: _swig_setattr(self, Fpga, name, value)
+    __swig_getmethods__ = {}
+    __getattr__ = lambda self, name: _swig_getattr(self, Fpga, name)
+    __repr__ = _swig_repr
+    def __init__(self): 
+        this = _fpga.new_Fpga()
+        try: self.this.append(this)
+        except: self.this = this
+    __swig_destroy__ = _fpga.delete_Fpga
+    __del__ = lambda self : None;
+    def get_interval(self): return _fpga.Fpga_get_interval(self)
+    def get_error_msg(self, *args): return _fpga.Fpga_get_error_msg(self, *args)
+    def fpga_upgrade(self, *args): return _fpga.Fpga_fpga_upgrade(self, *args)
+    def get_status(self): return _fpga.Fpga_get_status(self)
+Fpga_swigregister = _fpga.Fpga_swigregister
+Fpga_swigregister(Fpga)
+
+
+
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/Makefile.am
new file mode 100755 (executable)
index 0000000..31e3c0b
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_fpgaupgrade.xml
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/meta/plugin_fpgaupgrade.xml
new file mode 100755 (executable)
index 0000000..d7c500a
--- /dev/null
@@ -0,0 +1,16 @@
+<default>
+         <prerequisites>
+                    <tag type="System" />
+         </prerequisites>
+          <info>
+                    <author>oskwon</author>
+                    <name>FPGAUpgrade</name>
+                    <packagename>enigma2-plugin-systemplugins-fpgaupgrade</packagename>
+                    <shortdescription>Upgrade your system FPGA</shortdescription>
+                    <description>Upgrade your internal system FPGA.</description>
+          </info>
+
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-fpgaupgrade" />
+       </files>
+</default>
diff --git a/lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py b/lib/python/Plugins/SystemPlugins/FPGAUpgrade/plugin.py
new file mode 100644 (file)
index 0000000..7ebadbe
--- /dev/null
@@ -0,0 +1,285 @@
+import os
+
+import fpga
+from enigma import eTimer
+
+from urllib import urlretrieve
+import urllib
+
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+
+from Plugins.Plugin import PluginDescriptor
+
+from Tools.Directories import fileExists
+
+from Components.Label import Label
+from Components.Slider import Slider
+from Components.Pixmap import Pixmap
+from Components.FileList import FileList 
+from Components.ActionMap import ActionMap
+from Components.PluginComponent import plugins
+from Components.Sources.StaticText import StaticText
+
+class UpgradeStatus(Screen):
+       skin =  """
+               <screen position="center,center" size="450,100" title="FPGA Upgrade">
+                       <widget name="name" position="10,0" size="430,20" font="Regular;18" halign="left" valign="bottom"/>
+                       <widget name="slider" position="10,25" size="430,30" backgroundColor="white"/>
+                       <widget name="status" position="10,25" zPosition="1" size="430,30" font="Regular;18" halign="center" valign="center" foregroundColor="black" backgroundColor="black" transparent="1"/>
+                       <widget source="info" render="Label" position="10,70" zPosition="1" size="430,30" font="Regular;22" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
+               </screen>
+               """
+       def __init__(self, session, parent, timeout = 10):
+               Screen.__init__(self,session)
+               self.session = session
+
+               self["actions"] = ActionMap(["OkCancelActions"],
+                {
+                       "ok": self.keyExit,
+                }, -1)
+
+               self.is_done = 0
+               self.exit_count = 0
+               self.timeout = timeout
+               self.title_str = "FPGA Upgrade"
+
+               #self["name"] = Label(_("Upgrade status"))
+               self["name"] = Label(_(" "))
+               self["info"] = StaticText(_("Can't cancel during upgrade!!"))
+
+               self["status"] = Label(_("Status : 0%"))
+               self.status_bar = self["status"] 
+
+               self.slider = Slider(0, 100)
+               self["slider"] = self.slider
+               
+               self.parent = parent
+               self.timer_check_progress = eTimer()
+               self.timer_check_progress.callback.append(self.callbackDoCheckProgress)
+               interval = self.parent.FPGA.get_interval()
+               self.timer_check_progress.start(interval)
+
+       def callbackDoCheckProgress(self):
+               self.status = self.parent.FPGA.get_status()
+
+               if self.status > 0:
+                       self.slider.setValue(self.status)
+
+               if self.status == 100:
+                       #print "fpga-upgrade done!!"
+                       self.status_bar.setText(_("Success. Press OK to exit."))
+                       #self.status_bar.setText(_("%d / 100" % (self.status)))
+                       self.timer_check_progress.stop()
+                       self.is_done = 1
+
+                       self.timer_exit = eTimer()
+                       self.timer_exit.callback.append(self.callbackExit)
+                       self.timer_exit.start(1000)
+               elif self.status == -1 or self.status == -2:
+                       #print "fpga-upgrade error >> errno : [%d]" % (self.status)
+                       self.status_bar.setText(_("Error[%d]. Press Cancel to exit." % (self.status)))
+                       self.timer_check_progress.stop()
+                       self.is_done = 1
+               else:
+                       #print "fpga-upgrade status : %d" % self.status
+                       self.status_bar.setText(_("%d / 100" % (self.status)))
+
+       def callbackExit(self):
+               if self.exit_count == self.timeout:
+                       self.timer_exit.stop()
+                       self.keyExit()
+               self.exit_count = self.exit_count + 1
+               self.instance.setTitle("%s (%d)" % (self.title_str, (self.timeout-self.exit_count)))
+
+       def keyExit(self):
+               if self.is_done :
+                       self.close()
+               
+class FPGAUpgrade(Screen):
+       skin =  """
+               <screen position="center,center" size="560,440" title="FPGA Upgrade" >
+                       <ePixmap pixmap="Vu_HD/buttons/red.png" position="0,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/green.png" position="140,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/yellow.png" position="280,7" size="140,40" alphatest="blend" />
+                       <ePixmap pixmap="Vu_HD/buttons/blue.png" position="420,7" size="140,40" alphatest="blend" />
+
+                       <widget source="key_red" render="Label" position="20,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_green" render="Label" position="160,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_yellow" render="Label" position="300,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+                       <widget source="key_blue" render="Label" position="440,0" zPosition="1" size="115,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+
+                       <widget source="status" render="Label" position="15,45" zPosition="1" size="540,40" font="Regular;18" halign="left" valign="center" backgroundColor="#a08500" transparent="1" />
+                       <widget name="file_list" position="0,100" size="555,325" scrollbarMode="showOnDemand" />
+                </screen>
+               """
+
+       def __init__(self, session): 
+               Screen.__init__(self, session)
+                self.session = session 
+
+               self["key_red"] = StaticText(_("Close"))
+               self["key_green"] = StaticText(_("Ugrade"))
+               self["key_yellow"] = StaticText(_(" "))
+               self["key_blue"] = StaticText(_("Download"))
+               #self["key_blue"] = StaticText(_(" "))
+               self["status"] = StaticText(_(" "))
+               self["file_list"] = FileList("/", matchingPattern = "^.*")
+
+               self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions", "WizardActions", "ColorActions", ],
+                {
+                        "red": self.onClickRed,
+                       "green": self.onClickGreen,
+                       "blue": self.onClickBlue,
+                       "back": self.onClickRed,
+                       "ok": self.onClickOk,
+                       "up": self.onClickUp,
+                       "down": self.onClickDown,
+                       "left": self.onClickLeft,
+                       "right": self.onClickRight,
+                }, -1) 
+               self.onLayoutFinish.append(self.doLayoutFinish)
+       
+                self.ERROR_MSG = ''                                                                                          
+                self.ERROR_CODE = 0                                                                                          
+                self.SOURCELIST = self["file_list"]                                                                          
+                self.STATUS_BAR = self["status"]                                                                             
+                self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+               self.DEVICE_LIST = '/dev/fpga_dp;/dev/misc/dp;'
+               self.DOWNLOAD_TAR_PATH = '/tmp/'                                                                             
+               self.DOWNLOAD_FILE_NAME = 'TS_PRO.dat'                                                                       
+               self.DOWNLOAD_URL = ''
+               self.doLoadConf()
+               self.FPGA = fpga.Fpga()
+               print self.DEVICE_LIST
+               print self.DOWNLOAD_TAR_PATH
+               print self.DOWNLOAD_FILE_NAME
+               print self.DOWNLOAD_URL
+
+       def doLayoutFinish(self):
+               return  
+
+       def doExit(self):
+               if fileExists(self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME):
+                       os.remove(self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME)
+               self.close()
+
+       def doLoadConf(self):
+               if fileExists("/proc/stb/info/vumodel"):
+                        model = open("/proc/stb/info/vumodel").read().strip()
+                       download_uri_header = open('/usr/lib/enigma2/python/Plugins/SystemPlugins/FPGAUpgrade/fpga.conf').readline().strip()
+                       self.DOWNLOAD_URL = str(download_uri_header) + "vu" + str(model) + "/" + self.DOWNLOAD_FILE_NAME
+
+       def doHook(self, blockNumber, blockSize, totalSize) :
+               if blockNumber*blockSize > totalSize :
+                       self.STATUS_BAR.setText(_("Downloaded " + self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME))
+               else :
+                       self.STATUS_BAR.setText(_("Downloading..."))
+               
+       def onCallbackHandler(self, confirmed):                                                                                                                
+               if confirmed:                                                                                                                    
+                       self.doExit()   
+
+       def doUpgradeHandler(self, confirmed):
+               if confirmed == False:
+                       return
+               
+               path = ''
+               try:
+                       path = self.SOURCELIST.getCurrentDirectory() + self.SOURCELIST.getFilename() 
+               except:
+                       #self.session.open(MessageBox, _("Can't select directory."), MessageBox.TYPE_INFO, timeout = 5)
+                       return
+
+               device = ""
+               device_list = self.DEVICE_LIST.split(";")
+
+               for d in device_list:
+                       if os.path.exists(d):
+                               device = d
+                               break
+
+               if device == None or len(device) == 0:
+                       message = "Fail to upgrade.\nCause : Can't found device.\nDo you want to exit?"
+                       self.session.openWithCallback(self.onCallbackHandler, MessageBox, _(message), MessageBox.TYPE_YESNO, timeout = 10, default = True)
+                       print "DEVICE_LIST : ", device_list
+
+               print "DEVICE : ", device
+               self.ERROR_CODE = self.FPGA.fpga_upgrade(path, device)
+               if self.ERROR_CODE > 0:
+                       self.ERROR_MSG = self.FPGA.get_error_msg(self.ERROR_CODE, self.ERROR_MSG)
+                       message = "Fail to upgrade.\nCause : " + self.ERROR_MSG + "\nDo you want to exit?"
+                       self.session.openWithCallback(self.onCallbackHandler, MessageBox, _(message), MessageBox.TYPE_YESNO, timeout = 10, default = True)
+                       print "DEVICE : ", device
+                       print "FILE : ", path
+               else:
+                       #self.session.open(MessageBox, _("Success!!"), MessageBox.TYPE_INFO, timeout = 5)
+                       self.session.open(UpgradeStatus, self, timeout = 10)                    
+
+       def onClickRed(self):
+               self.doExit()
+
+       # run upgrade!!
+       def onClickGreen(self):
+               #self.session.open(MessageBox, _("Upgrade will take about 5 minutes to finish."), MessageBox.TYPE_INFO, timeout = 10)
+               message = "Upgrade will take about 5 minutes to finish.\nDo you want to upgrade?"
+               self.session.openWithCallback(self.doUpgradeHandler, MessageBox, _(message), MessageBox.TYPE_YESNO, timeout = 10, default = True)
+
+       def onClickBlue(self):
+               fname = ''
+               header = ''
+               test_opener = urllib.URLopener()
+               try:
+                       test_opener.open(self.DOWNLOAD_URL)
+               except:
+                       self.session.open(MessageBox, _('File not found'), MessageBox.TYPE_INFO, timeout = 5)
+                       del test_opener
+                       return
+               try :
+                       fname, header = urlretrieve(self.DOWNLOAD_URL, self.DOWNLOAD_TAR_PATH + self.DOWNLOAD_FILE_NAME, self.doHook)
+               except IOError, msg:
+                       self.session.open(MessageBox, _(str(msg)), MessageBox.TYPE_INFO, timeout = 5)
+                       del test_opener
+                       return
+               del test_opener
+
+               before_name = ''
+               self.SOURCELIST.changeDir(self.DOWNLOAD_TAR_PATH)
+               self.SOURCELIST.moveToIndex(0)
+               while cmp(self.SOURCELIST.getFilename(), self.DOWNLOAD_FILE_NAME) != 0 :
+                       self.SOURCELIST.down()
+                       if cmp(before_name, self.SOURCELIST.getFilename()) == 0:
+                               break
+                       before_name = self.SOURCELIST.getFilename()
+
+       def onClickOk(self):
+               if self.SOURCELIST.canDescent() : # isDir                                                                   
+                       self.SOURCELIST.descent()                                                                              
+                       if self.SOURCELIST.getCurrentDirectory():
+                               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+               else:                                                                                                      
+                       self.onClickGreen()
+
+       def onClickUp(self):
+               self.SOURCELIST.up()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickDown(self):
+               self.SOURCELIST.down()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickLeft(self):
+               self.SOURCELIST.pageUp()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+       def onClickRight(self):
+               self.SOURCELIST.pageDown()
+               self.STATUS_BAR.setText(_(self.SOURCELIST.getCurrentDirectory()))
+
+def main(session, **kwargs):
+        session.open(FPGAUpgrade)
+                                                           
+def Plugins(**kwargs):            
+       return PluginDescriptor(name=_("FPGA Upgrade"), description="Upgrade FPGA..", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
+
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am b/lib/python/Plugins/SystemPlugins/FactoryTest/Makefile.am
new file mode 100755 (executable)
index 0000000..9660052
--- /dev/null
@@ -0,0 +1,6 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/FactoryTest
+
+install_PYTHON =       \
+       __init__.py \
+       plugin.py \
+       testdb
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py b/lib/python/Plugins/SystemPlugins/FactoryTest/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py b/lib/python/Plugins/SystemPlugins/FactoryTest/plugin.py
new file mode 100755 (executable)
index 0000000..347573c
--- /dev/null
@@ -0,0 +1,1993 @@
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Plugins.Plugin import PluginDescriptor
+from Components.MenuList import MenuList
+from Tools.Directories import fileExists
+from Components.ServiceList import ServiceList
+from Components.ActionMap import ActionMap,NumberActionMap
+from Components.config import config
+from os import system,access,F_OK,R_OK,W_OK
+from Components.Label import Label
+from Components.AVSwitch import AVSwitch
+from time import sleep
+from Components.Console import Console
+from enigma import eTimer
+from Components.HTMLComponent import HTMLComponent
+from Components.GUIComponent import GUIComponent
+from enigma import eListboxPythonStringContent, eListbox, gFont, eServiceCenter, eDVBResourceManager
+from enigma import eServiceReference
+from enigma import eMemtest
+from enigma import eSctest
+from enigma import eDVBDB
+from Components.NimManager import nimmanager
+from enigma import eDVBCI_UI,eDVBCIInterfaces
+from Tools.Directories import resolveFilename, SCOPE_SYSETC
+
+class TestResultList(HTMLComponent, GUIComponent):
+       def __init__(self, list, enableWrapAround=False, content=eListboxPythonStringContent):
+               GUIComponent.__init__(self)
+               self.list = list
+               self.l = content()
+               self.l.setList(self.list)
+               self.onSelectionChanged = [ ]
+               self.enableWrapAround = enableWrapAround
+
+       def getCurrent(self):
+               return self.l.getCurrentSelection()
+
+       GUI_WIDGET = eListbox
+
+       def postWidgetCreate(self, instance):
+               self.instance.setSelectionEnable(0)
+               instance.setContent(self.l)
+               instance.selectionChanged.get().append(self.selectionChanged)
+               if self.enableWrapAround:
+                       self.instance.setWrapAround(True)
+
+       def preWidgetRemove(self, instance):
+               instance.setContent(None)
+               instance.selectionChanged.get().remove(self.selectionChanged)
+
+       def selectionChanged(self):
+               for f in self.onSelectionChanged:
+                       f()
+
+       def getSelectionIndex(self):
+               return self.l.getCurrentSelectionIndex()
+
+       def getSelectedIndex(self):
+               return self.l.getCurrentSelectionIndex()
+
+       def setList(self, list):
+               self.list = list
+               self.l.setList(self.list)
+
+       def updateList(self, list):
+               self.list = list
+               self.l.setList(self.list)
+
+       def moveToIndex(self, idx):
+               if self.instance is not None:
+                       self.instance.moveSelectionTo(idx)
+
+       def pageUp(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.pageUp)
+
+       def pageDown(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.pageDown)
+
+       def up(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.moveUp)
+
+       def down(self):
+               if self.instance is not None:
+                       self.instance.moveSelection(self.instance.moveDown)
+
+       def selectionEnabled(self, enabled):
+               if self.instance is not None:
+                       self.instance.setSelectionEnable(enabled)
+
+class FactoryTest(Screen):
+       skin = """
+               <screen position="120,125" size="440,400" title="Test Menu" >
+                       <widget name="testlist" position="10,0" size="340,350" />
+                       <widget name="resultlist" position="370,0" size="60,350" />
+                       <widget name="testdate" position="20,350" size="150,25" font="Regular;22" />
+                       <widget name="testversion" position="20,375" size="150,25" font="Regular;22" />
+                       <widget name="mactext" position="180,350" size="230,25" font="Regular;22" />
+               </screen>"""
+       def __init__(self, session):
+
+               self["actions"] = NumberActionMap(["OkCancelActions","WizardActions","NumberActions","ColorActions",],
+               {
+                       "left": self.nothing,
+                       "right":self.nothing,
+                       "ok": self.TestAction,
+                       "testexit": self.keyCancel,
+                       "agingstart": self.Agingmode,
+                       "up": self.keyup,
+                       "down": self.keydown,
+                       "0": self.numberaction,
+                       "1": self.numberaction, 
+                       "2": self.numberaction,                 
+                       "3": self.numberaction,                 
+                       "4": self.numberaction,                 
+                       "5": self.numberaction,                 
+                       "6": self.numberaction,                 
+                       "7": self.numberaction,                 
+                       "8": self.numberaction,                 
+                       "9": self.numberaction,                 
+                       "red": self.shutdownaction,
+               }, -2)
+
+               Screen.__init__(self, session)
+               TESTPROGRAM_DATE = self.getImageVersion() +" (v1.00)"
+               TESTPROGRAM_VERSION = "Version 01.10"
+
+               self.model = 0
+               self.getModelInfo()
+               
+               self["testdate"]=Label((TESTPROGRAM_DATE))
+               self["testversion"]=Label(("Loading version..."))
+               self["mactext"]=Label(("Loading mac address..."))
+               if self.model == 0 or self.model == 1:
+                       nimConfig = nimmanager.getNimConfig(0)
+                       nimConfig.configMode.slot_id=0
+                       nimConfig.configMode.value= "simple"
+                       nimConfig.diseqcMode.value="diseqc_a_b"
+                       nimConfig.diseqcA.value="160"
+                       nimConfig.diseqcB.value="100"
+               if self.model == 0:
+                       nimConfig = nimmanager.getNimConfig(1)
+                       nimConfig.configMode.slot_id=1          
+                       nimConfig.configMode.value= "simple"
+                       nimConfig.diseqcMode.value="diseqc_a_b"
+                       nimConfig.diseqcA.value="130"
+                       nimConfig.diseqcB.value="192"
+               if self.model == 2:
+                       pass
+               if self.model == 3 or self.model == 4:
+                       self.NimType = {}
+                       sat_list = ["160","100","130","192","620","642"]
+                       try:
+                               nimfile = open("/proc/bus/nim_sockets")
+                       except IOError:
+                               nimfile = None
+                       if nimfile is None:
+                               self.session.openWithCallback(self.close, MessageBox, _("File not Found!\n/proc/bus/nim_sockets"), MessageBox.TYPE_ERROR)
+                       for line in nimfile.readlines():
+                               print line
+                               if line == "":
+                                       break
+                               if line.strip().startswith("NIM Socket"):
+                                       parts = line.strip().split(" ")
+                                       current_slot = int(parts[2][:-1])
+                                       self.NimType[current_slot]={}
+                                       self.NimType[current_slot]["slot"] = current_slot
+                               elif line.strip().startswith("Type:"):
+                                       print str(line.strip())
+                                       self.NimType[current_slot]["type"] = str(line.strip()[6:])
+                                       if self.NimType[current_slot]["type"].startswith("DVB-S"):
+                                               self.NimType[current_slot]["sat1"] = sat_list.pop(0)
+                                               self.NimType[current_slot]["sat2"] = sat_list.pop(0)
+                                       else:
+                                               self.NimType[current_slot]["sat1"] = None
+                                               self.NimType[current_slot]["sat2"] = None
+                               elif line.strip().startswith("empty"):
+                                       self.NimType.pop(current_slot)  
+                       nimfile.close()
+                       if True:
+                               for (key, val) in self.NimType.items():
+                                       print key
+                                       print val
+                                       if val["type"].startswith("DVB-S"):
+                                               print "nimConfig (dvb-s): ",key
+                                               nimConfig = nimmanager.getNimConfig(key)
+                                               nimConfig.configMode.slot_id=key
+                                               nimConfig.configMode.value= "simple"
+                                               nimConfig.diseqcMode.value="diseqc_a_b"
+                                               nimConfig.diseqcA.value = val["sat1"]
+                                               nimConfig.diseqcB.value = val["sat2"]
+                                       else :
+                                               nimConfig = nimmanager.getNimConfig(key)
+                                               print "configMode check : ",nimConfig.configMode.value
+                       
+               nimmanager.sec.update()
+               
+               system("cp /usr/lib/enigma2/python/Plugins/SystemPlugins/FactoryTest/testdb /etc/enigma2/lamedb")
+               db = eDVBDB.getInstance()
+               db.reloadServicelist()
+               self.createConfig()
+               
+               self.rlist = []
+               for x in range(self.menulength):
+                       self.rlist.append((".."))
+               self["resultlist"] = TestResultList(self.rlist)
+
+               self.avswitch = AVSwitch()
+               self.scTest= eSctest()
+               
+               self.testing = 0
+
+               self.servicelist = ServiceList()
+               self.oldref = session.nav.getCurrentlyPlayingServiceReference()
+               print "oldref",self.oldref
+               session.nav.stopService() # try to disable foreground service
+               
+               self.tunemsgtimer = eTimer()
+               self.tunemsgtimer.callback.append(self.tunemsg)
+
+               self.camstep = 1
+               self.camtimer = eTimer()
+               self.camtimer.callback.append(self.cam_state)
+               self.mactry = 1
+               self.getmacaddr()
+               self.getversion()
+               
+               self.tunerlock = 0
+               self.tuningtimer = eTimer()
+               self.tuningtimer.callback.append(self.updateStatus)
+
+               self.satatry = 8
+               self.satatimer = eTimer()
+               self.satatimer.callback.append(self.sataCheck)
+
+               self.usbtimer = eTimer()
+               self.usbtimer.callback.append(self.usbCheck)
+
+               self.agingtimer = eTimer()
+               self.agingtimer.callback.append(self.agingCheck)
+               self.setSourceVar()
+
+       def createConfig(self):
+               tlist = []
+               self.satetestIndex = -1
+               self.scarttestIndex = -1
+               if self.model == 0:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=4
+                       tlist.append((" 4. T1/H/22K x /4:3/CVBS",self.tuner1_1testIndex))
+                       self.tuner1_2testIndex=5
+                       tlist.append((" 5. T1/V/22k o/16:9/RGB",self.tuner1_2testIndex))
+                       self.tuner2_1testIndex=6
+                       tlist.append((" 6. T2/H/22k x/4:3/YC",self.tuner2_1testIndex))
+                       self.tuner2_2testIndex=7
+                       tlist.append((" 7. T2/V/22k o/16:9/CVBS/CAM",self.tuner2_2testIndex))
+                       self.scarttestIndex=8
+                       tlist.append((" 8. VCR Scart loop",self.scarttestIndex))
+                       self.rs232testIndex=9
+                       tlist.append((" 9. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=10
+                       tlist.append(("10. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=11
+                       tlist.append(("11. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=12
+                       tlist.append(("12. Shutdown(Deep Standby)",self.shutdownIndex))
+                       self.tuner_test_first_index = 4
+                       self.tuner_test_last_index = 7
+                       
+               elif self.model == 1:
+                       self.usbtestIndex=0
+                       tlist.append((" 0. USB test",self.usbtestIndex))
+                       self.fronttestIndex=1
+                       tlist.append((" 1. Front test",self.fronttestIndex))
+                       self.smarttestIndex=2
+                       tlist.append((" 2. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=3
+                       tlist.append((" 3. T1/H/22K x/4:3/CVBS",self.tuner1_1testIndex))
+                       self.tuner2_2testIndex = self.tuner1_2testIndex=4
+                       tlist.append((" 4. T1/V/22k o/16:9/RGB/CAM",self.tuner1_2testIndex))
+                       self.rs232testIndex=5
+                       tlist.append((" 5. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=6
+                       tlist.append((" 6. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=7
+                       tlist.append((" 7. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=8
+                       tlist.append((" 8. Shutdown(Deep Standby)",self.shutdownIndex))
+                       self.tuner_test_first_index = 3
+                       self.tuner_test_last_index = 4
+
+               elif self.model == 2:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner1_1testIndex=4
+                       tlist.append((" 4. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex))
+                       self.tuner1_2testIndex=5
+                       tlist.append((" 5. T1 V 22k o 16:9 RGB",self.tuner1_2testIndex))
+                       self.tuner2_1testIndex = -1
+                       self.tuner2_2testIndex=6
+                       tlist.append((" 6. T2 DVB-C 4:3 YC CAM",self.tuner2_2testIndex))
+                       self.rs232testIndex=7
+                       tlist.append((" 7. RS232 test",self.rs232testIndex))
+                       self.ethernettestIndex=8
+                       tlist.append(("8. Ethernet & mac test",self.ethernettestIndex))
+                       self.fdefaultIndex=9
+                       tlist.append(("9. Factory default",self.fdefaultIndex))
+                       self.shutdownIndex=10
+                       tlist.append(("10. Shutdown",self.shutdownIndex))
+                       self.tuner_test_first_index = 4
+                       self.tuner_test_last_index = 6
+
+               elif self.model == 3 or self.model == 4:
+                       self.satetestIndex=0
+                       tlist.append((" 0. Sata & extend hdd test",self.satetestIndex))
+                       self.usbtestIndex=1
+                       tlist.append((" 1. USB test",self.usbtestIndex))
+                       self.fronttestIndex=2
+                       tlist.append((" 2. Front test",self.fronttestIndex))
+                       self.smarttestIndex=3
+                       tlist.append((" 3. Smartcard test",self.smarttestIndex))
+                       self.tuner_test_first_index = current_index = 4
+                       AspectRatio=["4:3", "16:9"]
+                       ColorFormat=["CVBS","RGB","YC","CVBS","CVBS","CVBS","CVBS","CVBS"]      
+                       self.tuneInfo={}
+                       for (key, val) in self.NimType.items():
+                               if val["type"].startswith("DVB-S"):
+# Chang : DVB -S setting diseqc A
+                                       getRatio = AspectRatio.pop(0) # ratio
+                                       AspectRatio.append(getRatio)
+                                       getColorFormat=ColorFormat.pop(0) # colorFormat
+                                       menuname=" %d. T%d/%s/H/22k x/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat)    #menuname
+                                       print current_index
+#                                              current_index=4
+                                       self.setTuneInfo(index=current_index, slot=key, type=val["type"], sat=val["sat1"], pol="H", tone=False, ratio=getRatio, color=getColorFormat, cam=False) # setTuneInfo
+#                                              self.setTuneInfo(current_index, key, val["type"], val["sat1"], "H", True, getRatio, getColorFormat, False) # setTuneInfo
+                                       tlist.append((menuname,current_index))
+                                       current_index+=1
+# Chang : DVB -S setting diseqc B
+                                       getRatio = AspectRatio.pop(0)
+                                       AspectRatio.append(getRatio)
+                                       getColorFormat=ColorFormat.pop(0)
+                                       menuname=" %d. T%d/%s/V/22k o/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat)
+                                       if len(self.NimType) == key+1: # CAM test on/off
+                                               menuname+="/CAM"
+                                               camtest = True
+                                       else:
+                                               camtest = False
+                                       self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=val["sat2"], pol="V", tone=True, ratio=getRatio, color=getColorFormat, cam=camtest)
+                                       tlist.append((menuname,current_index))
+                                       current_index+=1
+# Chang : DVB -T or DVB-C
+                               elif val["type"].startswith("DVB-T") or val["type"].startswith("DVB-C"):
+                                       additionalMenu = None
+                                       menulen = 1
+                                       if len(self.NimType) == 1:
+                                               additionalMenu = True
+                                               menulen +=1
+                                       for x in range(menulen):
+                                               getRatio = AspectRatio.pop(0)
+                                               AspectRatio.append(getRatio)
+                                               getColorFormat=ColorFormat.pop(0)
+                                               menuname=" %d. T%d/%s/%s/%s" % (current_index, key+1, val["type"], getRatio, getColorFormat)
+                                               if len(self.NimType) == key+1 and (additionalMenu is None or x != 0): # CAM test on/off
+                                                       menuname+=" CAM"
+                                                       camtest = True
+                                               else:
+                                                       camtest = False
+                                               self.setTuneInfo( index=current_index, slot=key, type=val["type"], sat=None, pol=None, tone=None, ratio=getRatio, color=getColorFormat, cam=camtest)
+                                               tlist.append((menuname,current_index))
+                                               current_index+=1
+                       self.tuner_test_last_index = current_index-1
+                       self.rs232testIndex=current_index
+                       tlist.append((" %d. RS232 test" % current_index,self.rs232testIndex))
+                       current_index+=1
+                       self.ethernettestIndex=current_index
+                       tlist.append((" %d. Ethernet & mac test" % current_index,self.ethernettestIndex))
+                       current_index+=1
+                       self.fdefaultIndex=current_index
+                       tlist.append((" %d. Factory default" % current_index,self.fdefaultIndex))
+                       current_index+=1
+                       self.shutdownIndex=current_index
+                       tlist.append((" %d. Shutdown(Deep Standby)" % current_index,self.shutdownIndex))
+                       
+               self.menulength= len(tlist)
+               self["testlist"] = MenuList(tlist)
+       
+       def setTuneInfo(self,index=0,slot=0,type="DVB-S2",sat="160",pol="H",tone=True,ratio="4:3",color="CVBS",cam=False):
+               self.tuneInfo[index]={}
+               self.tuneInfo[index]["slot"]=slot
+               self.tuneInfo[index]["type"]=type
+               self.tuneInfo[index]["sat"]=sat
+               self.tuneInfo[index]["pol"]=pol
+               self.tuneInfo[index]["22k"]=tone
+               self.tuneInfo[index]["ratio"]=ratio
+               self.tuneInfo[index]["color"]=color
+               self.tuneInfo[index]["cam"]=cam
+
+       def getModelInfo(self):
+               getmodel = 0
+               if fileExists("/proc/stb/info/vumodel"):
+                       info = open("/proc/stb/info/vumodel").read().strip()
+                       if info == "duo":
+                               self.model = 0
+                               getmodel = 1
+                               print "getModelInfo : duo"
+                       if info == "solo":
+                               self.model = 1
+                               getmodel = 1
+                               print "getModelInfo : solo"
+                       if info == "combo":
+                               self.model = 2
+                               getmodel = 1
+                               print "getModelInfo : combo"
+                       if info == "uno":
+                               self.model = 3
+                               getmodel = 1
+                               print "getModelInfo : uno"
+                       if info == "ultimo":
+                               self.model = 4
+                               getmodel = 1
+                               print "getModelInfo : ultimo"
+               if getmodel == 0 and fileExists("/proc/stb/info/version"):
+                       info = open("/proc/stb/info/version").read()
+                       if info[:2] == "14":
+                               self.model = 1
+                               print "getModelInfo : solo_"
+                       elif info[:2] == "12":
+                               self.model = 0
+                               print "getModelInfo : duo_"
+
+       def nothing(self):
+               print "nothing"
+
+       def keyup(self):
+               print "self.menulength = ",self.menulength
+               print "self[\"testlist\"].getCurrent()[1] = ",self["testlist"].getCurrent()[1]
+               if self.testing==1:
+                       return
+               if self["testlist"].getCurrent()[1]==0:
+                       self["testlist"].moveToIndex(self.menulength-1)
+                       self["resultlist"].moveToIndex(self.menulength-1)
+               else:
+                       self["testlist"].up()
+                       self["resultlist"].up()
+
+
+       def keydown(self):
+               print "self.menulength = ",self.menulength
+               print "self[\"testlist\"].getCurrent()[1] = ",self["testlist"].getCurrent()[1]
+               if self.testing==1:
+                       return
+               if self["testlist"].getCurrent()[1]==(self.menulength-1):
+                       self["testlist"].moveToIndex(0)
+                       self["resultlist"].moveToIndex(0)
+               else:
+                       self["testlist"].down()
+                       self["resultlist"].down()
+
+       def numberaction(self, number):
+               if self.testing==1:
+                       return
+               if number >= self.menulength:
+                       return
+               index = int(number)
+               self["testlist"].moveToIndex(index)
+               self["resultlist"].moveToIndex(index)
+
+       def getImageVersion(self):
+               date = 'xxxx-xx-xx'
+               file = open(resolveFilename(SCOPE_SYSETC, 'image-version'), 'r')
+               lines = file.readlines()
+               for x in lines:
+                       splitted = x.split('=')
+                       if splitted[0] == "version":
+                       #     YYYY MM DD hh mm
+                               #0120 2005 11 29 01 16
+                               #0123 4567 89 01 23 45
+                               version = splitted[1]
+                               year = version[4:8]
+                               month = version[8:10]
+                               day = version[10:12]
+                               date = '-'.join((year, month, day))
+                               break;
+               return date
+
+       def getversion(self):
+               try:
+                       fd = open("/proc/stb/info/version","r")
+                       version = fd.read()
+                       self["testversion"].setText(("Version %s"%version))
+               except:
+                       self["testversion"].setText(("Version no load"))
+                       
+
+       def getmacaddr(self):
+               try:
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd5"
+                       elif self.model == 0 or self.model == 1:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd4"
+                       self.macConsole = Console()     
+                       self.macConsole.ePopen(cmd, self.readmac,self.checkReadmac)     
+               except:
+                       return
+
+       def readmac(self, result, retval,extra_args=None):
+               (callback) = extra_args
+               if self.macConsole is not None:
+                       if retval == 0:
+                               self.macConsole = None
+                               macline = None
+                               content =result.splitlines()
+                               for x in content:
+                                       if x.startswith('0x000'+str((self.mactry-1)*2)+'0010:'):
+                                               macline = x.split()
+                               if macline == None:
+                                       callback(0)
+                               elif len(macline) < 10: 
+                                       callback(1)
+                               else:   
+                                       mac = macline[5]+":"+macline[6]+":"+macline[7]+":"+macline[8]+":"+macline[9]+":"+macline[10]
+                                       self["mactext"].setText(("MAC : "+mac))
+                                       callback(2)
+
+       def checkReadmac(self,data):
+               if data == 0:
+                       print "block %d is bad block" % self.mactry
+                       self.mactry = self.mactry + 1
+                       if self.mactry > 4:
+                               self.session.open(MessageBox, _("FLASH IS BROKEN"), type = MessageBox.TYPE_INFO, enable_input = False)
+                               return
+                       else:
+                               self.getmacaddr()
+               elif data == 1:
+                       print 'mac dump read error'
+                       return
+               elif data == 2:
+                       print 'mac address read ok'
+                       return
+               
+       def TestAction(self):
+               if self.testing==1:
+                       return
+               print "line - ",self["testlist"].getCurrent()[1]
+               self.currentindex = index = self["testlist"].getCurrent()[1]
+               result = 0
+               if index==self.satetestIndex:
+                       self.Test0()
+               elif index==self.fronttestIndex:
+                       self.Test1()
+               elif index>=self.tuner_test_first_index and index<=self.tuner_test_last_index:
+                       self.TestTune(index)
+               elif index==self.scarttestIndex:
+                       self.Test6()
+               elif index==self.rs232testIndex:
+                       self.Test7()
+               elif index==self.usbtestIndex:
+                       self.Test8()
+               elif index==self.ethernettestIndex:
+                       self.Test9()
+               elif index == self.smarttestIndex:
+                       self.Test10()
+#              elif index == 11:
+#                      self.Test11()
+#              elif index ==12:
+#                      self.Test12()
+#              elif index==13:
+#                      self.Test13()
+               elif index==self.fdefaultIndex:
+                       self.Test14()
+#              elif index==self.shutdownIndex:
+#                      self.Test15()
+               else:
+                       pass
+
+       def shutdownaction(self):
+               if self["testlist"].getCurrent()[1] == self.shutdownIndex:
+                       self.Test15()
+
+
+       def Test0(self):
+               self.satatry = 8
+               self.satatimer.start(100,True)
+
+       def sataCheck(self):
+#              print "try", self.satatry
+               if self.satatry == 0:
+                       displayerror = 1
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="try %d"%self.satatry
+                       self["resultlist"].updateList(self.rlist)
+                       self.satatry -= 1
+                       displayerror = 0
+               result =0
+               try:
+                       if fileExists("/autofs/sdb1"):
+                               if access("/autofs/sdb1",F_OK|R_OK|W_OK):
+                                       dummy=open("/autofs/sdb1/dummy03","w")
+                                       dummy.write("complete")
+                                       dummy.close()
+                                       dummy=open("/autofs/sdb1/dummy03","r")
+                                       if dummy.readline()=="complete":
+                                               print "/autofs/sdb1 - complete"
+                                       else:
+                                               print "/autofs/sdb1 - readline error"
+                                               result = 1
+                                               displayerror = 1
+                                       dummy.close()
+                                       system("rm /autofs/sdb1/dummy03")
+                               else:
+                                       print "/autofs/sdb1 - rw access error"
+                                       result = 1
+                                       displayerror = 1
+                       else:
+                               print "/autofs/sdb1 - file not exist"
+                               result = 1
+               except:
+                       print "/autofs/sdb1 - exceptional error"
+                       result = 1
+                       displayerror = 1
+               try:
+                       if fileExists("/autofs/sda1"):
+                               if access("/autofs/sda1",F_OK|R_OK|W_OK):
+                                       dummy=open("/autofs/sda1/dummy03","w")
+                                       dummy.write("complete")
+                                       dummy.close()
+                                       dummy=open("/autofs/sda1/dummy03","r")
+                                       if dummy.readline()=="complete":
+                                               print "/autofs/sda1 - complete"
+                                       else:
+                                               print "/autofs/sda1 - readline error"
+                                               result += 1
+                                               displayerror = 1
+                                       dummy.close()
+                                       system("rm /autofs/sda1/dummy03")
+                               else:
+                                       print "/autofs/sda1 - rw access error"
+                                       result += 1
+                                       displayerror = 1
+                       else:
+                               print "/autofs/sda1 - file not exist"
+                               result += 1
+               except:
+                       print "/autofs/sda1 - exceptional error"
+                       result += 1
+                       displayerror = 1
+               
+               if result == 0:
+                       self.session.open( MessageBox, _("Sata & extend hdd test pass\nPress 'OK' button!"), MessageBox.TYPE_INFO)
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               elif result == 1:
+                       if displayerror==1:
+                               self.session.open( MessageBox, _("One hdd test error\nPress 'EXIT' button!"), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.satatimer.start(1100,True)
+               else:
+                       if displayerror==1:
+                               self.session.open( MessageBox, _("Sata & extend hdd test error\nPress 'EXIT' button!"), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.satatimer.start(1100,True)
+
+       def Test1(self):
+               if self.model== 0:
+                       self.session.openWithCallback(self.displayresult ,FrontTest)
+               elif self.model == 1:
+                       self.session.openWithCallback(self.displayresult ,FrontTest_solo)
+               elif self.model == 2 or self.model == 3 or self.model == 4:
+                       self.session.openWithCallback(self.displayresult ,FrontTest_uno)
+
+       def displayresult(self):
+               global fronttest
+               if fronttest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def TestTune(self,index):       
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection() # raise error
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               if self.model == 0 or self.model == 1:
+                       if index==self.tuner1_1testIndex:
+                               ref.setData(0,1)
+                               ref.setData(1,0x6D3)
+                               ref.setData(2,0x3)
+                               ref.setData(3,0xA4)
+                               ref.setData(4,0xA00000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(0)
+                               self.avswitch.setAspectRatio(0)
+                       elif index==self.tuner1_2testIndex:
+                               if self.model == 1:
+                                       self.camstep = 1
+                                       self.camtimer.start(100,True)
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,0x64af79)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(1)
+                               self.avswitch.setAspectRatio(6)                 
+                       elif index==self.tuner2_1testIndex:
+                               ref.setData(0,1)
+                               ref.setData(1,0x6D3)
+                               ref.setData(2,0x3)
+                               ref.setData(3,0xA4)
+                               ref.setData(4,0x820000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(2)                 
+                               self.avswitch.setAspectRatio(0)                 
+                       elif index==self.tuner2_2testIndex:
+                               self.camstep = 1
+                               self.camtimer.start(100,True)
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,0xC00000)
+                               self.session.nav.playService(ref)
+                               self.avswitch.setColorFormat(0)                 
+                               self.avswitch.setAspectRatio(6)
+                       self.tuningtimer.start(2000,True)
+                       self.tunemsgtimer.start(3000, True)
+               elif self.model == 3 or self.model == 4:
+                       getTuneInfo=self.tuneInfo[index]
+                       if getTuneInfo["cam"] is True:
+                               self.camstep = 1
+                               self.camtimer.start(100,True)
+                       if getTuneInfo["type"].startswith("DVB-S"):
+                               if getTuneInfo["pol"] == "H":
+                                       ref.setData(0,1)
+                                       ref.setData(1,0x6D3)
+                                       ref.setData(2,0x3)
+                                       ref.setData(3,0xA4)
+                               else:
+                                       ref.setData(0,0x19)
+                                       ref.setData(1,0x1325)
+                                       ref.setData(2,0x3ef)
+                                       ref.setData(3,0x1)
+                               if getTuneInfo["sat"] == "160": # Eutelsat W2
+                                       ref.setData(4,0xA00000)
+                               elif getTuneInfo["sat"] == "100": # Eutelsat
+                                       ref.setData(4,0x64af79)
+                               elif getTuneInfo["sat"] == "130": # Hotbird
+                                       ref.setData(4,0x820000)
+                               elif getTuneInfo["sat"] == "192": # Astra
+                                       ref.setData(4,0xC00000)
+                               elif getTuneInfo["sat"] == "620": # Intelsat 902
+                                       ref.setData(4,0x26c0000) # need to fix later
+                               elif getTuneInfo["sat"] == "642": # Intelsat 906
+                                       ref.setData(4,0x282AF79) # need to fix later
+                       elif getTuneInfo["type"].startswith("DVB-C"):
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,-64870) # ffff029a
+                       elif getTuneInfo["type"].startswith("DVB-T"):
+                               ref.setData(0,0x19)
+                               ref.setData(1,0x1325)
+                               ref.setData(2,0x3ef)
+                               ref.setData(3,0x1)
+                               ref.setData(4,-286391716) # eeee025c
+                       self.session.nav.playService(ref)
+                       if getTuneInfo["color"]=="CVBS":
+                               self.avswitch.setColorFormat(0)
+                       elif getTuneInfo["color"]=="RGB":
+                               self.avswitch.setColorFormat(1)
+                       elif getTuneInfo["color"]=="YC":
+                               self.avswitch.setColorFormat(2)
+                       if getTuneInfo["ratio"] == "4:3":
+                               self.avswitch.setAspectRatio(0)
+                       elif getTuneInfo["ratio"] == "16:9":
+                               self.avswitch.setAspectRatio(6)
+                       self.tuningtimer.start(2000,True)
+                       self.tunemsgtimer.start(3000, True) 
+               
+       def cam_state(self):
+               current_index = self.currentindex
+               if self.camstep == 1:
+                       slot = 0
+                       state = eDVBCI_UI.getInstance().getState(slot)
+                       print '-1-stat',state
+                       if state > 0:
+                               self.camstep=2
+                               self.camtimer.start(100,True)
+                       else:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("CAM1_NOT_INSERTED\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()
+               elif self.camstep == 2:
+                       slot = 0
+                       appname = eDVBCI_UI.getInstance().getAppName(slot)
+                       print 'appname',appname
+                       if appname is None:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("NO_GET_APPNAME\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+                       else:
+                               self.camstep=3
+                               self.camtimer.start(100,True)           
+               elif self.camstep==3:
+                       slot = 1
+                       state = eDVBCI_UI.getInstance().getState(slot)
+                       print '-2-stat',state
+                       if state > 0:
+                               self.camstep=4
+                               self.camtimer.start(100,True)
+                       else:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("CAM2_NOT_INSERTED\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+               elif self.camstep == 4:
+                       slot = 1
+                       appname = eDVBCI_UI.getInstance().getAppName(slot)
+                       print 'appname',appname
+                       if appname is None:
+                               self.session.nav.stopService()
+                               self.session.open( MessageBox, _("NO_GET_APPNAME\nPress exit!"), MessageBox.TYPE_ERROR)
+                               self.rlist[current_index]="fail"
+                               self.tunemsgtimer.stop()                                
+                       else:
+                               self.setSource()
+                               self.camstep = 5
+
+       def updateStatus(self):
+               current_index = self.currentindex
+               if self.model == 0 or self.model == 1:
+                       if current_index ==self.tuner1_1testIndex or current_index==self.tuner1_2testIndex:
+                               tunno = 1
+                               result = eSctest.getInstance().getFrontendstatus(0)
+                       else:
+                               tunno = 2
+                               result = eSctest.getInstance().getFrontendstatus(1)
+                       if current_index == self.tuner1_2testIndex or current_index==self.tuner2_2testIndex:
+                               hv = "Ver"
+                       else:
+                               hv = "Hor"
+
+               elif self.model == 3 or self.model == 4:
+                       getTuneInfo=self.tuneInfo[current_index]
+                       result = eSctest.getInstance().getFrontendstatus(getTuneInfo["slot"])
+                       tunno = getTuneInfo["slot"]+1
+                       hv = getTuneInfo["pol"]
+                       if hv == "H":
+                               hv = "Hor"
+                       elif hv == "V":
+                               hv = "Ver"
+                       else :
+                               hv == ""
+                               
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.tunerlock = 0
+                       self.tunemsgtimer.stop()
+                       self.session.nav.stopService()
+                       self.avswitch.setColorFormat(0)
+                       self.session.open( MessageBox, _("Tune%d %s Locking Fail..."%(tunno,hv)), MessageBox.TYPE_ERROR)
+                       self.rlist[current_index]="fail"
+               else : 
+                       self.tunerlock = 1
+
+       def tuneback(self,yesno):
+               current_index=self.currentindex
+               self.session.nav.stopService() # try to disable foreground service
+               if yesno and self.tunerlock == 1:
+                       if current_index == self.tuner_test_last_index and self.camstep < 5: # need fix to depending about CAM exist
+                               self.rlist[current_index]="fail"
+                       else :
+                               self.rlist[current_index]="pass"
+               else:
+                       self.rlist[current_index]="fail"
+               if self.model == 0 and current_index == 6: # YC
+                       self.avswitch.setColorFormat(0)
+               elif ( self.model == 3 or self.model == 4 ) and self.tuneInfo[current_index]["color"] == "YC":
+                       self.avswitch.setColorFormat(0)
+               self.resetSource()
+               self["resultlist"].updateList(self.rlist)
+
+       def tunemsg(self):
+               self.tuningtimer.stop()
+               self.session.openWithCallback(self.tuneback, MessageBox, _("%s ok?" %(self["testlist"].getCurrent()[0])), MessageBox.TYPE_YESNO)
+
+       def setSourceVar(self):
+               if self.model == 0:
+                       self.input_pad_num=1
+                       self.setTuner = 'B'
+               elif self.model == 1:
+                       self.input_pad_num=0
+                       self.setTuner = 'A'
+               else:
+                       self.input_pad_num=len(self.NimType)-1
+                       if self.input_pad_num == 0:
+                               self.setTuner = 'A'
+                       elif self.input_pad_num == 1:
+                               self.setTuner = 'B'
+                       elif self.input_pad_num == 2:
+                               self.setTuner = 'C'
+
+#      ikseong - for 22000 tp
+       def setSource(self):
+# fix input source
+               inputname = ("/proc/stb/tsmux/input%d" % self.input_pad_num)
+               print "<setsource> inputname : ",inputname
+               fd=open(inputname,"w")
+               fd.write("CI0")
+               fd.close()
+# fix ci_input Tuner
+               filename = ("/proc/stb/tsmux/ci0_input")
+               fd = open(filename,'w')
+               fd.write(self.setTuner)
+               print "setTuner(CI0) : ",self.setTuner
+               fd.close()
+               print "CI loop test!!!!!!!!!!!!!!"
+                       
+       def resetSource(self):
+               inputname = ("/proc/stb/tsmux/input%d" % self.input_pad_num)
+               print "<resetsource> inputname : ",inputname
+               fd=open(inputname,"w")
+               fd.write(self.setTuner)
+               fd.close()
+               print "CI loop test end!!!!!!!!!!!!!!"
+                               
+       def Test6(self):
+               self.avswitch.setInput("SCART")
+               sleep(2)
+               self.session.openWithCallback(self.check6, MessageBox, _("Scart loop ok?"), MessageBox.TYPE_YESNO)
+
+       def check6(self,yesno):
+               if yesno:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+               self.avswitch.setInput("ENCODER")
+
+       def check7(self):
+               global rstest
+               if rstest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def Test7(self):
+               self.session.openWithCallback(self.check7,RS232Test)
+
+       def Agingmode(self):
+               if self.testing==1:
+                       return
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection()
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               if self.model == 0 or self.model == 1 or self.NimType[0]["type"].startswith("DVB-S"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,0x64af79)
+               elif self.NimType[0]["type"].startswith("DVB-C"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,-64870) # ffff029a
+               elif self.NimType[0]["type"].startswith("DVB-T"):
+                       ref.setData(0,0x19)
+                       ref.setData(1,0x1325)
+                       ref.setData(2,0x3ef)
+                       ref.setData(3,0x1)
+                       ref.setData(4,-286391716) # eeee025c
+               self.session.nav.playService(ref)
+               self.avswitch.setColorFormat(0)
+               self.avswitch.setAspectRatio(0)
+               self.agingtimer.start(2000,True)
+
+       def agingCheck(self):
+               result = eSctest.getInstance().getFrontendstatus(0)             
+               hv = "Ver"      
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Locking Fail..."), MessageBox.TYPE_ERROR)
+               elif result == 1 :
+                       self.session.openWithCallback(self.agingResult,AgingTest)
+               else:
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Error %d..."%result), MessageBox.TYPE_ERROR)
+
+       def agingResult(self):
+               global Agingresult
+               if(Agingresult ==1):
+                       self["testlist"].moveToIndex(self.fdefaultIndex)
+                       self.Test14()
+                       self["testlist"].moveToIndex(self.shutdownIndex)        
+       
+       def Test8(self):
+               self.usbtry = 9
+               self.usbtimer.start(100,True)
+
+       def usbCheck(self):
+               if self.usbtry == 0:
+                       displayerror = 1
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="try %d"%self.usbtry
+                       self["resultlist"].updateList(self.rlist)
+                       self.usbtry -= 1
+                       displayerror = 0
+
+               if self.model==0 or self.model==3 or self.model==4:
+                       devices = [ "/autofs/sdc1", "/autofs/sdd1", "/autofs/sde1" ]
+               elif self.model==1:
+                       devices = [ "/autofs/sda1", "/autofs/sdb1" ]
+               elif self.model==2:
+                       devices = [ "/autofs/sdc1", "/autofs/sdd1" ]
+               else :
+                       self.session.open( MessageBox, _("invalid model"), MessageBox.TYPE_ERROR)                       
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       return
+
+               result=len(devices)
+               
+               for dev in devices:
+                       try:
+                               if fileExists(dev):
+                                       if access(dev,F_OK|R_OK|W_OK):
+                                               dummy=open(dev+"/dummy03","w")
+                                               dummy.write("complete")
+                                               dummy.close()
+                                               dummy=open(dev+"/dummy03","r")
+                                               if dummy.readline()=="complete":
+                                                       print dev," - complete"
+                                               else:
+                                                       print dev," - readline error"
+                                                       result=result -1
+                                                       displayerror = 1
+                                               dummy.close()
+                                               system("rm "+dev+"/dummy03")
+                                       else:
+                                               print dev," - rw access error"
+                                               result=result -1
+                                               displayerror = 1
+                               else:
+                                       print dev," - file not exist"
+                                       result=result-1
+                       except:
+                               print dev," - exceptional error"
+                               result=result -1
+                               displayerror = 1
+       
+               if result < 0 :
+                       result = 0
+               elif result == len(devices):
+                       self.session.open( MessageBox, _("USB test pass %d devices\nPress 'OK' button!"%result), MessageBox.TYPE_INFO)
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       if displayerror == 1:
+                               self.session.open( MessageBox, _("USB test error : Success-%d"%result+" Fail-%d\nPress 'EXIT' button!"%(len(devices)-result)), MessageBox.TYPE_ERROR)
+                               self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       else:
+                               self.usbtimer.start(1100,True)
+
+       def pingtest(self):
+               self.testing = 1
+#              system("/etc/init.d/networking stop")
+               system("ifconfig eth0 192.168.0.10")
+#              system("/etc/init.d/networking start")
+               cmd1 = "ping -c 1 192.168.0.100"
+               self.PingConsole = Console()
+               self.PingConsole.ePopen(cmd1, self.checkNetworkStateFinished,self.NetworkStatedataAvail)
+               
+       def checkNetworkStateFinished(self, result, retval,extra_args):
+               (statecallback) = extra_args
+               if self.PingConsole is not None:
+                       if retval == 0:
+                               self.PingConsole = None
+                               content = result.splitlines()
+#                              print 'content',content
+                               x = content[4].split()
+#                              print 'x',x
+                               if x[0]==x[3]:
+                                       statecallback(1)
+                               else:
+                                       statecallback(0)                                        
+                       else:
+                               statecallback(0)
+
+
+       def NetworkStatedataAvail(self,data):
+               global ethtest
+               if data == 1:
+                       ethtest = 1
+                       print "success"
+                       self.session.openWithCallback(self.openMacConfig ,MessageBox, _("Ping test pass"), MessageBox.TYPE_INFO,2)
+               
+               else:
+                       ethtest = 0
+                       print "fail"
+                       self.session.open( MessageBox, _("Ping test fail\nPress exit"), MessageBox.TYPE_ERROR)
+                       self.macresult()
+
+       def Test9(self):
+               self.pingtest()
+
+       def openMacConfig(self, ret=False):
+               self.session.openWithCallback(self.macresult ,MacConfig,mactry=self.mactry)     
+                       
+       def macresult(self):
+               global ethtest
+               if ethtest == 1:
+                       self.rlist[self.ethernettestIndex]="pass"               
+               else:
+                       self.rlist[self.ethernettestIndex]="fail"               
+               self.getmacaddr()
+               self.testing = 0                        
+       
+       def MemTest(self, which):
+               index = which
+               result = 0
+               if index==0:
+                       result = eMemtest.getInstance().dramtest()
+               elif index==1:
+                       result = eMemtest.getInstance().flashtest()
+                       result = 0      #       temp
+               else:
+                       result = eMemtest.getInstance().dramtest()
+                       result = eMemtest.getInstance().flashtest()
+                       result = 0      #       temp
+                       
+               index = index+10
+               
+               if result == 0:
+                       print index,self.rlist[index]
+                       self.rlist[index]="pass"
+               else:
+                       print index,self.rlist[index]
+                       self.rlist[index]="fail"
+               self["resultlist"].updateList(self.rlist)
+                       
+       def scciresult(self):
+               global smartcardtest
+               if smartcardtest == 1:
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+               else:
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+       def Test10(self):
+               self.session.openWithCallback(self.scciresult ,SmartCardTest,stbmodel=self.model)
+
+       def Test11(self):
+               self.MemTest(1)
+               
+       def Test12(self):
+               self.MemTest(2)
+
+       def Test13(self):
+               self.MemTest(3) 
+
+
+       def Test14(self):
+               try:
+                       print "test14"
+                       system("rm -R /etc/enigma2")
+                       system("ls /")
+                       system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+                       self.rlist[self["testlist"].getCurrent()[1]]="pass"
+                       self["resultlist"].updateList(self.rlist)
+               except:
+                       print "test14 except"
+                       self.rlist[self["testlist"].getCurrent()[1]]="fail"
+                       self["resultlist"].updateList(self.rlist)
+                       self.session.open( MessageBox, _("Factory reset fail"), MessageBox.TYPE_ERROR)
+
+       def Test15(self):
+               self.session.openWithCallback(self.shutdown ,MessageBox, _("Do you want to shut down?"), MessageBox.TYPE_YESNO)
+
+       def shutdown(self, yesno):
+               if yesno :
+                       from os import _exit
+                       system("/usr/bin/showiframe /boot/backdrop.mvi")
+                       _exit(1)
+               else:
+                       return
+               
+       def keyCancel(self):
+               if self.testing==1:
+                       return
+               print "exit"
+               self.close()
+#              if self.oldref is not None:
+#                      self.session.nav.playService(self.oldref)
+
+ethtest = 0
+class MacConfig(Screen):
+       skin = """
+               <screen position="100,250" size="520,100" title="Mac Config" >
+                       <eLabel text="Mac Address " position="10,15" size="200,40" font="Regular;30" />         
+                       <widget name="text" position="230,15" size="230,40" font="Regular;30" />
+                       <widget name="text1" position="470,15" size="40,40" font="Regular;30" />                
+                       <eLabel text=" " position="5,55" zPosition="-1" size="510,5" backgroundColor="#02e1e8e6" />             
+                       <widget name="stattext" position="30,75" size="400,25" font="Regular;20" />
+               </screen>"""
+
+       def __init__(self, session, mactry = 1):
+               self["actions"] = ActionMap(["DirectionActions","OkCancelActions"],
+               {
+                       "ok": self.keyOk,
+                       "left": self.keyleft,
+                       "right": self.keyright,
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+
+               self.mactry = mactry
+               self.model = 0
+               self.getModelInfo()
+               self.macfd = 0
+               self.macaddr = "000000000000"
+               self.ReadMacinfo = 0
+               self["text"]=Label((self.macaddr))
+               self["text1"]= Label(("< >"))
+               self["stattext"]= Label((""))
+               self.displaymac()
+               self.loadmacaddr()
+               self.getmacaddr()
+               global ethtest
+               ethtest = 1
+
+       def getModelInfo(self):
+               getmodel = 0
+               if fileExists("/proc/stb/info/vumodel"):
+                       info = open("/proc/stb/info/vumodel").read().strip()
+                       if info == "combo":
+                               self.model = 2
+                               getmodel = 1
+                               print "MacConfig, model : combo"
+                       elif info == "solo":
+                               self.model = 1
+                               getmodel = 1
+                               print "MacConfig, model : solo"
+                       elif info == "duo":
+                               self.model = 0
+                               getmodel = 1
+                               print "MacConfig, model : duo"
+                       elif info == "uno":
+                               self.model = 3
+                               getmodel = 1
+                               print "getModelInfo : uno"
+                       elif info == "ultimo":
+                               self.model = 4
+                               getmodel = 1
+                               print "getModelInfo : ultimo"
+
+
+               if getmodel == 0 and fileExists("/proc/stb/info/version"):
+                       info = open("/proc/stb/info/version").read()
+#                      print info,info[:2]
+                       if info[:2] == "14":
+                               self.model = 1
+                               print "MacConfig, model : solo_"
+                       elif info[:2] == "12":
+                               self.model = 0
+                               print "MacConfig, model: duo_"
+
+       def loadmacaddr(self):
+               try:
+                       self.macfd = 0
+
+                       if self.model==0 or self.model==3 or self.model==4 :
+                               devices = ["/autofs/sdb1", "/autofs/sdc1", "/autofs/sdd1", "/autofs/sde1" ]
+                       elif self.model==1:
+                               devices = [ "/autofs/sda1", "/autofs/sdb1" ]
+                       elif self.model==2:
+                               devices = [ "/autofs/sdb1", "/autofs/sdc1", "/autofs/sdd1" ]
+
+                       for dev in devices:
+                               print 'try..',dev
+                               if  fileExists(dev+"/macinfo.txt"):
+                                       print "<open>"+dev+"/macinfo.txt"
+                                       self.macfd = open(dev+"/macinfo.txt","r+")
+                                       break
+
+                       if self.macfd == 0:
+                               self["text"].setText(("cannot read usb!!"))
+                               self["text1"].setText((" "))
+                               self["stattext"].setText((" Press Exit Key."))
+                               self.ReadMacinfo=0
+                               return
+                       
+                       macaddr=self.macfd.readline().split(":")
+                       self.macaddr=macaddr[1]+macaddr[2]+macaddr[3]+macaddr[4]+macaddr[5]+macaddr[6]
+                       self.displaymac()
+                       self.ReadMacinfo = 1
+               except:
+                       self["text"].setText(("cannot read usb!!"))
+                       self["text1"].setText((" "))
+                       self["stattext"].setText((" Press Exit Key."))
+                       self.ReadMacinfo=0
+       
+       def getmacaddr(self):
+               if self.ReadMacinfo==0:
+                       return
+               try:
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd5"
+                       elif self.model == 0 or self.model == 1:
+                               cmd = "nanddump -s 0x" + str((self.mactry-1)*2) + "0000 -b -o -l 64 -p /dev/mtd4"
+                       self.macConsole = Console()     
+                       self.macConsole.ePopen(cmd, self.readmac,self.checkReadmac)
+               except:
+                       return
+
+       def readmac(self, result, retval,extra_args=None):
+               (callback) = extra_args
+               if self.macConsole is not None:
+                       if retval == 0:
+                               self.macConsole = None
+                               macline = None
+                               content =result.splitlines()
+                               for x in content:
+                                       if x.startswith('0x000'+str((self.mactry-1)*2)+'0010:'):
+                                               macline = x.split()
+                               if macline == None:
+                                       callback(0)
+                               elif len(macline) < 10: 
+                                       callback(1)
+                               else:   
+                                       mac = macline[5]+":"+macline[6]+":"+macline[7]+":"+macline[8]+":"+macline[9]+":"+macline[10]
+                                       self["stattext"].setText(("now : "+mac))
+                                       callback(2)
+
+       def checkReadmac(self,data):
+               if data == 0:
+                       print "block %d is bad block" % self.mactry
+                       self.mactry = self.mactry + 1
+                       if self.mactry > 4:
+                               self.session.open(MessageBox, _("FLASH IS BROKEN"), type = MessageBox.TYPE_INFO, enable_input = False)
+                               return
+                       else:
+                               self.getmacaddr()
+               elif data == 1:
+                       print 'mac dump read error'
+                       return
+               elif data == 2:
+                       print 'mac address read ok'
+                       return
+
+                       
+       def keyleft(self):
+               if self.ReadMacinfo==0 :
+                       return
+               macaddress = long(self.macaddr,16)-1
+               if macaddress < 0 :
+                       macaddress = 0xffffffffffff
+               self.macaddr = "%012x"%macaddress
+               self.displaymac()
+
+       def keyright(self):
+               if self.ReadMacinfo==0 :
+                       return
+               macaddress = long(self.macaddr,16)+1
+               if macaddress > 0xffffffffffff:
+                       macaddress = 0
+               self.macaddr = "%012x"%macaddress
+               self.displaymac()
+
+       def displaymac(self):
+               macaddr= self.macaddr
+               self["text"].setText(("%02x:%02x:%02x:%02x:%02x:%02x"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))))
+
+       def keyOk(self):
+               if self.ReadMacinfo==0 :
+                       return
+               try:
+                       macaddr = self.macaddr
+#make_mac_sector 00-99-99-99-00-00 > /tmp/mac.sector
+#flash_eraseall /dev/mtd4
+#nandwrite /dev/mtd4 /tmp/mac.sector -p                        
+                       cmd = "make_mac_sector %02x-%02x-%02x-%02x-%02x-%02x > /tmp/mac.sector"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))
+                       system(cmd)
+                       if self.model == 2 or self.model == 3 or self.model == 4:
+                               system("flash_eraseall /dev/mtd5")
+                               system("nandwrite /dev/mtd5 /tmp/mac.sector -p")
+                       elif self.model == 0 or self.model ==1 :
+                               system("flash_eraseall /dev/mtd4")
+                               system("nandwrite /dev/mtd4 /tmp/mac.sector -p")
+                       macaddress = long(macaddr,16)+1
+                       if macaddress > 0xffffffffffff:
+                               macaddress = 0
+                       macaddr = "%012x"%macaddress
+                       macwritetext = "MAC:%02x:%02x:%02x:%02x:%02x:%02x"%(int(macaddr[0:2],16),int(macaddr[2:4],16),int(macaddr[4:6],16),int(macaddr[6:8],16),int(macaddr[8:10],16),int(macaddr[10:12],16))
+                       self.macfd.seek(0)
+                       self.macfd.write(macwritetext)
+                       self.macfd.close()
+                       system("sync")
+                       self.macaddr = macaddr
+                       self.close()
+               except:
+                       self.session.open( MessageBox, _("Mac address fail"), MessageBox.TYPE_ERROR)
+                       global ethtest
+                       ethtest = 0
+                       self.close()            
+
+       def keyCancel(self):
+               if self.macfd != 0:
+                       self.macfd.close()
+               global ethtest
+               ethtest = 0
+               self.close()
+
+smartcardtest = 0
+class SmartCardTest(Screen):
+       skin = """
+               <screen position="300,240" size="160,120" title="SmartCard Test" >
+                       <widget name="text" position="10,10" size="140,100" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session, stbmodel = 0):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "cancel": self.keyCancel,
+                       "ok" : self.keyOk
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Testing Smartcard 1..."))
+               self.testok = 0
+               self.smartcardtimer = eTimer()
+               self.smartcardtimer.callback.append(self.check_smart_card)
+               self.closetimer = eTimer()
+               self.closetimer.callback.append(self.close)
+               self.smartcard=0
+               global smartcardtest
+               smartcardtest = 0
+               self.model = stbmodel
+               self.Testmode = 1
+               self.smartcardtimer.start(100,True)
+
+       def check_smart_card(self):
+               global smartcardtest
+               index = self.smartcard
+               result  = 0
+               if index==0:
+                       if self.Testmode==0:
+                               result = eSctest.getInstance().check_smart_card("/dev/sci0")
+                       else:
+                               result = eSctest.getInstance().n_check_smart_card("/dev/sci0")                  
+               elif index ==1:
+                       if self.Testmode==0:
+                               result = eSctest.getInstance().check_smart_card("/dev/sci1")
+                       else:
+                               result = eSctest.getInstance().n_check_smart_card("/dev/sci1")                  
+               else:
+                       result = -1
+
+               print result                    
+               
+               if result == 0:
+                       print 'pass'
+                       if(index== 0 and ( self.model== 0 or self.model==2 or self.model == 3 or self.model == 4) ):
+                               self.smartcard = 1
+                               self["text"].setText(_("Testing Smartcard 2..."))
+                               self.smartcardtimer.start(100,True)
+                               return
+                       elif (index==1 or self.model==1):
+                               smartcardtest = 1
+                               self.testok = 1
+                               self["text"].setText(_("Smart Card OK!!"))
+                               self.closetimer.start(2000,True)
+                               self.smartcardtimer.stop()
+                       else :
+                               
+                               self["text"].setText(_("Smart Card model type error"))
+                               self.closetimer.start(2000,True)
+                               self.smartcardtimer.stop()
+               else:
+#                      if result ==-1:
+#                              self.session.open( MessageBox, _("%d:NO_DEV_FOUND"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -2:
+#                              self.session.open( MessageBox, _("%d:SC_NOT_INSERTED"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -3:
+#                              self.session.open( MessageBox, _("%d:SC_NOT_VALID_ATR"%(index+1)), MessageBox.TYPE_ERROR)
+#                      elif result == -5:
+#                              self.session.open( MessageBox, _("%d:SC_READ_TIMEOUT"%(index+1)), MessageBox.TYPE_ERROR)
+                       if(index==0):
+                               self["text"].setText(_("Smart Card 1 Error!\nerrorcode=%d"%result))
+                       elif (index==1):
+                               self["text"].setText(_("Smart Card 2 Error!\nerrorcode=%d"%result))
+                       self.closetimer.start(2000,True)
+                       self.smartcardtimer.stop()
+
+                               
+       def keyCancel(self):
+               self.close()
+
+       def keyOk(self):
+               if self.testok == 1:
+                       self.close()
+
+       
+
+fronttest = 0
+
+class FrontTest(Screen):
+       skin = """
+               <screen position="260,240" size="200,180" title="Front Test" >
+                       <widget name="text" position="10,10" size="180,160" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "ok": self.keyOk,
+                       "up":self.keyUp,
+                       "down":self.keyDown,                    
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Wheel LEFT"))
+               self.step = 1
+               
+               self.fronttimer= eTimer()
+               self.fronttimer.callback.append(self.FrontAnimate)
+               self.frontturnonoff = 0
+               eSctest.getInstance().VFD_Open()
+               self.keytimeout = eTimer()
+               self.keytimeout.callback.append(self.KeyTimeOut)
+               self.keytimeout.start(5000,True)
+
+       def KeyTimeOut(self):
+               if self.step == 1:
+                       self["text"].setText(("Wheel LEFT ERROR"))
+               elif self.step ==2 :
+                       self["text"].setText(("Wheel RIGHT ERROR"))
+               elif self.step == 3:
+                       self["text"].setText(("Wheel BUTTON ERROR"))
+               self.step = 0
+#              self.keyCancel()
+                               
+       def keyCancel(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               if self.step==4:
+                       fronttest = 1
+               else:
+                       fronttest = 0
+               self.close()
+
+       def keyDown(self):
+               if self.step==2:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 3
+                       self["text"].setText(_("Press Front Wheel"))
+
+       def keyUp(self):
+               if self.step==1:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step=2
+                       self["text"].setText(_("Wheel RIGHT"))
+
+       def keyOk(self):
+               if self.step == 3:
+                       self.keytimeout.stop()
+                       self.step =4
+                       self.fronttimer.start(1000,True)
+                       self["text"].setText(("Front Test OK!\nPress Exit Key"))
+#              elif self.step==4:
+#                      global fronttest
+#                      self.fronttimer.stop()
+#                      eSctest.getInstance().VFD_Close()
+#                      fronttest = 1
+#                      self.close()
+
+       def FrontAnimate(self):
+               if (self.frontturnonoff==0):
+                       eSctest.getInstance().turnon_VFD()
+                       self.frontturnonoff = 1
+               else:
+                       self.frontturnonoff = 0
+                       eSctest.getInstance().turnoff_VFD()
+               self.fronttimer.start(1000,True)
+               
+
+class FrontTest_solo(Screen):
+       skin = """
+               <screen position="260,240" size="200,180" title="Front Test" >
+                       <widget name="text" position="10,10" size="180,160" font="Regular;22" />
+               </screen>"""
+
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","GlobalActions"],
+               {
+                       "ok": self.keyOk,
+                       "cancel": self.keyCancel,
+                       "left": self.keyleft,
+                       "right": self.keyright,
+                       "power_down": self.keypower,
+                       "volumeUp": self.keyvolup,
+                       "volumeDown": self.keyvoldown,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Press Front STANDBY"))
+               self.step = 1
+               
+               self.fronttimer= eTimer()
+               self.fronttimer.callback.append(self.FrontAnimate)
+               self.frontturnonoff = 0
+               eSctest.getInstance().VFD_Open()
+               self.keytimeout = eTimer()
+               self.keytimeout.callback.append(self.KeyTimeOut)
+               self.keytimeout.start(5000,True)
+
+       def KeyTimeOut(self):
+               if self.step == 1:
+                       self["text"].setText(("Front STANDBY ERROR\nPress exit!"))
+               elif self.step == 2 :
+                       self["text"].setText(("Front CH - ERROR\nPress exit!"))
+               elif self.step == 3:
+                       self["text"].setText(("Front CH + ERROR\nPress exit!"))
+               elif self.step == 4 :
+                       self["text"].setText(("Front VOL - ERROR\nPress exit!"))
+               elif self.step == 5:
+                       self["text"].setText(("Front VOL + ERROR\nPress exit!"))
+                       
+               self.step = 0
+#              self.keyCancel()
+
+       def keypower(self):
+               if self.step== 1:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 2
+                       self["text"].setText(_("Press Front CH -"))
+                       
+       def keyright(self):
+               if self.step== 3:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 4
+                       self["text"].setText(_("Press Front VOL -"))
+                       
+       def keyleft(self):
+               if self.step== 2:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 3
+                       self["text"].setText(_("Press Front CH +"))
+
+       def keyvolup(self):
+               if self.step== 5:
+                       self.keytimeout.stop()
+                       self.step = 6
+                       self.fronttimer.start(1000,True)
+                       self["text"].setText(_("Front LED OK?\n\nyes-ok\nno-exit"))                     
+#                      self["text"].setText(("Front Test OK!\nPress Exit Key"))
+               
+       def keyvoldown(self):
+               if self.step== 4:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 5
+                       self["text"].setText(_("Press Front VOL +"))
+
+       def checkled(self, yesno):
+               if yesno :
+                       self.step=6
+               else:
+                       self.step=0
+               self.keyCancel()
+                       
+       def keyCancel(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               fronttest = 0
+               self.close()
+
+       def keyOk(self):
+               global fronttest
+               if self.step == 6:
+                       fronttest = 1
+                       self.fronttimer.stop()
+                       eSctest.getInstance().VFD_Close()
+                       self.close()
+
+       def FrontAnimate(self):
+               if (self.frontturnonoff==0):
+                       eSctest.getInstance().turnon_VFD()
+                       self.frontturnonoff = 1
+               else:
+                       self.frontturnonoff = 0
+                       eSctest.getInstance().turnoff_VFD()
+               self.fronttimer.start(1000,True)
+
+class FrontTest_uno(Screen):
+       skin = """
+               <screen name="FrontTest_uno" position="center,center" size="300,180" title="Front Test" >
+                       <widget name="text" position="10,10" size="280,160" font="Regular;30" />
+               </screen>"""
+
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions","GlobalActions"],
+               {
+                       "ok": self.keyOk,
+                       "cancel": self.keyCancel,
+                       "left": self.keyleft,
+                       "right": self.keyright,
+                       "volumeUp": self.keyvolup,
+                       "volumeDown": self.keyvoldown,
+                       "power_down": self.keypower,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Press Front CH -"))
+               self.step = 1
+               self.fronttimer= eTimer()
+               self.fronttimer.callback.append(self.FrontAnimate)
+               self.frontturnonoff = 0
+               eSctest.getInstance().VFD_Open()
+               self.keytimeout = eTimer()
+               self.keytimeout.callback.append(self.KeyTimeOut)
+               self.keytimeout.start(5000,True)
+
+       def KeyTimeOut(self):
+               if self.step == 1:
+                       self["text"].setText(("Front CH - ERROR\nPress exit!"))
+               elif self.step == 2:
+                       self["text"].setText(("Front CH + ERROR\nPress exit!"))
+               elif self.step == 3 :
+                       self["text"].setText(("Front VOL - ERROR\nPress exit!"))
+               elif self.step == 4:
+                       self["text"].setText(("Front VOL + ERROR\nPress exit!"))
+               elif self.step == 5:
+                       self["text"].setText(("Front STANDBY ERROR\nPress exit!"))
+               self.step = 0
+
+       def keyleft(self):
+               if self.step== 1:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 2
+                       self["text"].setText(_("Press Front CH +"))
+       def keyright(self):
+               if self.step== 2:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 3
+                       self["text"].setText(_("Press Front VOL -"))
+
+       def keyvoldown(self):
+               if self.step== 3:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 4
+                       self["text"].setText(_("Press Front VOL +"))
+
+       def keyvolup(self):
+               if self.step== 4:
+                       self.keytimeout.stop()
+                       self.keytimeout.start(5000,True)
+                       self.step = 5
+                       self["text"].setText(_("Press Front STANDBY"))
+
+       def keypower(self):
+               if self.step== 5:
+                       self.keytimeout.stop()
+                       self.step = 6
+                       self.fronttimer.start(1000,True)
+                       self["text"].setText(_("Front LED OK?\n\nyes-ok\nno-exit"))
+
+       def keyCancel(self):
+               global fronttest
+               self.fronttimer.stop()
+               eSctest.getInstance().VFD_Close()
+               fronttest = 0
+               self.close()
+
+       def keyOk(self):
+               global fronttest
+               if self.step == 6:
+                       fronttest = 1
+                       self.fronttimer.stop()
+                       eSctest.getInstance().VFD_Close()
+                       self.close()
+
+       def FrontAnimate(self):
+               if (self.frontturnonoff==0):
+                       eSctest.getInstance().turnon_VFD()
+                       self.frontturnonoff = 1
+               else:
+                       self.frontturnonoff = 0
+                       eSctest.getInstance().turnoff_VFD()
+               self.fronttimer.start(1000,True)
+       
+
+rstest = 0
+
+import select
+
+class RS232Test(Screen):
+       skin = """
+               <screen position="300,240" size="160,100" title="RS232 Test" >
+                       <widget name="text" position="10,10" size="140,80" font="Regular;22" />
+               </screen>"""
+       step=1
+       def __init__(self, session):
+               self["actions"] = ActionMap(["DirectionActions", "OkCancelActions"],
+               {
+                       "cancel": self.keyCancel,
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text"]=Label(("Press \"Enter\" Key"))
+               self.timer = eTimer()
+               self.timer.callback.append(self.checkrs232)
+               self.timer.start(100, True)
+
+       def checkrs232(self):
+               global rstest
+               try:
+                       rs=open('/dev/ttyS0','r')
+                       rd = [rs]
+                       r,w,e = select.select(rd, [], [], 10)
+                       if r:
+                               input = rs.read(1)
+                               if input == "\n":
+                                       rstest = 1
+                               else:
+                                       rstest = 0 
+                       else:
+                               rstest = 0
+               except:
+                       print 'error'
+                       rstest = 0
+               if rstest == 0:
+                       self.session.open( MessageBox, _("RS232 Test Failed!\nPress 'EXIT' button!"), MessageBox.TYPE_ERROR)
+               self.close()
+
+       def keyCancel(self):
+               self.close()
+
+Agingresult = 0
+
+class AgingTest(Screen):
+       skin = """
+               <screen position="200,240" size="250,100" title="Aging Test" >
+                       <widget name="text1" position="10,10" size="230,40" font="Regular;22" />
+                       <widget name="text2" position="10,50" size="230,40" font="Regular;22" />
+               </screen>"""
+       step=1
+       def __init__(self, session):
+               self["actions"] = ActionMap(["MediaPlayerActions","GlobalActions"],
+               {
+                       "pause": self.keyEnd,
+                       "stop": self.keyFinish,
+                       "volumeUp": self.nothing,
+                       "volumeDown": self.nothing,
+                       "volumeMute": self.nothing,             
+               }, -2)
+
+               Screen.__init__(self, session)
+               self["text1"]=Label(("Exit - Press Pause Key"))
+               self["text2"]=Label(("Reset - Press Stop Key"))
+#              self.servicelist = ServiceList()
+#              self.oldref = session.nav.getCurrentlyPlayingServiceReference()
+#              print "oldref",self.oldref
+#              session.nav.stopService() # try to disable foreground service
+#              self.chstart()
+               self.tunerlock = 0
+               self.tuningtimer = eTimer()
+               self.tuningtimer.callback.append(self.updateStatus)
+#              self.tuningtimer.start(200,True)
+
+
+       def updateStatus(self):
+               result = eSctest.getInstance().getFrontendstatus(0)             
+               hv = "Ver"
+                       
+               print "eSctest.getInstance().getFrontendstatus - %d"%result
+               if result == 0:
+                       self.tunerlock = 0
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Locking Fail..."), MessageBox.TYPE_ERROR)
+               elif result==1 :
+                       self.tunerlock = 1
+               else:
+                       self.tunerlock = 0
+                       self.session.nav.stopService()
+                       self.session.open( MessageBox, _("Tune 1 Ver Error %d..."%result), MessageBox.TYPE_ERROR)
+
+
+       def nothing(self):
+               print "nothing"
+
+       def chstart(self):
+               if self.oldref is None:
+                       eref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+                       serviceHandler = eServiceCenter.getInstance()
+                       servicelist = serviceHandler.list(eref)
+                       if not servicelist is None:
+                               ref = servicelist.getNext()
+                       else:
+                               ref = self.getCurrentSelection()
+                               print "servicelist none"
+               else:
+                       ref = self.oldref
+               self.session.nav.stopService() # try to disable foreground service
+               ref.setData(0,0x19)
+               ref.setData(1,0x83)
+               ref.setData(2,0x6)
+               ref.setData(3,0x85)
+               ref.setData(4,0x640000)
+               self.session.nav.playService(ref)
+
+       def keyEnd(self):
+               global Agingresult
+               Agingresult = 0
+               self.session.nav.stopService() # try to disable foreground service
+               self.close()
+
+       def keyFinish(self):
+               global Agingresult
+               Agingresult = 1
+               self.session.nav.stopService() # try to disable foreground service
+               self.close()
+               
+session = None
+
+       
+def cleanup():
+       global Session
+       Session = None
+       global Servicelist
+       Servicelist = None
+
+def main(session, servicelist, **kwargs):
+       global Session
+       Session = session
+       global Servicelist
+       Servicelist = servicelist
+       bouquets = Servicelist.getBouquetList()
+       global bouquetSel
+       bouquetSel = Session.openWithCallback(cleanup, FactoryTest)
+
+#def Plugins(**kwargs):
+#      return PluginDescriptor(name=_("Factory Test"), description="Test App for Factory", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main)
+
+def Plugins(**kwargs):
+       return []
diff --git a/lib/python/Plugins/SystemPlugins/FactoryTest/testdb b/lib/python/Plugins/SystemPlugins/FactoryTest/testdb
new file mode 100755 (executable)
index 0000000..71dee33
--- /dev/null
@@ -0,0 +1,57 @@
+eDVB services /4/
+transponders
+0064af79:03ef:0001
+       s 12153000:22000000:1:2:100:2:0:1:2:0:2
+/
+00820000:0003:00a4
+       s 10900000:26850000:0:0:130:2:0
+/
+00a00000:0003:00a4
+       s 10900000:26850000:0:0:160:2:0
+/
+00c00000:03ef:0001
+       s 12153000:22000000:1:2:192:2:0:1:2:0:2
+/
+ffff029a:03ef:0001
+       c 666000:6900000:2:3:0:0
+/
+eeee025c:03ef:0001
+       t 604000000:1:5:5:3:2:4:4:2:0
+/
+026c0000:0003:00a4
+       s 10900000:26850000:0:0:620:2:0
+/
+0282af79:03ef:0001
+       s 12153000:22000000:1:2:642:2:0:1:2:0:2
+/
+end
+services
+06d3:00820000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+06d3:00a00000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+1325:00c00000:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,f:40
+1325:0064af79:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,f:40
+1325:ffff029a:03ef:0001:25:0
+ASTRA HD+
+p:BetaDigital,f:40
+06d3:026c0000:0003:00a4:1:0
+747 Channel [V] China
+p:STAR,c:000203,c:01028c,c:031ffe,f:40
+1325:0282af79:03ef:0001:25:0
+ASTRA HD
+p:BetaDigital,c:0001ff,c:0301ff,c:040203,c:050001,f:40
+1325:eeee025c:03ef:0001:25:0
+ASTRA HD+
+p:BetaDigital,f:40
+1324:eeee025c:03ef:0001:25:0
+ANIXE HD
+p:BetaDigital,f:40
+end
+Have a lot of bugs!
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am b/lib/python/Plugins/SystemPlugins/Fancontrol/Makefile.am
new file mode 100644 (file)
index 0000000..8d4268b
--- /dev/null
@@ -0,0 +1,7 @@
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/Fancontrol
+
+SUBDIRS = meta
+
+install_PYTHON =       \
+       __init__.py \
+       plugin.py 
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py b/lib/python/Plugins/SystemPlugins/Fancontrol/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am b/lib/python/Plugins/SystemPlugins/Fancontrol/meta/Makefile.am
new file mode 100644 (file)
index 0000000..df0956d
--- /dev/null
@@ -0,0 +1,3 @@
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_fancontrol.xml
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml b/lib/python/Plugins/SystemPlugins/Fancontrol/meta/plugin_fancontrol.xml
new file mode 100644 (file)
index 0000000..b766e34
--- /dev/null
@@ -0,0 +1,17 @@
+<default>
+         <prerequisites>
+                    <tag type="System" />
+         </prerequisites>
+          <info language="en">
+                    <author>ikseong</author>
+                    <name>Fancontrol</name>
+                    <packagename>enigma2-plugin-systemplugins-fancontrol</packagename>
+                    <shortdescription>Fan Control setting in standbymode.</shortdescription>
+                    <description>The Fan control turn on, turn off, modify fan action time on standbymode.
+                    </description>
+          </info>
+         <files type="package"> <!-- without version, without .ipk -->
+               <file type="package" name="enigma2-plugin-systemplugins-fancontrol" />
+       </files>
+
+</default>
diff --git a/lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py b/lib/python/Plugins/SystemPlugins/Fancontrol/plugin.py
new file mode 100644 (file)
index 0000000..e3d3c52
--- /dev/null
@@ -0,0 +1,172 @@
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Plugins.Plugin import PluginDescriptor
+from Components.ActionMap import ActionMap,NumberActionMap
+from Components.config import config
+from Components.config import config, getConfigListEntry, ConfigInteger, ConfigSubsection, ConfigSelection
+from Components.ConfigList import ConfigListScreen
+from Components.ActionMap import ActionMap
+from Components.Sources.StaticText import StaticText
+
+
+config.plugins.fancontrols = ConfigSubsection()
+config.plugins.fancontrols.standbymode = ConfigSelection(default = "off", choices = [
+       ("off", _("off")), ("on", _("on"))])
+config.plugins.fancontrols.usetimer = ConfigSelection(default = "off", choices = [
+       ("off", _("no")), ("on", _("yes"))])
+config.plugins.fancontrols.fanontime = ConfigInteger(default = 5, limits = (1, 100))
+config.plugins.fancontrols.fanofftime = ConfigInteger(default = 60, limits = (1, 100))
+
+class FancontrolConfiguration(Screen, ConfigListScreen):
+       skin = """
+               <screen name="FancontrolConfiguration" position="center,center" size="560,300" title="Standbymode Fancontrol settings" >
+                       <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" />
+                       <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" />
+                       <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ececec" backgroundColor="#9f1313" transparent="1" />
+                       <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ececec" backgroundColor="#1f771f" transparent="1" />
+                       <widget name="config" zPosition="2" position="5,50" size="550,200" scrollbarMode="showOnDemand" transparent="1" />
+               </screen>"""
+       def __init__(self, session):
+               Screen.__init__(self, session)
+               self.session = session
+               self.standbyEntry = None
+               self.usetimerEntry = None
+               self.fanontimeEntry = None
+               self.fanofftimeEntry = None
+
+               self["shortcuts"] = ActionMap(["ShortcutActions", "SetupActions" ],
+               {
+                       "ok": self.keySave,
+                       "cancel": self.keyCancel,
+                       "red": self.keyCancel,
+                       "green": self.keySave,
+               }, -2)
+
+               self.list = []
+               ConfigListScreen.__init__(self, self.list,session = self.session)
+#              self.getFaninfo()
+               self.createSetup()
+
+               self["key_red"] = StaticText(_("Close"))
+               self["key_green"] = StaticText(_("Save"))
+
+       def keyLeft(self):
+               ConfigListScreen.keyLeft(self)
+               self.newConfig()
+
+       def keyRight(self):
+               ConfigListScreen.keyRight(self)
+               self.newConfig()
+
+       def getFaninfo(self):
+               try:
+                       value=int(open('/proc/stb/system/standby_fan_off','r').read())
+                       if value is 0:
+                               config.plugins.fancontrols.standbymode.value="on"
+                       else:
+                               config.plugins.fancontrols.standbymode.value="off"
+                       value=int(open('/proc/stb/system/use_fan_timer','r').read())
+                       if value is 0:
+                               config.plugins.fancontrols.usetimer.value = "off"
+                       else:
+                               config.plugins.fancontrols.usetimer.value = "on"
+                       time=int(open('/proc/stb/system/fan_on_time','r').read())
+                       if time > 0 and time < 101:
+                               config.plugins.fancontrols.fanontime.value = time
+                       else:
+                               config.plugins.fancontrols.fanontime.value = 1
+                       time=int(open('/proc/stb/system/fan_off_time','r').read())
+                       if time > 0 and time < 101:
+                               config.plugins.fancontrols.fanofftime.value = time
+                       else:
+                               config.plugins.fancontrols.fanofftime.value = 1
+               except:
+                       print 'Error read proc of fan'
+       
+
+       def createSetup(self):
+               self.list = []
+               self.standbyEntry = getConfigListEntry(_("Fan basic action"), config.plugins.fancontrols.standbymode)
+               self.usetimerEntry = getConfigListEntry(_("Use Fan timer"), config.plugins.fancontrols.usetimer)
+               self.fanontimeEntry = getConfigListEntry(_("Fan on duration time"), config.plugins.fancontrols.fanontime)
+               self.fanofftimeEntry = getConfigListEntry(_("Fan off duration time"), config.plugins.fancontrols.fanofftime)
+
+               self.list.append( self.standbyEntry )
+               if config.plugins.fancontrols.standbymode.value is "off":
+                       self.list.append( self.usetimerEntry )
+                       if config.plugins.fancontrols.usetimer.value is not "off":
+                               self.list.append( self.fanontimeEntry )
+                               self.list.append( self.fanofftimeEntry )
+               
+               self["config"].list = self.list
+               self["config"].l.setList(self.list)
+               if not self.selectionChanged in self["config"].onSelectionChanged:
+                       self["config"].onSelectionChanged.append(self.selectionChanged)
+
+       def newConfig(self):
+               if self["config"].getCurrent() == self.usetimerEntry or self["config"].getCurrent() == self.standbyEntry:
+                       self.createSetup()
+
+       def selectionChanged(self):
+               current = self["config"].getCurrent()
+               print current
+
+       def cancelConfirm(self, result):
+               if not result:
+                       return
+               for x in self["config"].list:
+                       x[1].cancel()
+               self.close()
+
+                       
+       def keyCancel(self):
+               print "cancel"
+               if self["config"].isChanged():
+                       self.session.openWithCallback(self.cancelConfirm, MessageBox, _("Really close without saving settings?"))
+               else:
+                       self.close()
+
+       def keySave(self):
+               ConfigListScreen.keySave(self)
+               try:
+                       if config.plugins.fancontrols.standbymode.value is "on":
+                               open('/proc/stb/system/standby_fan_off','w').write('0')
+                       else:
+                               open('/proc/stb/system/standby_fan_off','w').write('1')
+                               if config.plugins.fancontrols.usetimer.value is "off":
+                                       open('/proc/stb/system/use_fan_timer','w').write('0')
+                               else:
+                                       open('/proc/stb/system/use_fan_timer','w').write('1')
+                                       open('/proc/stb/system/fan_on_time','w').write('%s'%config.plugins.fancontrols.fanontime.value)
+                                       open('/proc/stb/system/fan_off_time','w').write('%s'%config.plugins.fancontrols.fanofftime.value)
+               except:
+                       print 'Error write proc of fan'
+               
+       
+def openconfig(session, **kwargs):
+       session.open(FancontrolConfiguration)
+
+def selSetup(menuid, **kwargs):
+       if menuid != "system":
+               return [ ]
+
+       return [(_("Fan Control"), openconfig, "fancontrol_config", 70)]
+
+def setfancontrol(reason, **kwargs):
+       try:
+               if config.plugins.fancontrols.standbymode.value == "on":
+                       open('/proc/stb/system/standby_fan_off','w').write('0')
+               else:
+                       open('/proc/stb/system/standby_fan_off','w').write('1')
+                       if config.plugins.fancontrols.usetimer.value is "off":
+                               open('/proc/stb/system/use_fan_timer','w').write('0')
+                       else:
+                               open('/proc/stb/system/use_fan_timer','w').write('1')
+                               open('/proc/stb/system/fan_on_time','w').write('%s'%config.plugins.fancontrols.fanontime.value)
+                               open('/proc/stb/system/fan_off_time','w').write('%s'%config.plugins.fancontrols.fanofftime.value)
+       except:
+               print 'Error to set fan control'
+
+def Plugins(**kwargs):
+       return [PluginDescriptor(name = "Fancontrols", description = "check Fan Control settings", where = PluginDescriptor.WHERE_AUTOSTART, fnc = setfancontrol),
+       PluginDescriptor(name=_("Fan control"), description="Fan Control", where = PluginDescriptor.WHERE_MENU, fnc=selSetup)]
index 9cc538f..ab4883e 100755 (executable)
@@ -4,7 +4,8 @@ SUBDIRS = SoftwareManager FrontprocessorUpgrade PositionerSetup Satfinder \
        SkinSelector SatelliteEquipmentControl Videomode VideoTune Hotplug \
        DefaultServicesScanner NFIFlash DiseqcTester CommonInterfaceAssignment \
        CrashlogAutoSubmit CleanupWizard VideoEnhancement WirelessLan NetworkWizard \
-       TempFanControl
+       TempFanControl FactoryTest Fancontrol FPGAUpgrade WirelessLanSetup ManualFancontrol \
+       Blindscan
 
 install_PYTHON =       \
        __init__.py
diff --git a/lib/python/Plugins/SystemPlugins/ManualFancontrol/InstandbyOn.py b/lib/python/Plugins/SystemPlugins/ManualFancontrol/InstandbyOn.py
new file mode 100755 (executable)
index 0000000..df7e5b6
--- /dev/null
@@ -0,0 +1,119 @@
+from Components.config import config, ConfigSubList, ConfigSubsection
+import NavigationInstance
+from enigma import iRecordableService, eTimer, iPlayableService, eServiceCenter, iServiceInformation
+from Components.ConfigList import ConfigListScreen
+from Components.config import config, ConfigSubsection, ConfigSelection, ConfigSlider
+from Components.Harddisk import harddiskmanager
+
+config.plugins.manualfancontrols = ConfigSubsection()
+config.plugins.manualfancontrols.standbymode = ConfigSelection(default = "yes", choices = [
+       ("no", _("no")), ("yes", _("yes"))])
+config.plugins.manualfancontrols.pwmvalue = ConfigSlider(default = 10, increment = 5, limits = (0, 255))
+config.plugins.manualfancontrols.checkperiod = ConfigSelection(default = "10", choices = [
+               ("5", "5 " + _("seconds")), ("10", "10 " + _("seconds")), ("30", "30 " + _("seconds")),
+               ("60", "1 " + _("minute")), ("120", "2 " + _("minutes")),
+               ("300", "5 " + _("minutes")), ("600", "10 " + _("minutes"))])
+
+instandbyOn_playingpvr = False
+
+class instandbyOn:
+       def __init__(self):
+               self.fanoffmode = 'OFF'
+               self.minimum_pwm = 5
+               self.setPWM(config.plugins.manualfancontrols.pwmvalue.value)
+               self.checkStstusTimer = eTimer()
+               self.checkStstusTimer.callback.append(self.checkStstus)
+               if config.plugins.manualfancontrols.pwmvalue.value == 0:
+                       self.fanoffmode = 'ON'
+               if self.fanoffmode == 'ON':
+                       self.checkStatusLoopStart()
+
+               config.misc.standbyCounter.addNotifier(self.standbyBegin, initial_call = False)
+               print "<ManualFancontrol> init :  self.fanoffmode : ", self.fanoffmode
+               print "<ManualFancontrol> init :  config.plugins.manualfancontrols.pwmvalue.value : ", config.plugins.manualfancontrols.pwmvalue.value
+
+       def checkStatusLoopStart(self):
+               print "<ManualFancontrol> checkStatusLoopStart"
+               self.checkStstusTimer.start(int(config.plugins.manualfancontrols.checkperiod.value) * 1000)
+
+       def checkStatusLoopStop(self):
+               print "<ManualFancontrol> checkStatusLoopStop"
+               self.checkStstusTimer.stop()
+
+       def checkStstus(self):
+               from Screens.Standby import inStandby
+               print "<ManualFancontrol> checkStstus, fanoffmode : %s, "%self.fanoffmode,"inStandby : ",inStandby and True or False
+               if self.fanoffmode is 'ON' : # pwmvalue is '0'
+                       if self.isRecording() or self.isHDDActive():
+                               self.setPWM(self.minimum_pwm)
+                       else:
+                               self.setPWM(0)
+               elif inStandby : # standby mode but pwm > 0
+                       if self.isRecording() or self.isHDDActive():
+                               self.setPWM(config.plugins.manualfancontrols.pwmvalue.value)
+                       else:
+                               self.setPWM(0)
+               elif self.getPWM() != config.plugins.manualfancontrols.pwmvalue.value : # normal mode
+                       self.setPWM(config.plugins.manualfancontrols.pwmvalue.value)
+
+       def standbyBegin(self, configElement):
+               print "<ManualFancontrol> Standby Begin"
+               if config.plugins.manualfancontrols.standbymode.value == "yes" and self.fanoffmode is "OFF":
+                       from Screens.Standby import inStandby
+                       inStandby.onClose.append(self.StandbyEnd)
+                       self.addRecordEventCB()
+                       self.checkStatusLoopStart()
+                       self.checkStstus()
+
+       def StandbyEnd(self):
+               print "<ManualFancontrol> Standby End"
+               if self.fanoffmode is "OFF":
+                       self.removeRecordEventCB()
+                       self.checkStatusLoopStop()
+               self.checkStstus()
+
+ &nbs