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):
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)
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/Tools/Makefile
lib/service/Makefile
lib/components/Makefile
tools/enigma2.sh
enigma2.pc
])
+AC_DEFINE(BUILD_VUPLUS,1,[Define to 1 for vuplus])
AC_OUTPUT
-config.misc.rcused=0
\ No newline at end of file
+config.misc.rcused=1
\ No newline at end of file
<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">
<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" />
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>
+<!-- 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="107,29" />
<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="40,80" />
+ <button name="2" pos="71,80" />
+ <button name="3" pos="102,80" />
+ <button name="4" pos="40,108" />
+ <button name="5" pos="71,108" />
+ <button name="6" pos="102,108" />
+ <button name="7" pos="40,136" />
+ <button name="8" pos="71,136" />
+ <button name="9" pos="102,136" />
+ <button name="ARROWLEFT" pos="43,180" />
+ <button name="0" pos="71,164" />
+ <button name="ARROWRIGHT" pos="108,180" />
+ <button name="VOL+" pos="41,310" />
+ <button name="VOL-" pos="42,341" />
+ <button name="MUTE" pos="35,29" />
+ <button name="EXIT" pos="72,310" />
+ <button name="BOUQUET+" pos="105,315" />
+ <button name="BOUQUET-" pos="105,330" />
+ <button name="INFO" pos="75,340" />
+ <button name="MENU" pos="41,367" />
+ <button name="OK" pos="75,252" />
+ <button name="UP" pos="75,235" />
+ <button name="DOWN" pos="75,288" />
+ <button name="LEFT" pos="43,255" />
+ <button name="RIGHT" pos="106,255" />
+ <button name="HELP" pos="105,363" />
+ <button name="PVR" pos="65,370" />
+ <button name="RED" pos="40,202" />
+ <button name="GREEN" pos="65,202" />
+ <button name="YELLOW" pos="89,202" />
+ <button name="BLUE" pos="112,202" />
+ <button name="REWIND" pos="36,385" />
+ <button name="PLAYPAUSE" pos="63,400" />
+ <button name="STOP" pos="82,406" />
+ <button name="FORWARD" pos="105,385" />
+ <button name="TV" pos="41,412" />
+ <button name="RADIO" pos="110,412" />
+ <button name="TEXT" pos="40,70" />
+ <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>
<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">
<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">
<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")
</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" />
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>
<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>
rc.cpp \
rcconsole.cpp \
rcinput.cpp \
- rfmod.cpp
+ rfmod.cpp \
+ memtest.cpp \
+ sc_test.cpp
driverincludedir = $(pkgincludedir)/lib/driver
driverinclude_HEADERS = \
--- /dev/null
+#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
--- /dev/null
+#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
--- /dev/null
+#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
--- /dev/null
+#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
+
}
} 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");
openFrontend();
}
+#ifdef BUILD_VUPLUS /* ikseong */
+int frontend0_fd;
+int frontend1_fd;
+#endif
+
int eDVBFrontend::openFrontend()
{
if (m_state != stateClosed)
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
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);
}
{
case gOpcode::flush:
// if (update)
+#ifndef BUILD_VUPLUS /* ikseong */
lcd->update();
+#else
+ ;
+#endif
default:
gDC::exec(o);
break;
void eDBoxLCD::update()
{
+#ifdef BUILD_VUPLUS /* ikseong */
+ return ;
+#endif
if (lcdfd >= 0)
{
if (!is_oled || is_oled == 2)
# 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"),
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
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
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:
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:
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
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
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:
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 != "":
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")
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)
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("")
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)
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)
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)
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)
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:
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()
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):
"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)
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()
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()
<default>
<prerequisites>
<hardware type="dm8000" />
+ <hardware type="dm500hd" />
<tag type="CI" />
<tag type="System" />
</prerequisites>
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) )
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."))
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"
--- /dev/null
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/FactoryTest
+
+install_PYTHON = \
+ __init__.py \
+ plugin.py \
+ testdb
--- /dev/null
+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
+
+class TestResultList(HTMLComponent, GUIComponent):
+ def __init__(self, source):
+ GUIComponent.__init__(self)
+ self.l = eListboxPythonStringContent()
+ self.list = source
+ self.l.setList(self.list)
+
+ GUI_WIDGET = eListbox
+
+ def postWidgetCreate(self, instance):
+ self.instance.setSelectionEnable(0)
+ self.instance.setContent(self.l)
+
+ def updateList(self,list):
+ self.l.setList(list)
+
+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 = "2010-12-14"
+ TESTPROGRAM_VERSION = "Version 00.01"
+
+ self.model = 0
+ self.getModelInfo()
+
+ self["testdate"]=Label((TESTPROGRAM_DATE))
+ self["testversion"]=Label(("Loading version..."))
+ self["mactext"]=Label(("Loading mac address..."))
+ 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
+ nimmanager.sec.update()
+
+ system("cp /usr/lib/enigma2/python/Plugins/SystemPlugins/FactoryTest/testdb /etc/enigma2/lamedb")
+ db = eDVBDB.getInstance()
+ db.reloadServicelist()
+
+ tlist = []
+ 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))
+# tlist.append(("11. DRAM test",11))
+# tlist.append(("12. Flash test",12))
+# tlist.append(("13. DRAM+Flash test",13))
+ self.fdefaultIndex=11
+ tlist.append(("11. Factory default",self.fdefaultIndex))
+ self.shutdownIndex=12
+ tlist.append(("12. Shutdown",self.shutdownIndex))
+ elif self.model == 1:
+# tlist.append((" 0. Sata & extend hdd test",self.satetestIndex=0))
+ self.satetestIndex = -1
+ self.scarttestIndex = -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.tuner1_2testIndex=4
+ tlist.append((" 4. T1 V 22k o 16:9 RGB CAM",self.tuner1_2testIndex))
+ self.tuner2_2testIndex=4
+# tlist.append((" 6. T2 H 22k x 4:3 YC",self.tuner2_1testIndex=6))
+# tlist.append((" 7. T2 V 22k o 16:9 CVBS CAM",self.tuner2_2testIndex=7))
+# tlist.append((" 8. VCR Scart loop",self.scarttestIndex=8))
+ self.rs232testIndex=5
+ tlist.append((" 5. RS232 test",self.rs232testIndex))
+ self.ethernettestIndex=6
+ tlist.append((" 6. Ethernet & mac test",self.ethernettestIndex))
+# tlist.append(("11. DRAM test",11))
+# tlist.append(("12. Flash test",12))
+# tlist.append(("13. DRAM+Flash test",13))
+ self.fdefaultIndex=7
+ tlist.append((" 7. Factory default",self.fdefaultIndex))
+ self.shutdownIndex=8
+ tlist.append((" 8. Shutdown",self.shutdownIndex))
+
+ elif self.model == 2:
+ self.scarttestIndex = -1
+ 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.menulength= len(tlist)-1
+ self["testlist"] = MenuList(tlist)
+ self.rlist = []
+ for x in range(self.menulength):
+ self.rlist.append((".."))
+ self["resultlist"] = TestResultList(self.rlist)
+ self.NetworkState = 0
+ self.first = 0
+
+ self.avswitch = AVSwitch()
+ self.memTest = eMemtest()
+ self.scTest= eSctest()
+
+ self.feid=0
+ self.agingmode=0
+ 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)
+
+ if self.model == 0:
+ self.cam_index = 7
+ elif self.model == 1:
+ self.cam_index = 4
+ elif self.model == 2:
+ self.cam_index = 6
+ 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)
+
+ 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 "getModelInfo : combo"
+ if info == "solo":
+ self.model = 1
+ getmodel = 1
+ print "getModelInfo : solo"
+ if info == "duo":
+ self.model = 0
+ getmodel = 1
+ print "getModelInfo : duo"
+ 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 "getModelInfo : solo_"
+ elif info[:2] == "12":
+ self.model = 0
+ print "getModelInfo : duo_"
+
+ def nothing(self):
+ print "nothing"
+
+ def keyup(self):
+ if self.testing==1:
+ return
+ if self["testlist"].getCurrent()[1]==0:
+ self["testlist"].moveToIndex(self.menulength)
+ else:
+ self["testlist"].up()
+
+
+ def keydown(self):
+ if self.testing==1:
+ return
+ if self["testlist"].getCurrent()[1]==(self.menulength):
+ self["testlist"].moveToIndex(0)
+ else:
+ self["testlist"].down()
+
+ def numberaction(self, number):
+ if self.testing==1:
+ return
+ if number > self.menulength:
+ return
+ index = int(number)
+ self["testlist"].moveToIndex(index)
+
+
+ def updateStatus(self):
+ index = self["testlist"].getCurrent()[1]
+ if index ==self.tuner1_1testIndex or index==self.tuner1_2testIndex:
+ tunno = 1
+ result = eSctest.getInstance().getFrontendstatus(0)
+ else:
+ tunno = 2
+ result = eSctest.getInstance().getFrontendstatus(1)
+
+ if self.agingmode == 1:
+ tunno = 1
+ result = eSctest.getInstance().getFrontendstatus(0)
+ hv = "Ver"
+ if self.model == 2 and index==self.tuner2_2testIndex:
+ hv = ""
+ elif index == self.tuner1_2testIndex or index==self.tuner2_2testIndex:
+ hv = "Ver"
+ else:
+ hv = "Hor"
+
+ 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)
+ if self.agingmode==0:
+ self.rlist[self["testlist"].getCurrent()[1]]="fail"
+ self.agingmode = 0
+ else :
+ self.tunerlock = 1
+ if self.agingmode==1:
+ self.session.openWithCallback(self.checkaging,AgingTest)
+
+ 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:
+ 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):
+#
+# tlist.append((" 0. Sata & extend hdd test",self.satetestIndex=0))
+# tlist.append((" 1. USB test",self.usbtestIndex=1))
+# tlist.append((" 2. Front test",self.fronttestIndex=2))
+# tlist.append((" 3. Smartcard test",self.smarttestIndex=3))
+# tlist.append((" 4. T1 H 22K x 4:3 CVBS",self.tuner1_1testIndex=4))
+# tlist.append((" 5. T1 V 22k o 16:9 RGB",self.tuner1_2testIndex=5))
+# tlist.append((" 6. T2 H 22k x 4:3 YC",self.tuner2_1testIndex=6))
+# tlist.append((" 7. T2 V 22k o 16:9 CVBS CAM",self.tuner2_2testIndex=7))
+# tlist.append((" 8. VCR Scart loop",self.scarttestIndex=8))
+# tlist.append((" 9. RS232 test",self.rs232testIndex=9))
+# tlist.append(("10. Ethernet & mac test",self.ethernettestIndex=10))
+# tlist.append(("11. DRAM test",11))
+# tlist.append(("12. Flash test",12))
+# tlist.append(("13. DRAM+Flash test",13))
+# tlist.append(("11. Factory default",self.fdefaultIndex=11))
+# tlist.append(("12. Shutdown",self.shutdownIndex=12))
+#
+ if self.testing==1:
+ return
+ print "line - ",self["testlist"].getCurrent()[1]
+ index = self["testlist"].getCurrent()[1]
+ result = 0
+ if index==self.satetestIndex:
+ self.Test0()
+ elif index==self.fronttestIndex:
+ self.Test1()
+ elif index>=self.tuner1_1testIndex and index<=self.tuner2_2testIndex:
+ 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("/media/hdd"):
+ if access("/media/hdd",F_OK|R_OK|W_OK):
+ dummy=open("/media/hdd/dummy03","w")
+ dummy.write("complete")
+ dummy.close()
+ dummy=open("/media/hdd/dummy03","r")
+ if dummy.readline()=="complete":
+ print "/media/hdd - complete"
+ else:
+ print "/media/hdd - readline error"
+ result += 1
+ displayerror = 1
+ dummy.close()
+ system("rm /media/hdd/dummy03")
+ else:
+ print "/media/hdd - rw access error"
+ result += 1
+ displayerror = 1
+ else:
+ print "/media/hdd - file not exist"
+ result += 1
+ except:
+ print "/media/hdd - exceptional error"
+ result += 1
+ displayerror = 1
+
+ if result == 0:
+ self.session.open( MessageBox, _("Sata & extend hdd test pass"), MessageBox.TYPE_INFO)
+ self.rlist[self["testlist"].getCurrent()[1]]="pass"
+ elif result == 1:
+ if displayerror==1:
+ self.session.open( MessageBox, _("One hdd test error"), 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"), 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:
+ self.session.openWithCallback(self.displayresult ,FrontTest_solo)
+
+ def displayresult(self):
+ global fronttest
+ if fronttest == 1:
+ self.rlist[self["testlist"].getCurrent()[1]]="pass"
+ else:
+ self.rlist[self["testlist"].getCurrent()[1]]="fail"
+
+ INTERNAL_PID_STATUS_NOOP = 0
+ INTERNAL_PID_STATUS_WAITING = 1
+ INTERNAL_PID_STATUS_SUCCESSFUL = 2
+ INTERNAL_PID_STATUS_FAILED = 3
+
+ 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()
+ print "servicelist none"
+ else:
+ ref = self.oldref
+ self.session.nav.stopService() # try to disable foreground service
+ 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)
+# 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)
+ self.avswitch.setColorFormat(1)
+ self.avswitch.setAspectRatio(6)
+ elif index==self.tuner2_1testIndex:
+# self.camstep = 1
+# self.camtimer.start(100,True)
+ 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,0x83)
+# ref.setData(2,0x6)
+# ref.setData(3,0x85)
+# ref.setData(4,0xC00000)
+# ikseong - for 22000 tp ( /home/ikseong/share/lamedb_ORF)
+ if self.model==0:
+ 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)
+ elif self.model==2:
+ ref.setData(0,0x19)
+ ref.setData(1,0x1325)
+ ref.setData(2,0x3ef)
+ ref.setData(3,0x1)
+ ref.setData(4,0xfff029a)
+ self.session.nav.playService(ref)
+ self.avswitch.setColorFormat(2)
+ self.avswitch.setAspectRatio(0)
+ if self.model==0 or self.model==1:
+ print "2-3"
+ self.tuningtimer.start(2000,True)
+ self.tunemsgtimer.start(3000, True)
+ elif self.model==2:
+ print "4-5"
+ self.tuningtimer.start(4000,True)
+ self.tunemsgtimer.start(5000, True)
+
+ def cam_state(self):
+ 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[self["testlist"].getCurrent()[1]]="fail"
+ self.tunemsgtimer.stop()
+# self.rlist[index]="fail"
+# self["resultlist"].updateList(self.rlist)
+ 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[self["testlist"].getCurrent()[1]]="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[self["testlist"].getCurrent()[1]]="fail"
+ self.tunemsgtimer.stop()
+# self.rlist[index]="fail"
+# self["resultlist"].updateList(self.rlist)
+ 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[self["testlist"].getCurrent()[1]]="fail"
+ self.tunemsgtimer.stop()
+ else:
+ self.setSource()
+ self.camstep = 5
+# self.session.open( MessageBox, _("CAM OK!"), MessageBox.TYPE_INFO,2)
+
+# ikseong - for 22000 tp
+ def setSource(self):
+ filename = ("/proc/stb/tsmux/ci0_input")
+ fd = open(filename,'w')
+ fd.write('B')
+# fd.write('A')
+ fd.close()
+# filename = ("/proc/stb/tsmux/ci1_input")
+# fd = open(filename,'w')
+# fd.write('CI0')
+# fd.close()
+ fd=open("/proc/stb/tsmux/input1","w")
+# fd=open("/proc/stb/tsmux/input0","w")
+ fd.write("CI0")
+ fd.close()
+ print "CI loop test!!!!!!!!!!!!!!"
+
+ def resetSource(self):
+ fd=open("/proc/stb/tsmux/input1","w")
+ fd.write("B")
+ fd.close()
+ print "CI loop test end!!!!!!!!!!!!!!"
+
+ def tunemsg(self):
+ self.tuningtimer.stop()
+ self.session.openWithCallback(self.tuneback, MessageBox, _("%s ok?" %(self["testlist"].getCurrent()[0])), MessageBox.TYPE_YESNO)
+
+ def tuneback(self,yesno):
+ self.session.nav.stopService() # try to disable foreground service
+ if yesno:
+ self.rlist[self["testlist"].getCurrent()[1]]="pass"
+ if self.tunerlock == 0:
+ self.rlist[self["testlist"].getCurrent()[1]]="fail"
+ elif self["testlist"].getCurrent()[1] == self.cam_index and self.camstep < 5:
+ self.rlist[self["testlist"].getCurrent()[1]]="fail"
+ else:
+ self.rlist[self["testlist"].getCurrent()[1]]="fail"
+ if self["testlist"].getCurrent()[1] == 6: # YC
+ self.avswitch.setColorFormat(0)
+ self.resetSource()
+ self["resultlist"].updateList(self.rlist)
+
+ 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
+ ref.setData(0,0x19)
+ ref.setData(1,0x1325)
+ ref.setData(2,0x3ef)
+ ref.setData(3,0x1)
+ ref.setData(4,0x64af79)
+# 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)
+ self.tuningtimer.start(2000,True)
+ self.agingmode = 1
+
+ def checkaging(self):
+ global Agingresult
+ if(Agingresult ==1):
+ self["testlist"].moveToIndex(self.fdefaultIndex)
+ self.Test14()
+ self["testlist"].moveToIndex(self.shutdownIndex)
+ self.agingmode = 0
+# self["testlist"].instance.moveSelection(self["testlist"].instance.moveDown)
+
+ 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:
+ 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" ]
+
+ 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!"%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!"%(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.open( MessageBox, _("Ping test pass"), MessageBox.TYPE_INFO,2)
+ 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"
+# self.rlist[self["testlist"].getCurrent()[1]]="pass"
+ else:
+ self.rlist[self.ethernettestIndex]="fail"
+# self.rlist[self["testlist"].getCurrent()[1]]="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:
+ system("rm -R /etc/enigma2")
+ system("cp -R /usr/share/enigma2/defaults /etc/enigma2")
+ self.rlist[self["testlist"].getCurrent()[1]]="pass"
+ self["resultlist"].updateList(self.rlist)
+ 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.result = 0
+ 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"
+ if info == "solo":
+ self.model = 1
+ getmodel = 1
+ print "MacConfig, model : solo"
+ if info == "duo":
+ self.model = 0
+ getmodel = 1
+ print "MacConfig, model : duo"
+ 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:
+ 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:
+ 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:
+ 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()
+
+
+sccitest = 0
+
+class ScCiTest(Screen):
+ skin = """
+ <screen position="120,225" size="440,200" title="CI Smartcard Test" >
+ <widget name="testlist" position="10,0" size="340,120" />
+ <widget name="resultlist" position="370,0" size="60,120" />
+ <eLabel text=" " position="5,125" zPosition="-1" size="430,5" backgroundColor="#02e1e8e6" />
+ <widget name="text" position="10,140" size="420,50" font="Regular;25" />
+ </screen>"""
+ step=1
+ def __init__(self, session):
+ self["actions"] = ActionMap(["DirectionActions","OkCancelActions"],
+ {
+ "ok": self.keyOk,
+ "up": self.up,
+ "down":self.down,
+ "cancel": self.keyCancel,
+ }, -2)
+
+ Screen.__init__(self, session)
+ tlist = []
+ tlist.append(("Smartcard 1 Test",0))
+ tlist.append(("Smartcard 2 Test",1))
+ tlist.append(("CI 1 Test",2))
+ tlist.append(("CI 2 Test",3))
+ self["testlist"] = MenuList(tlist)
+ self.rlist = []
+ for x in range(4):
+ self.rlist.append((".."))
+ self["resultlist"] = TestResultList(self.rlist)
+ self.result = 0
+ self.removecard = eTimer()
+ self.removecard.callback.append(self.remove_card)
+ self["text"]=Label(("Press OK Key"))
+ self.camstate= eTimer()
+ self.camstate.callback.append(self.cam_state)
+ self.camtry = 5
+ self.camstep = 0
+
+ def keyCancel(self):
+ global sccitest
+ print "result ", self.result
+ if self.result==15:
+ sccitest=1
+ self.resetSource()
+ self.close()
+
+ def up(self):
+ self["text"].setText(_("Press OK Key"))
+ self["testlist"].instance.moveSelection(self["testlist"].instance.moveUp)
+
+ def down(self):
+ self["text"].setText(_("Press OK Key"))
+ self["testlist"].instance.moveSelection(self["testlist"].instance.moveDown)
+
+ def keyOk(self):
+ print "line - ",self["testlist"].getCurrent()[1]
+ index = self["testlist"].getCurrent()[1]
+ result = 0
+ if index==0 or index==1:
+ self["text"].setText(_("Insert Card?"))
+ self.ScTest(True)
+ elif index ==2 or index==3:
+ self["text"].setText(_("Insert Cam"))
+ self.CamTest()
+
+ def CamTest(self):
+ self.camtry = 10
+ self.camstep = 1
+ self.camstate.start(1000,True)
+
+ def setSource(self, cislot):
+ filename = ("/proc/stb/tsmux/ci%d_input"%cislot)
+ fd = open(filename,'w')
+ fd.write('A')
+ fd.close()
+
+ def setInputSource(self, cislot):
+ fd=open("/proc/stb/tsmux/input0","w")
+ if cislot==0:
+ fd.write("CI0")
+ else:
+ fd.write("CI1")
+ fd.close()
+
+ def resetSource(self):
+ fd=open("/proc/stb/tsmux/input0","w")
+ fd.write("A")
+ fd.close()
+# fd = open("/proc/stb/tsmux/ci0_input","w")
+# fd.write("CI0")
+# fd.close()
+# fd = open("/proc/stb/tsmux/ci1_input","w")
+# fd.write("CI1")
+# fd.close()
+
+ def channelstart(self):
+ ref = eServiceReference("1:0:19:1324:3EF:1:C00000:0:0:0")
+ 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 channelstop(self):
+ self.session.nav.stopService() # try to disable foreground service
+
+ def cam_state(self):
+ index = self["testlist"].getCurrent()[1]
+ if (index-2)==0:
+ slot = 1
+ else:
+ slot = 0
+ print 'cam_state', self.camstep,self.camtry
+ if self.camstep == 1:
+ state = eDVBCI_UI.getInstance().getState(slot)
+ print 'stat',state
+ if state == 1:
+ self.camstep=2
+ self.camtry=10
+ self["text"].setText(_("Getting Cam name...."))
+ self.camstate.start(5000,True)
+ else:
+ self.camtry-=1
+ if self.camtry>0:
+ self.camstate.start(1000,True)
+ else:
+ self.session.open( MessageBox, _("NO_NOT_INSERTED"), MessageBox.TYPE_ERROR)
+ self.rlist[index]="fail"
+ self["resultlist"].updateList(self.rlist)
+
+ elif self.camstep == 2:
+ appname = eDVBCI_UI.getInstance().getAppName(slot)
+ print 'appname',appname
+ if appname is None:
+ self.camtry-=1
+ if self.camtry>0:
+ self.camstate.start(1000,True)
+ else:
+ self.session.open( MessageBox, _("NO_GET_APPNAME"), MessageBox.TYPE_ERROR)
+ self.rlist[index]="fail"
+ self["resultlist"].updateList(self.rlist)
+ else:
+ self["text"].setText(_("Get Cam name : %s"%appname+". \n Remove Cam!"))
+ self.channelstart()
+ self.setInputSource(slot)
+ self.setSource(slot)
+ self.camstep=3
+ self.camtry=30
+ self.camstate.start(1000,True)
+ elif self.camstep==3:
+ state = eDVBCI_UI.getInstance().getState(slot)
+ print 'stat', state
+ if state == 0:
+ self.channelstop()
+ self.result += (1<<index)
+ print self.result
+ self.rlist[index]="pass"
+ self["text"].setText(_("Press OK Key"))
+ self["resultlist"].updateList(self.rlist)
+ if index==2:
+ self.down()
+ elif index == 3:
+ self.keyCancel()
+ else:
+ self.camtry-=1
+ if self.camtry>0:
+ self.camstate.start(1000,True)
+ else:
+ self.channelstop()
+ self.session.open( MessageBox, _("NO_REMOVE_CAM"), MessageBox.TYPE_ERROR)
+ self.rlist[index]="fail"
+ self["resultlist"].updateList(self.rlist)
+
+ def check_smart_card(self,which):
+ index = which
+ result = 0
+ if which==0:
+ result = eSctest.getInstance().check_smart_card("/dev/sci0")
+ elif which ==1:
+ result = eSctest.getInstance().check_smart_card("/dev/sci1")
+ else:
+ result = -1
+
+ print result
+
+ if result == 0:
+ print 'pass'
+ else:
+ if result ==-1:
+ self.session.open( MessageBox, _("1:NO_DEV_FOUND"), MessageBox.TYPE_ERROR)
+ elif result == -2:
+ self.session.open( MessageBox, _("1:SC_NOT_INSERTED"), MessageBox.TYPE_ERROR)
+ elif result == -3:
+ self.session.open( MessageBox, _("1:SC_NOT_VALID_ATR"), MessageBox.TYPE_ERROR)
+ elif result == -5:
+ self.session.open( MessageBox, _("1:SC_READ_TIMEOUT"), MessageBox.TYPE_ERROR)
+ self.rlist[which]="fail"
+ self["resultlist"].updateList(self.rlist)
+ return result
+
+ def remove_card(self):
+ index = self["testlist"].getCurrent()[1]
+ if index==0:
+ result = eSctest.getInstance().eject_smart_card("/dev/sci0")
+ elif index==1:
+ result = eSctest.getInstance().eject_smart_card("/dev/sci1")
+ print 'remove result' ,result
+ if result == 0:
+ self.rlist[index]="pass"
+ self.result += (1<<index)
+ else:
+ if result ==-1:
+ self.session.open( MessageBox, _("2:NO_DEV_FOUND"), MessageBox.TYPE_ERROR)
+ elif result == -2:
+ self.session.open( MessageBox, _("2:SC_NOT_INSERTED"), MessageBox.TYPE_ERROR)
+ elif result == -3:
+ self.session.open( MessageBox, _("2:SC_NOT_VALID_ATR"), MessageBox.TYPE_ERROR)
+ elif result == -4:
+ self.session.open( MessageBox, _("2:SC_NOT_REMOVED"), MessageBox.TYPE_ERROR)
+ self.rlist[index]="fail"
+ self["resultlist"].updateList(self.rlist)
+ self["text"].setText(_("Press OK Key"))
+ self.down()
+ return result
+
+
+ def ScTest(self, yesno):
+ if yesno==False:
+ return
+ index = self["testlist"].getCurrent()[1]
+ result = self.check_smart_card(index)
+ if result==0:
+ self.removecard.start(100,True)
+ self["text"].setText(_("Read Ok. Remove Card!"))
+ else:
+ return
+
+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.keyCancel
+ }, -2)
+
+ Screen.__init__(self, session)
+# self["text"]=Label(("Press Key LEFT"))
+ self["text"]=Label(("Testing Smartcard 1..."))
+ self.step = 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) ):
+ 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.session.open( MessageBox, _("Smart Card OK!!"), MessageBox.TYPE_INFO,2)
+ self.step = 1
+ self["text"].setText(_("Smart Card OK!!"))
+ self.closetimer.start(2000,True)
+ self.smartcardtimer.stop()
+# self.session.openWithCallback(self.check6, MessageBox, _("Scart loop ok?"), MessageBox.TYPE_INFO)
+ 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()
+
+
+
+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"))
+# else:
+# print ""
+
+ 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
+ self.fronttimer.stop()
+ eSctest.getInstance().VFD_Close()
+ if self.step == 6:
+ 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)
+
+
+
+
+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":
+# if input == "m":
+ rstest = 1
+ else:
+ rstest = 0
+ else:
+ rstest = 0
+ except:
+ print 'error'
+ rstest = 0
+ 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(["WizardActions","GlobalActions"],
+ {
+ "agingend": self.keyEnd,
+ "agingfinish": 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(2000,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)
--- /dev/null
+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
+/
+0fff029a:03ef:0001
+ c 666000:6900000:2:4:0:0
+/
+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:0fff029a:03ef:0001:25:0
+ASTRA HD+
+p:BetaDigital,f:40
+end
+Have a lot of bugs!
--- /dev/null
+installdir = $(pkglibdir)/python/Plugins/SystemPlugins/Fancontrol
+
+SUBDIRS = meta
+
+install_PYTHON = \
+ __init__.py \
+ plugin.py
--- /dev/null
+installdir = $(datadir)/meta
+
+dist_install_DATA = plugin_fancontrol.xml
--- /dev/null
+<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>
--- /dev/null
+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 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 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)]
SkinSelector SatelliteEquipmentControl Videomode VideoTune Hotplug \
DefaultServicesScanner NFIFlash DiseqcTester CommonInterfaceAssignment \
CrashlogAutoSubmit CleanupWizard VideoEnhancement WirelessLan NetworkWizard \
- TempFanControl
+ TempFanControl FactoryTest Fancontrol
install_PYTHON = \
__init__.py
def go(self):
if self.update:
- self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
+ self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your STB?\nAfter pressing OK, please wait!"))
else:
self.close()
def go(self):
if self.update:
- self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your Dreambox?\nAfter pressing OK, please wait!"))
+ self.session.openWithCallback(self.doUpdate, MessageBox, _("Do you want to update your STB?\nAfter pressing OK, please wait!"))
else:
self.close()
<packagename>enigma2-plugin-systemplugins-skinselector</packagename>
<shortdescription>SkinSelector shows a menu with selectable skins</shortdescription>
<description>The SkinSelector shows a menu with selectable skins.\n
- It's now easy to change the look and feel of your Dreambox.
+ It's now easy to change the look and feel of your STB.
</description>
<screenshot src="http://www.dreamboxupdate.com/preview/plugin_skinselector_en.jpg" />
</info>
def getUpdates(self, callback = None):
if self.lastDownloadDate is None:
- if self.hardware_info.device_name != "dm7025":
+ if self.hardware_info.device_name != "dm500hd":
etpm = eTPM()
l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
if l2cert is None:
return
val = etpm.challenge(rnd)
result = decrypt_block(val, l3key)
- if self.hardware_info.device_name == "dm7025" or result[80:88] == rnd:
+ if self.hardware_info.device_name == "dm500hd" or result[80:88] == rnd:
if self.NetworkConnectionAvailable == True:
self.lastDownloadDate = time()
if self.list_updating is False and callback is None:
self.NotifierCallback = callback
else:
if self.list_updating and callback is not None:
- if self.hardware_info.device_name != "dm7025":
+ if self.hardware_info.device_name != "dm500hd":
etpm = eTPM()
l2cert = etpm.getCert(eTPM.TPMD_DT_LEVEL2_CERT)
if l2cert is None:
return
val = etpm.challenge(rnd)
result = decrypt_block(val, l3key)
- if self.hardware_info.device_name == "dm7025" or result[80:88] == rnd:
+ if self.hardware_info.device_name == "dm500hd" or result[80:88] == rnd:
self.NotifierCallback = callback
self.startIpkgListAvailable()
else:
<text value="Do you want to restore your settings?" />
<list>
<listentry caption="Yes, restore the settings now" step="restore" />
- <listentry caption="No, just start my dreambox" step="end" />
+ <listentry caption="No, just start my STB" step="end" />
</list>
<code>
self.clearSelectedKeys()
</step>
<step id="welcome">
- <text value="Welcome to the Image upgrade wizard. The wizard will assist you in upgrading the firmware of your Dreambox by providing a backup facility for your current settings and a short explanation of how to upgrade your firmware." />
+ <text value="Welcome to the Image upgrade wizard. The wizard will assist you in upgrading the firmware of your STB by providing a backup facility for your current settings and a short explanation of how to upgrade your firmware." />
<list>
<listentry caption="OK, guide me through the upgrade process" step="backupquestion" />
<listentry caption="Exit the wizard" step="end" />
</step>
<step id="upgrade">
- <text value="You need a PC connected to your dreambox. If you need further instructions, please visit the website http://www.dm7025.de.\nYour dreambox will now be halted. After you have performed the update instructions from the website, your new firmware will ask you to restore your settings." />
+ <text value="You need a PC connected to your STB. If you need further instructions, please visit the website http://www.dm7025.de.\nYour STB will now be halted. After you have performed the update instructions from the website, your new firmware will ask you to restore your settings." />
<list>
<listentry caption="Yes, perform a shutdown now." step="shutdown" />
<listentry caption="No, do nothing." step="end" />
from enigma import quitMainloop
quitMainloop(1)
</code>
- <text value="Your dreambox is shutting down. Please stand by..." />
+ <text value="Your STB is shutting down. Please stand by..." />
</step>
<step id="end" laststep="true">
self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value )
if self.menu == 0:
print "building menu entries"
- self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your Dreambox" ) + self.oktext, None))
- self.list.append(("software-update", _("Software update"), _("\nOnline update of your Dreambox software." ) + self.oktext, None))
- self.list.append(("software-restore", _("Software restore"), _("\nRestore your Dreambox with a new firmware." ) + self.oktext, None))
- self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your Dreambox settings." ) + self.oktext + "\n\n" + self.infotext, None))
- self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your Dreambox settings." ) + self.oktext, None))
+ self.list.append(("install-extensions", _("Manage extensions"), _("\nManage extensions or plugins for your STB" ) + self.oktext, None))
+ self.list.append(("software-update", _("Software update"), _("\nOnline update of your STB software." ) + self.oktext, None))
+ self.list.append(("software-restore", _("Software restore"), _("\nRestore your STB with a new firmware." ) + self.oktext, None))
+ self.list.append(("system-backup", _("Backup system settings"), _("\nBackup your STB settings." ) + self.oktext + "\n\n" + self.infotext, None))
+ self.list.append(("system-restore",_("Restore system settings"), _("\nRestore your STB settings." ) + self.oktext, None))
self.list.append(("ipkg-install", _("Install local extension"), _("\nScan for local extensions and install them." ) + self.oktext, None))
for p in plugins.getPlugins(PluginDescriptor.WHERE_SOFTWAREMANAGER):
if p.__call__.has_key("SoftwareSupported"):
currentEntry = current[0]
if self.menu == 0:
if (currentEntry == "software-update"):
- self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your Dreambox?")+"\n"+_("\nAfter pressing OK, please wait!"))
+ self.session.openWithCallback(self.runUpgrade, MessageBox, _("Do you want to update your STB?")+"\n"+_("\nAfter pressing OK, please wait!"))
elif (currentEntry == "software-restore"):
self.session.open(ImageWizard)
elif (currentEntry == "install-extensions"):
self.reloadPluginlist()
restartRequired = plugins.restartRequired
if restartRequired:
- self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ self.session.openWithCallback(self.ExecuteReboot, MessageBox, _("Install or remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
else:
self.selectedFiles = []
self.detailsClosed(True)
elif cmd == 2:
info = args['package']
else:
- info = _("Dreambox software because updates are available.")
+ info = _("STB software because updates are available.")
self.list.append(self.buildEntryComponent(action,info))
self['list'].setList(self.list)
self.reloadPluginlist()
restartRequired = plugins.restartRequired
if restartRequired:
- self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Installation finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
else:
self.close(True)
def UpgradeReboot(self, result):
self.updating = True
self.activityTimer.start(100, False)
self.package.setText(_("Package list update"))
- self.status.setText(_("Upgrading Dreambox... Please wait"))
+ self.status.setText(_("Upgrading STB... Please wait"))
self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
else:
self.package.setText(_("Your network is not working. Please try again."))
else:
self.activityTimer.stop()
self.activityslider.setValue(0)
- error = _("your dreambox might be unusable now. Please consult the manual for further assistance before rebooting your dreambox.")
+ error = _("your STB might be unusable now. Please consult the manual for further assistance before rebooting your STB.")
if self.packages == 0:
error = _("No packages were upgraded yet. So you can check your network and try again.")
if self.updating:
- error = _("Your dreambox isn't connected to the internet properly. Please check it and try again.")
+ error = _("Your STB isn't connected to the internet properly. Please check it and try again.")
self.status.setText(_("Error") + " - " + error)
#print event, "-", param
pass
def exit(self):
if not self.ipkg.isRunning():
if self.packages != 0 and self.error == 0:
- self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"))
+ self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"))
else:
self.close()
else:
self.session.openWithCallback(self.runRemoveFinished, Ipkg, cmdList = self.cmdList)
def runRemoveFinished(self):
- self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ self.session.openWithCallback(self.RemoveReboot, MessageBox, _("Remove finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
def RemoveReboot(self, result):
if result is None:
self.session.openWithCallback(self.runUpgradeFinished, Ipkg, cmdList = self.cmdList)
def runUpgradeFinished(self):
- self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"), MessageBox.TYPE_YESNO)
+ self.session.openWithCallback(self.UpgradeReboot, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your STB?"), MessageBox.TYPE_YESNO)
def UpgradeReboot(self, result):
if result is None:
self.list.append(getConfigListEntry(_("Auto scart switching"), config.av.vcrswitch))
if level >= 1:
- self.list.append(getConfigListEntry(_("AC3 default"), config.av.defaultac3))
+ self.list.append(getConfigListEntry(_("Dolby Digital default"), config.av.defaultac3))
if SystemInfo["CanDownmixAC3"]:
- self.list.append(getConfigListEntry(_("AC3 downmix"), config.av.downmix_ac3))
+ self.list.append(getConfigListEntry(_("Dolby Digital downmix"), config.av.downmix_ac3))
self.list.extend((
- getConfigListEntry(_("General AC3 Delay"), config.av.generalAC3delay),
+ getConfigListEntry(_("General Dolby Digital Delay"), config.av.generalAC3delay),
getConfigListEntry(_("General PCM Delay"), config.av.generalPCMdelay)
))
if SystemInfo["CanDownmixAC3"]:
self.settings.downmix = ConfigOnOff(default=config.av.downmix_ac3.value)
self.settings.downmix.addNotifier(self.changeAC3Downmix, initial_call = False)
- conflist.append(getConfigListEntry(_("AC3 downmix"), self.settings.downmix))
+ conflist.append(getConfigListEntry(_("Dolby Digital downmix"), self.settings.downmix))
self["key_red"].setBoolean(True)
if n > 0:
def statusCallback(self, status, progress):
print "statusCallback:", status, progress
if status == DreamInfoHandler.STATUS_DONE:
- self["text"].setText(_("The installation of the default settings is finished. You can now continue configuring your Dreambox by pressing the OK button on the remote control."))
+ self["text"].setText(_("The installation of the default settings is finished. You can now continue configuring your STB by pressing the OK button on the remote control."))
self.markDone()
self.disableKeys = False
ScanPath(path = "dmpkg", with_subdirs = True),
ScanPath(path = "", with_subdirs = False),
],
- name = "Dream-Package",
+ name = "STB-Package",
description = _("Install settings, skins, software..."),
openfnc = filescan_open, )
print "add dreampackage scanner plugin"
-plugins.addPlugin(PluginDescriptor(name="Dream-Package", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan, internal = True))
+plugins.addPlugin(PluginDescriptor(name="STB-Package", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan, internal = True))
print "added"
wizardManager.registerWizard(DefaultWizard, config.misc.defaultchosen.value, priority = 6)
"showMovies": (self.showMovies, _("Play recorded movies...")),
"showRadio": (self.showRadio, _("Show the radio player...")),
"showTv": (self.showTv, _("Show the tv player...")),
+ # ikseong action for subtitle hotkey
+ "showSubtitle":(self.showSubtitle, _("Show the Subtitle...")),
}, prio=2)
self.allowPiP = True
if service is not None:
self.session.open(MoviePlayer, service)
+ # ikseong action for subtitle hotkey
+ def showSubtitle(self):
+ from Screens.Subtitles import Subtitles
+ self.session.open(Subtitles)
+
class MoviePlayer(InfoBarBase, InfoBarShowHide, \
InfoBarMenu, \
InfoBarSeek, InfoBarShowMovies, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications,
self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
{
+ # ikseong action for subtitle hotkey
+ "showSubtitle":(self.showSubtitle, _("Show the Subtitle...")),
"leavePlayer": (self.leavePlayer, _("leave movie player..."))
})
self.returning = False
elif self.returning:
self.close()
+
+ # ikseong action for subtitle hotkey
+ def showSubtitle(self):
+ from Screens.Subtitles import Subtitles
+ self.session.open(Subtitles)
dir = preferredInstantRecordPath()
if not dir or not fileExists(dir, 'w'):
dir = defaultMoviePath()
+# ikseong
+ if not fileExists("/hdd", 0):
+ print "not found /hdd"
+ system("ln -s /media/hdd /hdd")
+#
try:
stat = os_stat(dir)
except:
from Screen import Screen
-from Components.ActionMap import ActionMap
+# ikseong
+from Components.ActionMap import ActionMap,NumberActionMap
from Components.Language import language
from Components.config import config
from Components.Sources.List import List
png = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "countries/missing.png"))
res = (index, name, png)
return res
+# ikseong
+from Plugins.SystemPlugins.FactoryTest.plugin import FactoryTest
class LanguageSelection(Screen):
def __init__(self, session):
self.updateList()
self.onLayoutFinish.append(self.selectActiveLanguage)
-
- self["actions"] = ActionMap(["OkCancelActions"],
+# ikseong
+ self["actions"] = NumberActionMap(["OkCancelActions","NumberActions"],
{
"ok": self.save,
"cancel": self.cancel,
+ "1": self.keyNumberGlobal,
+ "2": self.keyNumberGlobal,
+ "3": self.keyNumberGlobal,
+ "4": self.keyNumberGlobal,
+ "5": self.keyNumberGlobal,
+ "6": self.keyNumberGlobal,
+ "7": self.keyNumberGlobal,
+ "8": self.keyNumberGlobal,
+ "9": self.keyNumberGlobal,
+ "0": self.keyNumberGlobal,
}, -1)
+ self.testkey=0
+
+# ikseong
+ def keyNumberGlobal(self, number):
+ self.testkey = self.testkey * 10 + number
+ if self.testkey > 10000:
+ self.testkey = self.testkey%10000
+ if self.testkey == 4599:
+ self.session.open(FactoryTest)
+ print "testkey", self.testkey
def selectActiveLanguage(self):
activeLanguage = language.getActiveLanguage()
Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py \
EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \
InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \
- Dish.py LanguageSelection.py StartWizard.py PiPSetup.py \
+ Dish.py LanguageSelection.py StartWizard.py PiPSetup.py Subtitles.py \
TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py PVRState.py \
Console.py InputBox.py ChoiceBox.py SimpleSummary.py \
TimerSelection.py PictureInPicture.py TimeDateInput.py \
self["statuspic"].hide()
self.oktext = _("Press OK on your remote control to continue.")
- self.reboottext = _("Your Dreambox will restart after pressing OK on your remote control.")
+ self.reboottext = _("Your STB will restart after pressing OK on your remote control.")
self.errortext = _("No working wireless network interface found.\n Please verify that you have attached a compatible WLAN device or enable your local network interface.")
self["WizardActions"] = HelpableActionMap(self, "WizardActions",
def loadDescription(self):
if self["menulist"].getCurrent()[1] == 'edit':
- self["description"].setText(_("Edit the network configuration of your Dreambox.\n" ) + self.oktext )
+ self["description"].setText(_("Edit the network configuration of your STB.\n" ) + self.oktext )
if self["menulist"].getCurrent()[1] == 'test':
- self["description"].setText(_("Test the network configuration of your Dreambox.\n" ) + self.oktext )
+ self["description"].setText(_("Test the network configuration of your STB.\n" ) + self.oktext )
if self["menulist"].getCurrent()[1] == 'dns':
- self["description"].setText(_("Edit the Nameserver configuration of your Dreambox.\n" ) + self.oktext )
+ self["description"].setText(_("Edit the Nameserver configuration of your STB.\n" ) + self.oktext )
if self["menulist"].getCurrent()[1] == 'scanwlan':
self["description"].setText(_("Scan your network for wireless access points and connect to them using your selected wireless device.\n" ) + self.oktext )
if self["menulist"].getCurrent()[1] == 'wlanstatus':
self.remainingdata = ""
for x in lines:
- plugin = x.split(" - ", 2)
- if len(plugin) == 3:
+ plugin = x.split(" - ")
+ if len(plugin) >= 2:
if self.run == 1 and self.type == self.DOWNLOAD:
if plugin[0] not in self.installedplugins:
self.installedplugins.append(plugin[0])
self.plugins = {}
for x in self.pluginlist:
+ if len(x) < 4:
+ split = x[0].split('-',3)
+ if not self.plugins.has_key(split[2]):
+ self.plugins[split[2]] = []
+ self.plugins[split[2]].append((PluginDescriptor(name = x[2], description = " ", icon = verticallineIcon), split[3]))
+ continue
+
split = x[3].split('-', 1)
if len(split) < 2:
continue
def createSummary(self):
print "ServiceScanCreateSummary"
- return ServiceScanSummary
\ No newline at end of file
+ return ServiceScanSummary
self.status = True
self.updateColors()
- self["pretext"] = Label(_("Shutdown Dreambox after"))
+ self["pretext"] = Label(_("Shutdown STB after"))
self["aftertext"] = Label(_("minutes"))
self["actions"] = NumberActionMap(["SleepTimerEditorActions", "TextEntryActions", "KeyboardInputActions"],
def select(self):
if self.status:
- time = int(self["input"].getText())
- config.SleepTimer.defaulttime.setValue(time)
- config.SleepTimer.defaulttime.save()
- config.SleepTimer.action.save()
- config.SleepTimer.ask.save()
- self.session.nav.SleepTimer.setSleepTime(time)
- self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been activated."), MessageBox.TYPE_INFO)
+# ikseong
+ if self["input"].getText()=='':
+ self.session.nav.SleepTimer.clear()
+ self.session.openWithCallback(self.close, MessageBox, _("The sleep timer is invalid."), MessageBox.TYPE_INFO)
+ else:
+ time = int(self["input"].getText())
+ config.SleepTimer.defaulttime.setValue(time)
+ config.SleepTimer.defaulttime.save()
+ config.SleepTimer.action.save()
+ config.SleepTimer.ask.save()
+ self.session.nav.SleepTimer.setSleepTime(time)
+ self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been activated."), MessageBox.TYPE_INFO)
else:
self.session.nav.SleepTimer.clear()
self.session.openWithCallback(self.close, MessageBox, _("The sleep timer has been disabled."), MessageBox.TYPE_INFO)
def keyNumberGlobal(self, number):
- self["input"].number(number)
+# ikseong
+ if self["input"].getText() == '' :
+ inputtime=0
+ else:
+ inputtime= int(self["input"].getText())*10 +number
+ if inputtime < 10000 :
+ self["input"].number(number)
def selectLeft(self):
self["input"].left()
--- /dev/null
+from Screen import Screen
+from Components.ServiceEventTracker import ServiceEventTracker
+from Components.ActionMap import ActionMap
+from Components.ConfigList import ConfigListScreen
+from Components.config import config, getConfigListEntry, ConfigNothing
+from enigma import iPlayableService
+
+from Tools.ISO639 import LanguageCodes
+
+# ikseong for subtitle hotkey
+from Screens.InfoBar import InfoBar
+
+class Subtitles(Screen, ConfigListScreen):
+ def __init__(self, session, infobar=None):
+ Screen.__init__(self, session)
+
+ self["actions"] = ActionMap(["SetupActions"],
+ {
+ "ok": self.ok,
+ "cancel": self.cancel,
+ }, -2)
+
+ self.list = []
+ ConfigListScreen.__init__(self, self.list)
+# ikseong for subtitle hotkey
+ if self.session.infobar is None:
+ if InfoBar.instance:
+ self.infobar = InfoBar.instance
+ else:
+ self.infobar = self.session.infobar
+#
+ self.fillList()
+
+ self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+ {
+ iPlayableService.evUpdatedInfo: self.__updatedInfo
+ })
+ self.cached_subtitle_checked = False
+ self.__selected_subtitle = None
+
+ def fillList(self):
+ list = self.list
+ del list[:]
+ print "self.list", list
+ if self.subtitlesEnabled():
+ list.append(getConfigListEntry(_("Disable Subtitles"), ConfigNothing(), None))
+ sel = self.infobar.selected_subtitle
+ else:
+ sel = None
+ for x in self.getSubtitleList():
+ if sel and sel[:4] == x[:4]: #ignore Language code in compare
+ text = _("Running")
+ else:
+ text = _("Enable")
+ if x[0] == 0:
+ if LanguageCodes.has_key(x[4]):
+ list.append(getConfigListEntry(text+" DVB "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ else:
+ list.append(getConfigListEntry(text+" DVB "+x[4], ConfigNothing(), x))
+ elif x[0] == 1:
+ if x[4] == 'und': #undefined
+ list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2]), ConfigNothing(), x))
+ else:
+ if LanguageCodes.has_key(x[4]):
+ list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+LanguageCodes[x[4]][0], ConfigNothing(), x))
+ else:
+ list.append(getConfigListEntry(text+" TTX "+_("Page")+" %x%02x"%(x[3],x[2])+" "+x[4], ConfigNothing(), x))
+ elif x[0] == 2:
+ types = (" UTF-8 text "," SSA / AAS "," .SRT file ")
+ if x[4] == 'und': #undefined
+ list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d" % x[1], ConfigNothing(), x))
+ else:
+ if LanguageCodes.has_key(x[4]):
+ list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles") + ' ' + LanguageCodes[x[4]][0], ConfigNothing(), x))
+ else:
+ list.append(getConfigListEntry(text+types[x[2]]+_("Subtitles")+" %d " % x[1] +x[4], ConfigNothing(), x))
+# return _("Disable subtitles")
+ self["config"].list = list
+ self["config"].l.setList(list)
+
+ def __updatedInfo(self):
+ self.fillList()
+
+ def getSubtitleList(self):
+ s = self.infobar and self.infobar.getCurrentServiceSubtitle()
+ l = s and s.getSubtitleList() or [ ]
+ return l
+
+ def subtitlesEnabled(self):
+ return self.infobar.subtitles_enabled
+
+ def enableSubtitle(self, subtitles):
+ if self.infobar.selected_subtitle != subtitles:
+ self.infobar.subtitles_enabled = False
+ self.infobar.selected_subtitle = subtitles
+ if subtitles:
+ self.infobar.subtitles_enabled = True
+
+ def keyLeft(self):
+ ConfigListScreen.keyLeft(self)
+
+ def keyRight(self):
+ ConfigListScreen.keyRight(self)
+
+ def ok(self):
+ if self.list:
+ cur = self["config"].getCurrent()
+ self.enableSubtitle(cur[2])
+ self.close(1)
+
+ def cancel(self):
+ self.close()
from Screens.MessageBox import MessageBox
if self.settings.afterEvent.getValue() == "deepstandby":
if not Screens.Standby.inTryQuitMainloop:
- Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A sleep timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20)
+ Notifications.AddNotificationWithCallback(self.sendTryQuitMainloopNotification, MessageBox, _("A sleep timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20)
elif self.settings.afterEvent.getValue() == "standby":
if not Screens.Standby.inStandby:
- Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A sleep timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20)
+ Notifications.AddNotificationWithCallback(self.sendStandbyNotification, MessageBox, _("A sleep timer wants to set your\nSTB to standby. Do that now?"), timeout = 20)
def checkNotifications(self):
InfoBarNotifications.checkNotifications(self)
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
+# ikseong
+from Plugins.SystemPlugins.FactoryTest.plugin import FactoryTest
+
class WizardSummary(Screen):
skin = """
<screen position="0,0" size="132,64">
self.timeoutTimer = eTimer()
self.timeoutTimer.callback.append(self.timeoutCounterFired)
+ # ikseong - for memory test
+ self.memorytestmode = 0
+ self.testkey = 0
+
self["text"] = Label()
if showConfig:
"7": self.keyNumberGlobal,
"8": self.keyNumberGlobal,
"9": self.keyNumberGlobal,
- "0": self.keyNumberGlobal
+ "0": self.keyNumberGlobal,
+# ikseong
+ "test":self.testmode
}, -1)
self["VirtualKB"] = NumberActionMap(["VirtualKeyboardActions"],
self.configInstance.run()
self.finished()
+# ikseong
+ def testmode(self):
+ print "testmode ",self.memorytestmode
+ if self.memorytestmode == 0:
+ self.memorytestmode = 1
+ else:
+ self.memorytestmode = 0
+
def keyNumberGlobal(self, number):
+ if self.memorytestmode == 1:
+ self.testkey = self.testkey * 10 + number
+ if self.testkey > 10000:
+ self.testkey = self.testkey%10000
+ if self.testkey == 4599:
+ self.session.open(FactoryTest)
+ print "testkey", self.testkey
+ return
if (self.wizard[self.currStep]["config"]["screen"] != None):
self.configInstance.keyNumberGlobal(number)
elif (self.wizard[self.currStep]["config"]["type"] == "dynamic"):
KEYIDS["KEY_9"]: ("9",),
KEYIDS["KEY_EXIT"]: ("EXIT",),
KEYIDS["KEY_STOP"]: ("TV", "SHIFT"),
- KEYIDS["KEY_RECORD"]: ("RECORD",)
+ KEYIDS["KEY_RECORD"]: ("RECORD",),
+# ikseong for subtitle hotkey
+ KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",)
},
{
KEYIDS["BTN_0"]: ("UP", "fp"),
KEYIDS["KEY_9"]: ("9",),
KEYIDS["KEY_EXIT"]: ("EXIT",),
KEYIDS["KEY_STOP"]: ("TV", "SHIFT"),
- KEYIDS["KEY_RECORD"]: ("RADIO", "SHIFT")
+# ikseong
+# KEYIDS["KEY_RECORD"]: ("RADIO", "SHIFT"),
+ KEYIDS["KEY_RECORD"]: ("RECORD",),
+# ikseong for subtitle hotkey
+ KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",)
}
]
#include <lib/dvb_ci/dvbci_ui.h>
#include <lib/python/python.h>
#include <lib/gdi/picload.h>
+#include <lib/driver/memtest.h>
+#include <lib/driver/sc_test.h>
%}
%feature("ref") iObject "$this->AddRef(); /* eDebug(\"AddRef (%s:%d)!\", __FILE__, __LINE__); */ "
#define DEBUG
+#define BUILD_VUPLUS
typedef long time_t;
%include "typemaps.i"
%include "std_string.i"
%include <lib/dvb/db.h>
%include <lib/python/python.h>
%include <lib/gdi/picload.h>
+%include <lib/driver/memtest.h>
+%include <lib/driver/sc_test.h>
/************** eptr **************/
/************** signals **************/
if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atMPEG)
info.m_description = "MPEG";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAC3)
- info.m_description = "AC3";
+ info.m_description = "Dolby Digital";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAAC)
info.m_description = "AAC";
else if (program.audioStreams[i].type == eDVBServicePMTHandler::audioStream::atAACHE)
/************************************************/
+#ifdef BUILD_VUPLUS /* ikseong */
+#define CRASH_EMAILADDR "crashlog"
+#else
#define CRASH_EMAILADDR "crashlog@dream-multimedia-tv.de"
+#endif
#define INFOFILE "/maintainer.info"
#define RINGBUFFER_SIZE 16384
ePtr<gMainDC> my_dc;
gMainDC::getInstance(my_dc);
-
+
gPainter p(my_dc);
p.resetOffset();
p.resetClip(eRect(ePoint(0, 0), my_dc->size()));
p.clear();
eRect usable_area = eRect(100, 70, my_dc->size().width() - 150, 100);
-
- std::string text("We are really sorry. Your Dreambox encountered "
+
+ std::string text("We are really sorry. Your STB encountered "
"a software problem, and needs to be restarted. "
"Please send the logfile created in /hdd/ to " + crash_emailaddr + ".\n"
- "Your Dreambox restarts in 10 seconds!\n"
+ "Your STB restarts in 10 seconds!\n"
"Component: " + crash_component);
p.renderText(usable_area, text.c_str(), gPainter::RT_WRAP|gPainter::RT_HALIGN_LEFT);