e48315111bcbfae8afce05490d56d23f6ba63d41
[vuplus_dvbapp-plugin] / wirelesslan / src / Wlan.py
1 # for localized messages
2 from __init__ import _
3
4 from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_HALIGN_CENTER
5 from Components.MultiContent import MultiContentEntryText
6 from Components.GUIComponent import GUIComponent
7 from Components.HTMLComponent import HTMLComponent
8 from Components.config import config, ConfigYesNo, NoSave, ConfigSubsection, ConfigText, ConfigSelection, ConfigPassword
9 from Components.Console import Console
10
11 from os import system
12 from string import maketrans, strip
13 import sys
14 import types
15 from re import compile as re_compile, search as re_search
16 from iwlibs import getNICnames, Wireless, Iwfreq
17
18 list = []
19 list.append("WEP")
20 list.append("WPA")
21 list.append("WPA2")
22 list.append("WPA/WPA2")
23
24 weplist = []
25 weplist.append("ASCII")
26 weplist.append("HEX")
27
28 config.plugins.wlan = ConfigSubsection()
29 config.plugins.wlan.essid = NoSave(ConfigText(default = "home", fixed_size = False))
30 config.plugins.wlan.hiddenessid = NoSave(ConfigText(default = "home", fixed_size = False))
31
32 config.plugins.wlan.encryption = ConfigSubsection()
33 config.plugins.wlan.encryption.enabled = NoSave(ConfigYesNo(default = True))
34 config.plugins.wlan.encryption.type = NoSave(ConfigSelection(list, default = "WPA/WPA2"))
35 config.plugins.wlan.encryption.wepkeytype = NoSave(ConfigSelection(weplist, default = "ASCII"))
36 config.plugins.wlan.encryption.psk = NoSave(ConfigPassword(default = "mysecurewlan", fixed_size = False))
37
38 class Wlan:
39         def __init__(self, iface):
40                 a = ''; b = ''
41                 
42                 for i in range(0, 255):
43                     a = a + chr(i)
44                     if i < 32 or i > 127:
45                         b = b + ' '
46                     else:
47                         b = b + chr(i)
48                 
49                 self.iface = iface
50                 self.wlaniface = {}
51                 self.WlanConsole = Console()
52                 self.asciitrans = maketrans(a, b)
53
54         def stopWlanConsole(self):
55                 if self.WlanConsole is not None:
56                         print "killing self.WlanConsole"
57                         self.WlanConsole = None
58                         del self.WlanConsole
59                         
60         def getDataForInterface(self, callback = None):
61                 #get ip out of ip addr, as avahi sometimes overrides it in ifconfig.
62                 print "self.iface im getDataForInterface",self.iface
63                 if len(self.WlanConsole.appContainers) == 0:
64                         self.WlanConsole = Console()
65                         cmd = "iwconfig " + self.iface
66                         self.WlanConsole.ePopen(cmd, self.iwconfigFinished, callback)
67
68         def iwconfigFinished(self, result, retval, extra_args):
69                 print "self.iface im iwconfigFinished",self.iface
70                 callback = extra_args
71                 data = { 'essid': False, 'frequency': False, 'acesspoint': False, 'bitrate': False, 'encryption': False, 'quality': False, 'signal': False }
72                 #print "result im iwconfigFinished",result
73                 
74                 for line in result.splitlines():
75                         #print "line",line
76                         line = line.strip()
77                         if "ESSID" in line:
78                                 if "off/any" in line:
79                                         ssid = _("No Connection")
80                                 else:
81                                         tmpssid=(line[line.index('ESSID')+7:len(line)-1])
82                                         if tmpssid == '':
83                                                 ssid = _("Hidden networkname")
84                                         elif tmpssid ==' ':
85                                                 ssid = _("Hidden networkname")
86                                         else:
87                                             ssid = tmpssid
88                                 #print "SSID->",ssid
89                                 if ssid is not None:
90                                         data['essid'] = ssid
91                         if 'Frequency' in line:
92                                 frequency = line[line.index('Frequency')+10 :line.index(' GHz')]
93                                 #print "Frequency",frequency   
94                                 if frequency is not None:
95                                         data['frequency'] = frequency
96                         if "Access Point" in line:
97                                 ap=line[line.index('Access Point')+14:len(line)-1]
98                                 #print "AP",ap
99                                 if ap is not None:
100                                         data['acesspoint'] = ap
101                         if "Bit Rate" in line:
102                                 br = line[line.index('Bit Rate')+9 :line.index(' Mb/s')]
103                                 #print "Bitrate",br
104                                 if br is not None:
105                                         data['bitrate'] = br
106                         if 'Encryption key' in line:
107                                 if ":off" in line:
108                                     enc = _("Disabled")
109                                 else:
110                                     enc = line[line.index('Encryption key')+15 :line.index('   Security')]
111                                 #print "Encryption key",enc 
112                                 if enc is not None:
113                                         data['encryption'] = _("Enabled")
114                         if 'Quality' in line:
115                                 if "/100" in line:
116                                         qual = line[line.index('Quality')+8:line.index('/100')]
117                                 else:
118                                         qual = line[line.index('Quality')+8:line.index('Sig')]
119                                 #print "Quality",qual
120                                 if qual is not None:
121                                         data['quality'] = qual
122                         if 'Signal level' in line:
123                                 signal = line[line.index('Signal level')+14 :line.index(' dBm')]
124                                 #print "Signal level",signal            
125                                 if signal is not None:
126                                         data['signal'] = signal
127
128                 self.wlaniface[self.iface] = data
129                 
130                 if len(self.WlanConsole.appContainers) == 0:
131                         print "self.wlaniface after loading:", self.wlaniface
132                         self.WlanConsole = None
133                         if callback is not None:
134                                 callback(True,self.wlaniface)
135
136         def getAdapterAttribute(self, attribute):
137                 print "im getAdapterAttribute"
138                 if self.wlaniface.has_key(self.iface):
139                         print "self.wlaniface.has_key",self.iface
140                         if self.wlaniface[self.iface].has_key(attribute):
141                                 return self.wlaniface[self.iface][attribute]
142                 return None
143                 
144         def asciify(self, str):
145                 return str.translate(self.asciitrans)
146
147         
148         def getWirelessInterfaces(self):
149                 iwifaces = None
150                 try:
151                         iwifaces = getNICnames()
152                 except:
153                         print "[Wlan.py] No Wireless Networkcards could be found"
154                 
155                 return iwifaces
156
157         
158         def getNetworkList(self):
159                 system("ifconfig "+self.iface+" up")
160                 ifobj = Wireless(self.iface) # a Wireless NIC Object
161                 
162                 #Association mappings
163                 stats, quality, discard, missed_beacon = ifobj.getStatistics()
164                 snr = quality.signallevel - quality.noiselevel
165
166                 try:
167                         scanresults = ifobj.scan()
168                 except:
169                         scanresults = None
170                         print "[Wlan.py] No Wireless Networks could be found"
171                 
172                 if scanresults is not None:
173                         aps = {}
174                         for result in scanresults:
175                         
176                                 bssid = result.bssid
177                 
178                                 encryption = map(lambda x: hex(ord(x)), result.encode)
179                 
180                                 if encryption[-1] == "0x8":
181                                         encryption = True
182                                 else:
183                                         encryption = False
184                 
185                                 extra = []
186                                 for element in result.custom:
187                                         element = element.encode()
188                                         extra.append( strip(self.asciify(element)) )
189                                 
190                                 if result.quality.sl is 0 and len(extra) > 0:
191                                         begin = extra[0].find('SignalStrength=')+15
192                                                                         
193                                         done = False
194                                         end = begin+1
195                                         
196                                         while not done:
197                                                 if extra[0][begin:end].isdigit():
198                                                         end += 1
199                                                 else:
200                                                         done = True
201                                                         end -= 1
202                                         
203                                         signal = extra[0][begin:end]
204                                         #print "[Wlan.py] signal is:" + str(signal)
205
206                                 else:
207                                         signal = str(result.quality.sl)
208                                 
209                                 aps[bssid] = {
210                                         'active' : True,
211                                         'bssid': result.bssid,
212                                         'channel': result.frequency.getChannel(result.frequency.getFrequency()),
213                                         'encrypted': encryption,
214                                         'essid': strip(self.asciify(result.essid)),
215                                         'iface': self.iface,
216                                         'maxrate' : result.rate[-1],
217                                         'noise' : result.quality.getNoiselevel(),
218                                         'quality' : str(result.quality.quality),
219                                         'signal' : signal,
220                                         'custom' : extra,
221                                 }
222                                 print aps[bssid]
223                         return aps
224
225                 
226         def getStatus(self):
227                 ifobj = Wireless(self.iface)
228                 fq = Iwfreq()
229                 try:
230                         self.channel = str(fq.getChannel(str(ifobj.getFrequency()[0:-3])))
231                 except:
232                         self.channel = 0
233                 #print ifobj.getStatistics()
234                 status = {
235                                   'BSSID': str(ifobj.getAPaddr()),
236                                   'ESSID': str(ifobj.getEssid()),
237                                   'quality': str(ifobj.getStatistics()[1].quality),
238                                   'signal': str(ifobj.getStatistics()[1].sl),
239                                   'bitrate': str(ifobj.getBitrate()),
240                                   'channel': str(self.channel),
241                                   #'channel': str(fq.getChannel(str(ifobj.getFrequency()[0:-3]))),
242                 }
243                 
244                 for (key, item) in status.items():
245                         if item is "None" or item is "":
246                                         status[key] = _("N/A")
247                                 
248                 return status
249
250
251
252 class WlanList(HTMLComponent, GUIComponent):
253         def __init__(self, session, iface):
254                 
255                 GUIComponent.__init__(self)
256                 self.w = Wlan(iface)
257                 self.iface = iface
258                 
259                 self.length = 0
260                 self.aplist = None
261                 self.l = None
262                 self.l = eListboxPythonMultiContent()
263                 
264                 self.l.setFont(0, gFont("Regular", 32))
265                 self.l.setFont(1, gFont("Regular", 18))
266                 self.l.setFont(2, gFont("Regular", 16))
267                 self.l.setBuildFunc(self.buildWlanListEntry)            
268                                 
269                 self.reload()
270         
271         def buildWlanListEntry(self, essid, bssid, encrypted, iface, maxrate, signal):                                                                                                 
272                 
273                 res = [ (essid, encrypted, iface) ]
274                 
275                 if essid == "":
276                         essid = bssid
277                 
278                 e = encrypted and _("Yes") or _("No")
279                 res.append( MultiContentEntryText(pos=(0, 0), size=(470, 35), font=0, flags=RT_HALIGN_LEFT, text=essid) )
280                 res.append( MultiContentEntryText(pos=(425, 0), size=(60, 20), font=1, flags=RT_HALIGN_LEFT, text=_("Signal: ")))
281                 res.append( MultiContentEntryText(pos=(480, 0), size=(70, 35), font=0, flags=RT_HALIGN_RIGHT, text="%s" %signal))
282                 res.append( MultiContentEntryText(pos=(0, 40), size=(180, 20), font=1, flags=RT_HALIGN_LEFT, text=_("Max. Bitrate: %s") %maxrate ))
283                 res.append( MultiContentEntryText(pos=(190, 40), size=(180, 20), font=1, flags=RT_HALIGN_CENTER, text=_("Encrypted: %s") %e ))
284                 res.append( MultiContentEntryText(pos=(360, 40), size=(190, 20), font=1, flags=RT_HALIGN_RIGHT, text=_("Interface: %s") %iface ))
285                 return res
286                 
287                         
288         def reload(self):
289                 aps = self.w.getNetworkList()
290                 list = []
291                 self.aplist = []
292                 if aps is not None:
293                         print "[Wlan.py] got Accespoints!"
294                         for ap in aps:
295                                 a = aps[ap]
296                                 if a['active']:
297                                         if a['essid'] == "":
298                                                 a['essid'] = a['bssid']
299                                         list.append( (a['essid'], a['bssid'], a['encrypted'], a['iface'], a['maxrate'], a['signal']) )
300                                         self.aplist.append( a['essid'])
301                 
302                 self.length = len(list)
303                 self.l.setList([])
304                 self.l.setList(list)
305                         
306         GUI_WIDGET = eListbox
307
308
309         def getCurrent(self):
310                 return self.l.getCurrentSelection()
311         
312         
313         def postWidgetCreate(self, instance):
314                 instance.setContent(self.l)
315                 instance.setItemHeight(60)
316         
317         
318         def getLength(self):
319                 return self.length
320         
321         def getList(self):
322                 return self.aplist
323
324
325 class wpaSupplicant:
326         def __init__(self):
327                 pass
328         
329                 
330         def writeConfig(self):  
331                         
332                         essid = config.plugins.wlan.essid.value
333                         hiddenessid = config.plugins.wlan.hiddenessid.value
334                         encrypted = config.plugins.wlan.encryption.enabled.value
335                         encryption = config.plugins.wlan.encryption.type.value
336                         wepkeytype = config.plugins.wlan.encryption.wepkeytype.value
337                         psk = config.plugins.wlan.encryption.psk.value
338                         fp = file('/etc/wpa_supplicant.conf', 'w')
339                         fp.write('#WPA Supplicant Configuration by enigma2\n')
340                         fp.write('ctrl_interface=/var/run/wpa_supplicant\n')
341                         fp.write('eapol_version=1\n')
342                         fp.write('fast_reauth=1\n')     
343                         if essid == 'hidden...':
344                                 fp.write('ap_scan=2\n')
345                         else:
346                                 fp.write('ap_scan=1\n')
347                         fp.write('network={\n')
348                         if essid == 'hidden...':
349                                 fp.write('\tssid="'+hiddenessid+'"\n')
350                         else:
351                                 fp.write('\tssid="'+essid+'"\n')
352                         fp.write('\tscan_ssid=0\n')                     
353                         if encrypted:
354                                 if encryption == 'WPA' or encryption == 'WPA2' or encryption == 'WPA/WPA2' :
355                                         
356                                         if encryption == 'WPA':
357                                                 fp.write('\tproto=WPA\n')
358                                                 fp.write('\tpairwise=TKIP\n')
359                                                 fp.write('\tgroup=TKIP\n')
360                                         elif encryption == 'WPA2':
361                                                 fp.write('\tproto=WPA RSN\n')
362                                                 fp.write('\tpairwise=CCMP TKIP\n')
363                                                 fp.write('\tgroup=CCMP TKIP\n')                                         
364                                         else:
365                                                 fp.write('\tproto=WPA WPA2\n')
366                                                 fp.write('\tpairwise=CCMP\n')
367                                                 fp.write('\tgroup=TKIP\n')                                      
368                                         fp.write('\tpsk="'+psk+'"\n')
369                                                 
370                                 elif encryption == 'WEP':
371                                         fp.write('\tkey_mgmt=NONE\n')
372                                         if wepkeytype == 'ASCII':
373                                                 fp.write('\twep_key0="'+psk+'"\n')
374                                         else:
375                                                 fp.write('\twep_key0='+psk+'\n')
376                         else:
377                                 fp.write('\tkey_mgmt=NONE\n')                   
378                         fp.write('}')
379                         fp.write('\n')
380                         fp.close()
381                         system("cat /etc/wpa_supplicant.conf")
382                 
383         def loadConfig(self):
384                 try:
385                         #parse the wpasupplicant configfile
386                         fp = file('/etc/wpa_supplicant.conf', 'r')
387                         supplicant = fp.readlines()
388                         fp.close()
389                         ap_scan = False
390                         essid = None
391
392                         for s in supplicant:
393                                 split = s.strip().split('=',1)
394                                 if split[0] == 'ap_scan':
395                                         print "[Wlan.py] Got Hidden SSID Scan  Value "+split[1]
396                                         if split[1] == '2':
397                                                 ap_scan = True
398                                         else:
399                                                 ap_scan = False
400                                                 
401                                 elif split[0] == 'ssid':
402                                         print "[Wlan.py] Got SSID "+split[1][1:-1]
403                                         essid = split[1][1:-1]
404                                         
405                                 elif split[0] == 'proto':
406                                         print "split[1]",split[1]
407                                         config.plugins.wlan.encryption.enabled.value = True
408                                         if split[1] == "WPA" :
409                                                 mode = 'WPA'
410                                         if split[1] == "WPA WPA2" :
411                                                 mode = 'WPA/WPA2'
412                                         if split[1] == "WPA RSN" :
413                                                 mode = 'WPA2'
414                                         config.plugins.wlan.encryption.type.value = mode
415                                         print "[Wlan.py] Got Encryption: "+mode
416                                         
417                                 #currently unused !
418                                 #elif split[0] == 'key_mgmt':
419                                 #       print "split[1]",split[1]
420                                 #       if split[1] == "WPA-PSK" :
421                                 #               config.plugins.wlan.encryption.enabled.value = True
422                                 #               config.plugins.wlan.encryption.type.value = "WPA/WPA2"
423                                 #       print "[Wlan.py] Got Encryption: "+ config.plugins.wlan.encryption.type.value
424                                         
425                                 elif split[0] == 'wep_key0':
426                                         config.plugins.wlan.encryption.enabled.value = True
427                                         config.plugins.wlan.encryption.type.value = 'WEP'
428                                         if split[1].startswith('"') and split[1].endswith('"'):
429                                                 config.plugins.wlan.encryption.wepkeytype.value = 'ASCII'
430                                                 config.plugins.wlan.encryption.psk.value = split[1][1:-1]
431                                         else:
432                                                 config.plugins.wlan.encryption.wepkeytype.value = 'HEX'
433                                                 config.plugins.wlan.encryption.psk.value = split[1]                                             
434                                         print "[Wlan.py] Got Encryption: WEP - keytype is: "+config.plugins.wlan.encryption.wepkeytype.value
435                                         print "[Wlan.py] Got Encryption: WEP - key0 is: "+config.plugins.wlan.encryption.psk.value
436                                         
437                                 elif split[0] == 'psk':
438                                         config.plugins.wlan.encryption.psk.value = split[1][1:-1]
439                                         print "[Wlan.py] Got PSK: "+split[1][1:-1]
440                                 else:
441                                         pass
442                                 
443                         if ap_scan is True:
444                                 config.plugins.wlan.hiddenessid.value = essid
445                                 config.plugins.wlan.essid.value = 'hidden...'
446                         else:
447                                 config.plugins.wlan.hiddenessid.value = essid
448                                 config.plugins.wlan.essid.value = essid
449                         wsconfig = {
450                                         'hiddenessid': config.plugins.wlan.hiddenessid.value,
451                                         'ssid': config.plugins.wlan.essid.value,
452                                         'encryption': config.plugins.wlan.encryption.enabled.value,
453                                         'encryption_type': config.plugins.wlan.encryption.type.value,
454                                         'encryption_wepkeytype': config.plugins.wlan.encryption.wepkeytype.value,
455                                         'key': config.plugins.wlan.encryption.psk.value,
456                                 }
457                 
458                         for (key, item) in wsconfig.items():
459                                 if item is "None" or item is "":
460                                         if key == 'hiddenessid':
461                                                 wsconfig['hiddenessid'] = "home"
462                                         if key == 'ssid':
463                                                 wsconfig['ssid'] = "home"
464                                         if key == 'encryption':
465                                                 wsconfig['encryption'] = True                           
466                                         if key == 'encryption':
467                                                 wsconfig['encryption_type'] = "WPA/WPA2"
468                                         if key == 'encryption':
469                                                 wsconfig['encryption_wepkeytype'] = "ASCII"
470                                         if key == 'encryption':
471                                                 wsconfig['key'] = "mysecurewlan"
472
473                 except:
474                         print "[Wlan.py] Error parsing /etc/wpa_supplicant.conf"
475                         wsconfig = {
476                                         'hiddenessid': "home",
477                                         'ssid': "home",
478                                         'encryption': True,
479                                         'encryption_type': "WPA/WPA2",
480                                         'encryption_wepkeytype': "ASCII",
481                                         'key': "mysecurewlan",
482                                 }
483                 print "[Wlan.py] WS-CONFIG-->",wsconfig
484                 return wsconfig
485
486         
487         def restart(self, iface):
488                 system("start-stop-daemon -K -x /usr/sbin/wpa_supplicant")
489                 system("start-stop-daemon -S -x /usr/sbin/wpa_supplicant -- -B -i"+iface+" -c/etc/wpa_supplicant.conf")
490
491 class Status:
492         def __init__(self):
493                 self.wlaniface = {}
494                 self.backupwlaniface = {}
495                 self.WlanConsole = Console()
496
497         def stopWlanConsole(self):
498                 if self.WlanConsole is not None:
499                         print "killing self.WlanConsole"
500                         self.WlanConsole = None
501                         
502         def getDataForInterface(self, iface, callback = None):
503                 self.WlanConsole = Console()
504                 cmd = "iwconfig " + iface
505                 self.WlanConsole.ePopen(cmd, self.iwconfigFinished, [iface, callback])
506
507         def iwconfigFinished(self, result, retval, extra_args):
508                 (iface, callback) = extra_args
509                 data = { 'essid': False, 'frequency': False, 'acesspoint': False, 'bitrate': False, 'encryption': False, 'quality': False, 'signal': False }
510                 for line in result.splitlines():
511                         line = line.strip()
512                         if "ESSID" in line:
513                                 if "off/any" in line:
514                                         ssid = _("No Connection")
515                                 else:
516                                         tmpssid=(line[line.index('ESSID')+7:len(line)-1])
517                                         if tmpssid == '':
518                                                 ssid = _("Hidden networkname")
519                                         elif tmpssid ==' ':
520                                                 ssid = _("Hidden networkname")
521                                         else:
522                                             ssid = tmpssid
523                                 #print "SSID->",ssid
524                                 if ssid is not None:
525                                         data['essid'] = ssid
526                         if 'Frequency' in line:
527                                 frequency = line[line.index('Frequency')+10 :line.index(' GHz')]
528                                 #print "Frequency",frequency   
529                                 if frequency is not None:
530                                         data['frequency'] = frequency
531                         if "Access Point" in line:
532                                 ap=line[line.index('Access Point')+14:len(line)]
533                                 #print "AP",ap
534                                 if ap is not None:
535                                         data['acesspoint'] = ap
536                                         if ap == "Not-Associated":
537                                                 data['essid'] = _("No Connection")
538                         if "Bit Rate" in line:
539                                 if "kb" in line:
540                                         br = line[line.index('Bit Rate')+9 :line.index(' kb/s')]
541                                         if br == '0':
542                                                 br = _("Unsupported")
543                                         else:
544                                                 br += " Mb/s"
545                                 else:
546                                         br = line[line.index('Bit Rate')+9 :line.index(' Mb/s')] + " Mb/s"
547                                 #print "Bitrate",br
548                                 if br is not None:
549                                         data['bitrate'] = br
550                         if 'Encryption key' in line:
551                                 if ":off" in line:
552                                         if data['acesspoint'] is not "Not-Associated":
553                                                 enc = _("Unsupported")
554                                         else:
555                                                 enc = _("Disabled")
556                                 else:
557                                         enc = line[line.index('Encryption key')+15 :line.index('   Security')]
558                                         if enc is not None:
559                                                 enc = _("Enabled")
560                                 #print "Encryption key",enc 
561                                 if enc is not None:
562                                         data['encryption'] = enc
563                         if 'Quality' in line:
564                                 if "/100" in line:
565                                         qual = line[line.index('Quality')+8:line.index('/100')]
566                                 else:
567                                         qual = line[line.index('Quality')+8:line.index('Sig')]
568                                 #print "Quality",qual
569                                 if qual is not None:
570                                         data['quality'] = qual
571                         if 'Signal level' in line:
572                                 if "dBm" in line:
573                                         signal = line[line.index('Signal level')+14 :line.index(' dBm')]
574                                         signal += " dBm"
575                                 elif "/100" in line:
576                                         signal = line[line.index('Signal level')+13:line.index('/100  Noise')]
577                                         signal += "%"
578                                 else:
579                                         signal = line[line.index('Signal level')+13:line.index('  Noise')]
580                                         signal += "%"
581                                 #print "Signal level",signal            
582                                 if signal is not None:
583                                         data['signal'] = signal
584
585                 self.wlaniface[iface] = data
586                 self.backupwlaniface = self.wlaniface
587                 
588                 if self.WlanConsole is not None:
589                         if len(self.WlanConsole.appContainers) == 0:
590                                 print "self.wlaniface after loading:", self.wlaniface
591                                 if callback is not None:
592                                         callback(True,self.wlaniface)
593
594         def getAdapterAttribute(self, iface, attribute):
595                 print "im getAdapterAttribute"
596                 self.iface = iface
597                 if self.wlaniface.has_key(self.iface):
598                         print "self.wlaniface.has_key",self.iface
599                         if self.wlaniface[self.iface].has_key(attribute):
600                                 return self.wlaniface[self.iface][attribute]
601                 return None
602         
603 iStatus = Status()