Esempio n. 1
0
                                   choices=[("0", _("not set")),
                                            ("1", _("WPA")), ("2", _("WPA2")),
                                            ("3", _("WPA/WPA2"))])
apModeConfig.wpa_passphrase = ConfigPassword(default="",
                                             visible_width=50,
                                             fixed_size=False)
apModeConfig.wpagrouprekey = ConfigInteger(default=600, limits=(0, 3600))
apModeConfig.wpa_key_mgmt = fixedValue(value="WPA-PSK")
apModeConfig.wpa_pairwise = fixedValue(value="TKIP CCMP")
apModeConfig.rsn_pairwise = fixedValue(value="CCMP")

apModeConfig.usedhcp = ConfigYesNo(default=False)
apModeConfig.address = ConfigIP(default=[0, 0, 0, 0])
apModeConfig.netmask = ConfigIP(default=[255, 0, 0, 0])
apModeConfig.gateway = ConfigIP(default=[0, 0, 0, 0])
apModeConfig.nameserver = ConfigIP(default=[0, 0, 0, 0])


class WirelessAccessPoint(Screen, ConfigListScreen):
    skin = """
		<screen position="center,center" size="590,450" title="Wireless Access Point" >
		<ePixmap pixmap="buttons/red.png" position="20,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="buttons/green.png" position="160,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="buttons/yellow.png" position="300,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="buttons/blue.png" position="440,0" size="140,40" alphatest="on" />

		<widget source="key_red" render="Label" position="20,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#9f1313" transparent="1" />
		<widget source="key_green" render="Label" position="160,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#1f771f" transparent="1" />
		<widget source="key_yellow" render="Label" position="300,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#a08500" transparent="1" />
		<widget source="key_blue" render="Label" position="440,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#18188b" transparent="1" />
Esempio n. 2
0
apModeConfig.wepType = ConfigSelection(default = "64", choices = [
	("64", _("Enable 64 bit (Input 10 hex keys)")), ("128", _("Enable 128 bit (Input 26 hex keys)"))])
apModeConfig.wep_key0 = ConfigPassword(default = "", visible_width = 50, fixed_size = False)
apModeConfig.wpa = ConfigSelection(default = "0", choices = [
	("0", _("not set")), ("1", _("WPA")), ("2", _("WPA2")),("3", _("WPA/WPA2"))])
apModeConfig.wpa_passphrase = ConfigPassword(default = "", visible_width = 50, fixed_size = False)
apModeConfig.wpagrouprekey = ConfigInteger(default = 600, limits = (0,3600))
apModeConfig.wpa_key_mgmt = fixedValue(value = "WPA-PSK")
apModeConfig.wpa_pairwise = fixedValue(value = "TKIP CCMP")
apModeConfig.rsn_pairwise = fixedValue(value = "CCMP")

apModeConfig.usedhcp = ConfigYesNo(default=False)
apModeConfig.address = ConfigIP(default = [0,0,0,0])
apModeConfig.netmask = ConfigIP(default = [255,0,0,0])
apModeConfig.gateway = ConfigIP(default = [0,0,0,0])
apModeConfig.nameserver = ConfigIP(default = [0,0,0,0])

class WirelessAccessPoint(Screen,ConfigListScreen):
	skin = """
		<screen position="center,center" size="590,450" title="Wireless Access Point" >
		<ePixmap pixmap="skin_default/buttons/red.png" position="20,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="skin_default/buttons/green.png" position="160,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="skin_default/buttons/yellow.png" position="300,0" size="140,40" alphatest="on" />
		<ePixmap pixmap="skin_default/buttons/blue.png" position="440,0" size="140,40" alphatest="on" />

		<widget source="key_red" render="Label" position="20,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#9f1313" transparent="1" />
		<widget source="key_green" render="Label" position="160,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#1f771f" transparent="1" />
		<widget source="key_yellow" render="Label" position="300,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#a08500" transparent="1" />
		<widget source="key_blue" render="Label" position="440,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" foregroundColor="#ffffff" backgroundColor="#18188b" transparent="1" />

		<widget name="config" zPosition="2" position="20,70" size="550,270" scrollbarMode="showOnDemand" transparent="1" />