From owner-freebsd-mobile@FreeBSD.ORG Mon Jul 16 09:31:43 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23C3116A400 for ; Mon, 16 Jul 2007 09:31:43 +0000 (UTC) (envelope-from M.Apitz@oclcpica.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB5913C48E for ; Mon, 16 Jul 2007 09:31:42 +0000 (UTC) (envelope-from M.Apitz@oclcpica.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Mon, 16 Jul 2007 11:31:54 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.13.8/8.13.8/Submit) id l6G9Vb6b001946 for freebsd-mobile@freebsd.org; Mon, 16 Jul 2007 11:31:37 +0200 (CEST) (envelope-from m.apitz@oclcpica.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to m.apitz@oclcpica.org using -f Date: Mon, 16 Jul 2007 11:31:37 +0200 From: Matthias Apitz To: freebsd-mobile@freebsd.org Message-ID: <20070716093136.GA1600@rebelion.Sisis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Operating-System: FreeBSD 6.2-RELEASE (i386) X-OriginalArrivalTime: 16 Jul 2007 09:31:54.0362 (UTC) FILETIME=[259B1DA0:01C7C78C] Subject: How detecting the Wifi area my iwi0 is in? X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2007 09:31:43 -0000 Hello, I'm travelling a lot around with my FreeBSD 6.2 laptop and have all kind of WLAN environments in the different offices and another one at home as well. At the moment I'm using a small shell script which must be run as root after boot to set the correct Wifi context (WPA or WEP, keys, IP addrs), as well routing, DNS and other stuff (DHCP is not present always). That's why I was thinking in doing that automagically on the fly with a better script and based on the SSID of the different AP. But I can't see a stable and reliable way to figure out the SSID with ifconfig. I've just tried in my office after a fresh re-boot: # ifconfig iwi0 iwi0: flags=8802 mtu 1500 ether 00:13:ce:a1:e6:81 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel 1 authmode OPEN privacy OFF txpowmax 100 bmiss 10 protmode CTS # ifconfig iwi0 scan chanlist 1-20 'ifconfig' returned immediately and does not show any AP # ifconfig iwi0 list ap no AP shown # ifconfig iwi0 up # ifconfig iwi0 scan chanlist 1-20 # ifconfig iwi0 list ap SSID BSSID CHAN RATE S:N INT CAPS NETGEAR 00:18:4d:65:61:12 6 54M 42:0 100 EP WPA XXXXXXXXXXXXX xx:xx:xx:xx:xx:xx 9 54M 53:0 100 EP xxxxxx now my AP XXXXXXXXXXXXX appeared. But sometimes even a 'ifconfig iwi0 up' does not help. So, what is the correct way of getting the list of AP after a fresh boot? Another question: I could grep from the attic an older laptop (Fujitsu Siemens LifeBook C1020) and will install CURRENT on it for testing some stuff. The laptop has not Wifi on board. Are there any PCMCIA based Wifi cards working with FreeBSD? Thx matthias -- Matthias Apitz Manager Technical Support - OCLC PICA GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclcpica.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ OCLC PICA GmbH, Geschaeftsfuehrer: Christine Magin-Weeger, Norbert Weinberger Sitz der Gesellschaft: Oberhaching, HRB Muenchen: 113261