Re: Connecting to one of available networks on boot
On Tue, Jul 6, 2010 at 4:14 AM, Anders Langworthy lagrang...@gmail.com wrote: On Mon, Jul 5, 2010 at 4:37 PM, Christopher Zimmermann madro...@zakweb.de wrote: The only thing I find funny is that the network link only comes up after I have run the 'ifconfig iwi0 scan' a second time. See below. Yeah, this is a quirk with my iwi device[1] also. A scan needs to be run after you change nwid or the network will not come up as active. It does work without a scan the first time you connect to a network after the machine has been booted, though. [1]: iwi0 at pci2 dev 2 function 0 Intel PRO/Wireless 2915ABG rev 0x05 I think there's a probable regression with: ppb1 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xd3 pci2 at ppb1 bus 4 I have a ralink on my ThinkPad X41 that shows the same weird behavior. ral0 at pci2 dev 2 function 0 Ralink RT2561 rev 0x00: irq 10, address 00:0d:f0:3e:6e:a0 ral0: MAC/BBP RT2561C, RF RT2527 And the same ifconfig scan trick is also needed if I swap the card with an Atheros minipci, so I think it's not related to a particular wireless device. No quirks at all with another Ralink card on cardbus (MSI CB54G2)... And I'm 99% sure I didn't have this problem before. cheers, David
Re: Connecting to one of available networks on boot
I tried it using the ifstated approach, but it didn't work as I hoped it would. So I just wrote a small sh script and put it in /etc/wlan and sourced that from /etc/rc right after /etc/netstart is run. The only thing I find funny is that the network link only comes up after I have run the 'ifconfig iwi0 scan' a second time. See below. Christopher #!/bin/sh echo -n 'setting up wlan: ' for nwid in $(ifconfig iwi0 scan |awk '{if($1==nwid) print $2}') 'FAIL' do case $nwid in wurmlingen) echo $nwid. ifconfig iwi0 192.168.23.2 netmask 255.255.255.0 \ media autoselect \ -bssid \ -chan \ nwid wurmlingen \ -nwkey \ wpa \ wpapsk 0x \ up route add default -ifp iwi0 192.168.23.1 break ;; BELWUE) echo $nwid. route delete default ifconfig iwi0 inet \ media autoselect \ -bssid \ -chan \ nwid BELWUE \ -nwkey \ -wpa \ -wpapsk \ down dhclient iwi0 break ;; FAIL) echo no known network found. ;; esac done sleep 2; ifconfig iwi0 scan /dev/null
Re: Connecting to one of available networks on boot
On Mon, Jul 5, 2010 at 4:37 PM, Christopher Zimmermann madro...@zakweb.de wrote: The only thing I find funny is that the network link only comes up after I have run the 'ifconfig iwi0 scan' a second time. See below. Yeah, this is a quirk with my iwi device[1] also. A scan needs to be run after you change nwid or the network will not come up as active. It does work without a scan the first time you connect to a network after the machine has been booted, though. [1]: iwi0 at pci2 dev 2 function 0 Intel PRO/Wireless 2915ABG rev 0x05
Connecting to one of available networks on boot
Date: Thu, 01 Jul 2010 10:54:07 +0400 From: czark...@gmail.com To: misc@openbsd.org Subject: Connecting to one of available networks on boot Message-ID: 4c2c3b8f.oqkyhtdvrrp9b9a5%czark...@gmail.com User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello! I have an OpenBSD 4.7 on my netbook. Right now I've configured my home network in hostname.if as it is the one I use most. Still the ideal situation would be automaticly connecting to any of known networks. Reading manuals on ifconfig and hostname.if gave me an idea I could have a script that scans available networks on boot and chooses the known one. The thing I wanted to ask is: is there any specific mechanism for accomplishing this task, or I have to really have a script in my hostname.if? -- Dmitrij D. Czarkoff
Re: Connecting to one of available networks on boot
IFSTATED.CONF(5) should help you. On 07/01/10 08:54, czark...@gmail.com wrote: Date: Thu, 01 Jul 2010 10:54:07 +0400 From: czark...@gmail.com To: misc@openbsd.org Subject: Connecting to one of available networks on boot Message-ID: 4c2c3b8f.oqkyhtdvrrp9b9a5%czark...@gmail.com User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello! I have an OpenBSD 4.7 on my netbook. Right now I've configured my home network in hostname.if as it is the one I use most. Still the ideal situation would be automaticly connecting to any of known networks. Reading manuals on ifconfig and hostname.if gave me an idea I could have a script that scans available networks on boot and chooses the known one. The thing I wanted to ask is: is there any specific mechanism for accomplishing this task, or I have to really have a script in my hostname.if? -- Dmitrij D. Czarkoff
Re: Connecting to one of available networks on boot
Tomas Vavrys vav...@cleancode.cz wrote: IFSTATED.CONF(5) should help you. Sorry, I should have found it on my own. Thanks! -- Dmitrij D. Czarkoff
Re: Connecting to one of available networks on boot
This is on my TODO list, but I haven't gotten to it yet. (Yes, this also annoys me) On 2010 Jul 01 (Thu) at 10:54:57 +0400 (+0400), czark...@gmail.com wrote: :Hello! : :I have an OpenBSD 4.7 on my netbook. : :Right now I've configured my home network in hostname.if as it is the :one I use most. : :Still the ideal situation would be automaticly connecting to any of known :networks. Reading manuals on ifconfig and hostname.if gave me an idea I could :have a script that scans available networks on boot and chooses the known one. : :The thing I wanted to ask is: is there any specific mechanism for :accomplishing this task, or I have to really have a script in my hostname.if? : :-- :Dmitrij D. Czarkoff : -- The trouble with being punctual is that people think you have nothing more important to do.