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)
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)
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)
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)
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)