예제 #1
0
 def _add_connection(self, channel, xs_hosted):
     anycast_addr = _XS_ANYCAST if xs_hosted else None
     wireless_config = OlpcMeshSettings(channel, anycast_addr)
     settings = Settings(wireless_cfg=wireless_config)
     if not xs_hosted:
         settings.ip4_config = network.IP4Config()
         settings.ip4_config.method = 'link-local'
     settings.connection.id = self._get_connection_id(channel, xs_hosted)
     settings.connection.autoconnect = False
     settings.connection.uuid = unique_id()
     settings.connection.type = '802-11-olpc-mesh'
     network.add_connection(settings,
                            reply_handler=self._add_connection_reply_cb,
                            error_handler=self._add_connection_err_cb)
예제 #2
0
파일: adhoc.py 프로젝트: bossjones/sugar
 def _add_connection(self, channel):
     ssid = 'Ad-hoc Network %d' % (channel, )
     settings = Settings()
     settings.connection.id = self._get_connection_id(channel)
     settings.connection.uuid = str(uuid.uuid4())
     settings.connection.type = '802-11-wireless'
     settings.connection.autoconnect = False
     settings.wireless.ssid = dbus.ByteArray(ssid)
     settings.wireless.band = 'bg'
     settings.wireless.channel = channel
     settings.wireless.mode = 'adhoc'
     settings.ip4_config = IP4Config()
     settings.ip4_config.method = 'link-local'
     network.add_connection(settings)
예제 #3
0
파일: olpcmesh.py 프로젝트: W3SS/sugar
 def _add_connection(self, channel, xs_hosted):
     anycast_addr = _XS_ANYCAST if xs_hosted else None
     wireless_config = OlpcMeshSettings(channel, anycast_addr)
     settings = Settings(wireless_cfg=wireless_config)
     if not xs_hosted:
         settings.ip4_config = network.IP4Config()
         settings.ip4_config.method = 'link-local'
     settings.connection.id = self._get_connection_id(channel, xs_hosted)
     settings.connection.autoconnect = False
     settings.connection.uuid = str(uuid.uuid4())
     settings.connection.type = '802-11-olpc-mesh'
     network.add_connection(settings,
                            reply_handler=self._add_connection_reply_cb,
                            error_handler=self._add_connection_err_cb)
예제 #4
0
파일: adhoc.py 프로젝트: AbrahmAB/sugar
 def _add_connection(self, channel):
     ssid = 'Ad-hoc Network %d' % (channel,)
     settings = Settings()
     settings.connection.id = self._get_connection_id(channel)
     settings.connection.uuid = str(uuid.uuid4())
     settings.connection.type = '802-11-wireless'
     settings.connection.autoconnect = False
     settings.wireless.ssid = dbus.ByteArray(ssid)
     settings.wireless.band = 'bg'
     settings.wireless.channel = channel
     settings.wireless.mode = 'adhoc'
     settings.ip4_config = IP4Config()
     settings.ip4_config.method = 'link-local'
     network.add_connection(settings)
예제 #5
0
 def _add_connection(self, channel):
     ssid = "Ad-hoc Network %d" % (channel,)
     settings = Settings()
     settings.connection.id = self._get_connection_id(channel)
     settings.connection.uuid = unique_id()
     settings.connection.type = "802-11-wireless"
     settings.connection.autoconnect = False
     settings.wireless.ssid = dbus.ByteArray(ssid)
     settings.wireless.band = "bg"
     settings.wireless.channel = channel
     settings.wireless.mode = "adhoc"
     settings.ip4_config = IP4Config()
     settings.ip4_config.method = "link-local"
     network.add_connection(settings)