View Single Post
Old 24th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Default

Thanks for getting back jb! Some sort of shortcut might have to be my workaround, but the netif restart doesn't work. In fact running it seems to lock up the interface so that it won't work.

However, if I just run wpa_supplicant (as root) the network immediately just works!

Code:
This is /etc/motd.
$ su
Password:
Sep 24 21:39:48 engine su: anil to root on /dev/ttyv0

# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0f:b5:70:81:0f
        inet 10.0.1.100 netmask 0xffffff00 broadcast 10.0.1.255
        media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
        status: no carrier
        ssid Hallelujah channel 11 (2462 MHz 11g)
        regdomain ROW country AU authmode OPEN privacy OFF txpower 30 bmiss 7
        scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
        roam:rate 5 protmode CTS bintval 0

# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

# ifconfig wlan0
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:0f:b5:70:81:0f
        inet 10.0.1.100 netmask 0xffffff00 broadcast 10.0.1.255
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
        status: associated
        ssid Hallelujah channel 11 (2462 MHz 11g) bssid f8:1e:df:fe:94:a5
        regdomain ROW country AU authmode WPA2/802.11i privacy ON
        deftxkey UNDEF TKIP 3:128-bit txpower 30 bmiss 7 scanvalid 450 bgscan
        bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
        roaming MANUAL

# ping google.com.au
PING google.com.au (66.102.11.104): 56 data bytes
64 bytes from 66.102.11.104: icmp_seq=0 ttl=56 time=42.326 ms
64 bytes from 66.102.11.104: icmp_seq=1 ttl=56 time=35.491 ms
^C
--- google.com.au ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip
But your comment about 'not coming up in time' rings a bell for me too. Like you say, I have no idea really but it seems to ring true.

For instance the /var/log/dmesg.today doesn't seem to realise the USB is a network device:
Code:
ugen4.2: <GlobespanVirata> at usbus4
Root mount waiting for: usbus4
Trying to mount root from ufs:/dev/ad0s1a
But /var/log/messages does:
Code:
Sep 24 21:39:07 engine kernel: ugen4.2: <GlobespanVirata> at usbus4
Sep 24 21:39:07 engine kernel: upgt0: <GlobespanVirata NETGEAR WG111, class 0/0, rev 2.00/10.40, addr 2> on usbus4
Sep 24 21:39:07 engine kernel: Root mount waiting for: usbus4
Checking for wpa_supplicant logging in /var/log/messages only ever gives the same result:
Code:
Sep 24 00:19:00 engine wpa_supplicant[513]: CTRL-EVENT-SCAN-RESULTS
Maybe I need to look up some more on rc.conf. That's the thing that should be running wpa_supplicant for me. Maybe it has a sleep command to make it wait until the network is ready or something.

Otherwise I need to set up an alias for me to sudo wpa_supplicant, perhaps even in my profile after a sleep of a second or two. Pity though, I'd like to get it working properly.
Reply With Quote