DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default Netgear WG111V2_2 wireless USB device not configured

I wonder if anyone can spot my problem trying to bring up my Netgear WG111v2 USB wireless adapater? I've been working on this for days, and even installed 9.0 in an effort to help but I couldn't make it work.

I am currently running a fresh FreeBSD 8.1 install.

It looks to me in release notes and /sys/dev/usb/usbdevs and /sys/dev/usb/wlan that the WG111v2 is supported.

My Netgear WG111v2 USB wireless adapter is coming up as:
Vendor 0x0846 which is BayNETGEAR
Product 0x4240 which is WG111V2_2 PrismGT USB 2.0 WLAN
bcddev 0x1040
chipset GW3887

But I wonder if this may require the PrismGT driver upgt rather than the standard driver urtw? It looks like the WG111V2_2 has a different chipset than the WG111 and WG111V2. Maybe it was overlooked and is actually not supported?

USB adapter is being recognised as a USB device, but not as a network adapter
In /var/run/dmesg.boot:
Code:
ugen4.2: <GlobespanVirata> at usbus4
At one point I did get:
Code:
ugen4.2: <NETGEAR WG111 Globespan Virata> at usbus4
Perhaps that was under 9.0. I can't remember.

But it's gone back to:
Code:
ugen4.2: <GlobespanVirata> at usbus4
The error I get is:
Code:
> ifconfig wlan0 create wlandev urtw0
ifconfig: SIOCIFCREATE2: Device not configured
Code:
> usbconfig -u 4 -a 2 dump_device_desc 
ugen4.2: <Cohiba 3887 rev0 GlobespanVirata> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
bLength = 0x0012 
bDescriptorType = 0x0001 
bcdUSB = 0x0200 
bDeviceClass = 0x0000 
bDeviceSubClass = 0x0000 
bDeviceProtocol = 0x0000 
bMaxPacketSize0 = 0x0040 
idVendor = 0x0846 
idProduct = 0x4240 
bcdDevice = 0x1020 
iManufacturer = 0x0001  <GlobespanVirata>
iProduct = 0x0002  <Cohiba 3887 rev0>
iSerialNumber = 0x0003  <3887-0000>
bNumConfigurations = 0x0001
Code:
> cat /boot/loader.conf
if_urtw_load="YES"
if_upgt_load="YES"
if_wi_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
I've not done anything extra with my /etc/rc.conf yet.
I don't know what supplicant is but I'm not using it yet either.

I must admit it looks like upgt doesn't load now, but I thought I got upgt loaded previously and got the same 'not configured' when trying it with ifconfig:
Code:
> kldstat
Id Refs Address    Size     Name
1   11 0xc0400000 bbbae4   kernel
2    1 0xc4a71000 9000     i915.ko
3    1 0xc4a7a000 14000    drm.ko
4    1 0xc5720000 c000     if_urtw.ko
I feel like I'm going round in circles and I can't turn up anything to cope from handbook, faq, google, etc.
Reply With Quote
  #2   (View Single Post)  
Old 6th September 2010
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

IF the driver supports the chipset...

AFAIK you need a wpa_supplicant.conf, and
entries in rc.conf.
...
Code:
sh /etc/rc.d/netif restart
you can grab multiple wpa_supplicant conf's (I had to try
about 50 variations), mostly from the forum at freebsd.org,
and after putting the appropriate two lines in rc.conf,
(Unsure of what they might be,) test each wpa_supplicant.conf
variation until one works (you can ping the access point or net)
running the CLI above (a connection may end with the lines,
"renewal in NNNN seconds" ...)
Took me about two weeks in all to test. I only had an hour or
a half hour per day...
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs...
Reply With Quote
  #3   (View Single Post)  
Old 6th September 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

If the device remains as ugen(4), even after a module is loaded, no amount of userland configuration will make the device usable as a Wireless interface.

You should probably take this up with the developers, assuming the device is indeed supported by the driver.

Good luck,
Reply With Quote
  #4   (View Single Post)  
Old 7th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Thanks to BSDfan666 and jb_daefo. I'm new to BSD and pretty excited (although I've been keeping a CD of 4.2 for about 10 years I've only just installed it!).

That's definitely a couple of pointers that should get me out of this loop.

Looks like I need to check this particular device is actually supported first.

I'll update this thread with anything I get.
Reply With Quote
  #5   (View Single Post)  
Old 8th September 2010
shep shep is offline
ISO Quartermaster
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 546
Thanked 9 Times in 9 Posts
Default

According to this the PrismGT chipset is supported in both FreeBSD and OpenBSD
http://en.wikipedia.org/wiki/Compari...reless_drivers

http://www.freebsd.org/cgi/man.cgi?query=upgt

http://www.openbsd.org/cgi-bin/man.cgi?query=upgt


Here is an older Thread in the FreeBSD forums that succesfully got the device working
http://149.20.54.209/showthread.php?t=14472

Last edited by shep; 8th September 2010 at 09:01 AM. Reason: suggestion previously made
Reply With Quote
  #6   (View Single Post)  
Old 10th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Thanks shep I've now got quite a few leads. There's definitely stuff in that thread that was happening to me earlier.

I could see other PrismGT devices were supported in BSD but I didn't realise that meant that all PrismGT devices were supported.

The WG111V2_2 appears listed in /sys/dev/usb/usbdevs alongside the other wg111 versions, but in /sys/dev/usb/wlan WG111V2 and WG111V3 appear in if_urtw.c but WG111V2_2 does not specifically appear in either if_urtw.c or if_upgt.c. This is what makes me think it's overlooked.

Either way, I've got leads to follow now which makes me happy. It might take me some time but I'll post again when I get somewhere.

Thanks again.
Reply With Quote
  #7   (View Single Post)  
Old 21st September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Based on link to other old thread I attempted rebuild upgt driver with my device included just in case it is just not being recognised (as in that thread).

My product is already being listed in /sys/dev/usb/usbdevs though so I don't need to change it:
product NETGEAR WG111V2_2 0x4240 PrismGT USB 2.0 WLAN

But the product is not referred to in /sys/dev/usb/wlan/if_upgt.c.
I therefore added these two lines:
UPGT_DEV(WG111V2_2, PRISM_GT_1),
UPGT_DEV(WG111V2_2, PRISM_GT_2),

I then tried to make:
> cd /usr/src/sys/modules/usb/upgt # make
> make
Warning: Object directory not changed from original /usr/src/sys/modules/usb/upgt
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c /usr/src/sys/modules/usb/upgt/../../../dev/usb/wlan/if_upgt.c
/usr/src/sys/modules/usb/upgt/../../../dev/usb/wlan/if_upgt.c:185: error: 'USB_VENDOR_WG111V2_2' undeclared here (not in a function)
/usr/src/sys/modules/usb/upgt/../../../dev/usb/wlan/if_upgt.c:185: error: 'USB_PRODUCT_WG111V2_2_PRISM_GT_1' undeclared here (not in a function)
/usr/src/sys/modules/usb/upgt/../../../dev/usb/wlan/if_upgt.c:186: error: 'USB_PRODUCT_WG111V2_2_PRISM_GT_2' undeclared here (not in a function)
*** Error code 1
Stop in /usr/src/sys/modules/usb/upgt.

I can see that the build is failing on my added lines and obviously something else is missing, but I'm not sure what.

I'm going to back out my changes and try hard to get upgt to load and see if that makes a difference.
Reply With Quote
  #8   (View Single Post)  
Old 22nd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Ah, big embarassment, I should have added this:
> vi /sys/dev/usb/wlan/if_upgt.c
UPGT_DEV(NETGEAR, WG111V2_2),

Now when I make it looks like I get a success:
> cd /usr/src/sys/modules/usb/upgt
> make
> make install clean

But kldload still doesn't work.
> kldload if_upgt
kldload: can't load if_upgt: No such file or directory

Perhaps I need to rebuild the kernel, to build in the new upgt driver, like in the other thread.
I'll try that next.
Reply With Quote
  #9   (View Single Post)  
Old 22nd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Ah, but now after reboot kldload gives a nice informative message about upgtfw:
> kldload if_upgt
KLD if_upgt.ko: depends on upgtfw_fw - not available or version mismatch
kldload: can't load if_upgt: No such file or directory

And upgt(4) seems to match:
This driver requires the upgtfw firmware to be installed before it will
work. The firmware files are not publicly available. A package of the
firmware which can be installed via pkg_add(1) is available:
http://weongyo.org/project/upgt/upgt....13.1.0.tar.gz

However, after fetching that, and another version from somewhere else, pkg_add doesn't seem very interested. upgt(4) does say that the tgz is useable with pkg_add, but
> pkg_add upgt-firmware-2.13.1.0.tar.gz
tar: +CONTENTS: Not found in archive
tar: Error exit delayed from previous errors.
pkg_add: tar extract of /usr/home/anil/upgt-firmware-2.13.1.0.tar.gz failed!
pkg_add: unable to extract table of contents file from '/usr/home/anil/upgt-firmware-2.13.1.0.tar.gz' - not a package?

I even re-packaged with bzip2 instead of gzip since the handbook seemed to suggest that was more normal but it still doesn't work:
> pkg_add upgt-firmware-2.13.1.0.tbz
tar: +CONTENTS: Not found in archive
tar: Error exit delayed from previous errors.
pkg_add: tar extract of /usr/home/anil/upgt-firmware-2.13.1.0.tbz failed!
pkg_add: unable to extract table of contents file from '/usr/home/anil/upgt-firmware-2.13.1.0.tbz' - not a package?

Looking at the files they seem extremely sparse, how am I going to get any firmware built from four files?:
> tar -tf upgt-firmware-2.13.1.0.tbz
upgt-firmware-2.13.1.0/
upgt-firmware-2.13.1.0/pkg-plist
upgt-firmware-2.13.1.0/pkg-descr
upgt-firmware-2.13.1.0/distinfo
upgt-firmware-2.13.1.0/Makefile

I think I'm stuck again. It seems very clear that I really do need to install this firmware, my driver rebuild even worked and is ready, but it looks like an empty set of files (just descriptors, no code).

I'm going to read up on pkg_add some more, although there doesn't seem to be anything there in either man page, handbook, or google, and I'll also remove my package redirection (to a mirror) in case that's involved if pkg_add is trying to download other files as well. Do I need to run pkg_add from a particular directory perhaps?
Reply With Quote
Old 22nd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Smile

So I tried using pkg_add directly on the tar.gz, without a mirror in PACKAGEROOT, and in various directories (!), until I finally decided to try an ordinary make alongside /usr/src/sys/modules/usb/upgt:
> mkdir /usr/src/sys/modules/usb/upgtfw
> cd /usr/src/sys/modules/usb/upgtfw
> cp ~/upgt-firmware-2.13.1.0.tar.gz . # get the upgtfw package from wherever it was
> tar -xf upgt-firmware-2.13.1.0.tar.gz
> rm upgt-firmware-2.13.1.0.tar.gz
> mv upgt-firmware-2.13.1.0/* .
> rmdir upgt-firmware-2.13.1.0
> make
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
=> upgt-fw-2.13.1.0.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://weongyo.org/project/upgt/.
upgt-fw-2.13.1.0.tar.gz 100% of 22 kB 28 kBps
===> Extracting for upgt-firmware-kmod-2.13.1.0_1
=> MD5 Checksum OK for upgt-fw-2.13.1.0.tar.gz.
=> SHA256 Checksum OK for upgt-fw-2.13.1.0.tar.gz.
===> Patching for upgt-firmware-kmod-2.13.1.0_1
===> Configuring for upgt-firmware-kmod-2.13.1.0_1
===> Building for upgt-firmware-kmod-2.13.1.0_1
Warning: Object directory not changed from original /usr/src/sys/modules/usb/upgtfw/work/upgtfw
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
upgt-gw3887 upgt-gw3887
awk -f @/tools/fw_stub.awk upgt-gw3887:upgt-gw3887:21310 -mupgtfw -cupgtfw.c
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -c upgtfw.c
ld -d -warn-common -r -d -o upgtfw.kld upgt-gw3887.fwo upgtfw.o
:> export_syms
awk -f /usr/src/sys/modules/usb/upgtfw/work/upgtfw/../../../../../conf/kmod_syms.awk upgtfw.kld export_syms | xargs -J% objcopy % upgtfw.kld
ld -Bshareable -d -warn-common -o upgtfw.ko upgtfw.kld
objcopy --strip-debug upgtfw.ko
> make install
===> Installing for upgt-firmware-kmod-2.13.1.0_1
===> Generating temporary packing list
===> Checking if net/upgtfw already installed
install -o root -g wheel -m 555 upgtfw.ko /boot/modules
kldxref /boot/modules
===> Registering installation for upgt-firmware-kmod-2.13.1.0_1

Wow that looks like it worked; and now I get:
> kldload if_upgt
> kldstat
Id Refs Address Size Name
1 20 0xc0400000 bbbae4 kernel
2 1 0xc0fbc000 b260 if_wi.ko
3 1 0xc4a8d000 9000 i915.ko
4 1 0xc4a96000 14000 drm.ko
5 1 0xc5a88000 7000 if_upgt.ko
6 1 0xc5a8f000 9000 upgtfw.ko

I'd say that means upgt is loaded!
I'm pretty happy this is working, but is that the wrong advice in upgt(4)?
Reply With Quote
Old 22nd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Question How and where can I submit a patch?

I've now got a little blue light on the stick and /var/run/dmesg.boot shows recognition of the device:
ugen4.2: <GlobespanVirata> at usbus4
upgt0: <GlobespanVirata NETGEAR WG111, class 0/0, rev 2.00/10.40, addr 2> on usbus4
> usbconfig -u 4 -a 2 dump_device_desc
ugen4.2: <NETGEAR WG111 GlobespanVirata> at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
etc

To some extent I have network functionality:
> ifconfig wlan0 create wlandev upgt0
> ifconfig wlan0 up scan
> ifconfig wlan0 list scan
...shows my local wireless networks

Also:
> ifconfig upgt0
shows 'associated' but
> ifconfig wlan0
shows 'no carrier'

I guess all I have to do now is set up /boot/loader.conf, /etc/rc.conf and /etc/supplicant.conf as indicated by jb_daefo.

But can anyone tell me how and where to submit a patch for WG111V2_2 to if_upgt and also perhaps a patch to the upgt(4) man page? I've not actually generated a patch before so any links or advice would be appreciated.

Thanks very much to shep for those links which were instrumental and to BSDFan666 for confirming I needed to get the stick recognised before I started configuring.

Thanks also to jb_daefo, your advice now comes into play for me getting the network selected and authenticated.
Reply With Quote
Old 23rd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

Now wireless set up is by the book:
http://www.freebsd.org/doc/en_US.ISO...-wireless.html

Add the following lines to /boot/loader.conf.
upgt is the driver of course but the other two enable WPA authentication support.
> vi /boot/loader.conf
if_upgt_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

Enable services at start up and use supplicant for WPA:
> vi /etc/rc.conf
wlans_upgt0="wlan0"
wpa_supplicant_enable="YES"
ifconfig_wlan0="ssid thewirelessssid country AU DHCP"
# ifconfig_wlan0="WPA SYNCDHCP" # Might try this in a minute.
# ifconfig_wlan0="inet 10.0.1.104 netmask 255.255.255.0 ssid thewirelessssid"

WPA uses TKIP cipher or AES-CCMP cipher as WPA2 (or RSN).
WPA Personal is used unless you can run Radius.
> vi /etc/wpa_supplicant.conf
network={
ssid="thewirelessssid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="theverysecretwirelesswpakey"
}

Manually start network:
> /etc/rc.d/netif start
> wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf -B
> dhclient wlan0
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 10.0.1.1
bound to 10.0.1.101 -- renewal in 43200 seconds.
> ifconfig wlan0
Associated
Reply With Quote
Old 23rd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Thumbs up Netgear WG111V2_2 GW3887 chipset now working on boot using upgt and upgtfw using WPA

Supplicant does not seem to start or stay running when using the following /etc/rc.conf lines:

wlans_upgt0="wlan0"
wpa_supplicant_enable="YES"
ifconfig_wlan0="ssid thewirelessssid DHCP"

> ps aux | grep supplicant
<nothing>

But the following /etc/rc.conf does work:

wlans_upgt0="wlan0"
wpa_supplicant_enable="YES"
ifconfig_wlan0="ssid thewirelessssid"
ifconfig_wlan0="WPA SYNCDHCP"

Supplicant can be seen running with the following command line:
> ps aux | grep supplicant
/usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_s


I now get 'Associated' from ifconfig wlan0 as soon as I boot.
I'm very happy with that.
Thanks to every one for their help, especially shep.
Reply With Quote
Old 23rd September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Question Why does wpa_supplicant not run on start up?

Arggh, pesky thing, wpa_supplicant continues to fail on boot, even though I can start it manually. In fact as soon as I log in after reboot all I need to do is run wpa_supplicant and the network becomes associated and available.


In /etc/rc.conf I am now using:
Code:
wpa_supplicant_enable="YES"
wlans_upgt0="wlan0"
ifconfig_wlan0="inet 10.0.1.100 netmask 255.255.255.0 ssid thewirelessssid country AU channel 11"

# ifconfig_wlan0_alias0="inet 10.0.1.101 netmask 255.255.255.255 ssid thewirelessssid"
# ifconfig_wlan0_alias1="inet 10.0.1.102 netmask 255.255.255.255 ssid thewirelessssid"
# ifconfig_wlan0_alias2="inet 10.0.1.103 netmask 255.255.255.255 ssid thewirelessssid"
# ifconfig_wlan0_alias3="inet 10.0.1.104 netmask 255.255.255.255 ssid thewirelessssid"

# ifconfig_wlan0="country AU"
# ifconfig_wlan0="ssid thewirelessssid"
# ifconfig_wlan0="WPA SYNCDHCP"

In /boot/loader.conf:
Code:
if_upgt_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

In /etc/wpa_supplicant.conf:
Code:
network={
     ssid="thewirelessssid"
     scan_ssid=1
     key_mgmt=WPA-PSK
     psk="theverysecretwirelesswpakey"
}

I can run wpa_supplicant easily like this and it works:
> wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf


When BSD was starting supplicant on boot it was being run like this:
> /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_s


Can anyone tell me why supplicant is not running on start up?
Reply With Quote
Old 23rd September 2010
jb_daefo jb_daefo is offline
Package Pilot
 
Join Date: May 2008
Posts: 196
Thanked 5 Times in 5 Posts
Default

In the meantime, you can fashion an alias even useful
if the connection drops:
call it "netrestart" or something ?
Code:
sh /etc/rc.d/netif restart
if that command works.
while you figure out the post above fix(es)
...
maybe the alias interfaces are not bought up in time
for their rc.conf entries? (guessing, I could be way off
in that regard.)
__________________
using /LOOKAT/ with /var/db/pkg files and portmaster/aliases/pipes/find/grep to meteorically speedup port upgrades/installs...
Reply With Quote
Old 24th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
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
Old 24th September 2010
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

This is it! Read the man page!

man rc.conf says:
Code:
Also, if you want to configure your wireless interface with
wpa_supplicant(8) for use with WPA, EAP/LEAP or WEP, you need
to add ``WPA'' to the ifconfig_<interface> variable.
ok, so I add 'WPA' to my ifconfig_wlan0 value:
Code:
wlans_upgt0="wlan0"
wpa_supplicant_enable="YES"
ifconfig_wlan0="inet 10.0.1.100 netmask 255.255.255.0 WPA ssid thewirelessssid country AU channel 11"
And it works.

Now I'm having trouble setting up aliases on additional IPs on the interface.
I might stop boring everyone with the details though.
Thanks again to everyone who helped.
Reply With Quote
Old 12th March 2012
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default upgt set up different in release 9.0 how to build?

Ah, it's happening again.
I wonder if anyone can help me get upgt working again in release 9.0?
In release 8.2 upgt kernel module was not loaded and firmware needed build and install.
But in release 9.0 it seems pre-loaded in GENERIC kernel but it doesn't work.
My Globespan Virata NETGEAR WG111V2_V2 Prism GT wireless USB stick is not being recognised.
Ultimately when I try to create a network it says:
Code:
# ifconfig wlan0 create wlandev upgt0
  ifconfig: SIOCIFCREATE2: Device not configured
In release 8.2:
Code:
# usbconfig -u 4 -a 2 dump_device_desc
  idVendor = 0x0846 BayNETGEAR
  idProduct = 0x4240 WG111V2_2 PrismGT USB 2.0 WLAN
But in release 9.0:
Code:
# usbconfig -u 4 -a 2 dump_device_desc
  idVendor = 0x0846
  idProduct = 0x4240
It seems there is trouble fully mounting usbus4:
Code:
# cat /var/run/dmesg.boot
  Root mount waiting for: usbus4
  ugen4.2: <GlobespanVirata> at usbus4
  upgt0: <GlobespanVirata NETGEAR WG111, class 0/0, rev 2.00/10.40, addr 2> on usbus4
  Root mount waiting for: usbus4
  upgt-gw3887: root not mounted yet, no way to load image
  upgt0: could not read microcode upgt-gw3887
  device_attach: upgt0 attach returned 5
After a fresh release 9.0 install with src,
I got the upgt firmware from http://weongyo.org/project/upgt/upgt....13.1.0.tar.gz
The build was apparently different from release 8.2.
The following seemed to work:
Code:
# cp upgt-firmware-2.13.1.0.tar.gz /usr/ports/distfiles
# cd /usr/src/sys/modules/usb/upgt/
# make
# make install clean
But now kldload and kldstat seem to have changed.
In release 8.2:
Code:
# kldload if_upgt
# kldstat -v | grep upgt
  if_upgt.ko
  upgtfw.ko
As of release 9.0:
Code:
# kldstat -v | grep upgt
  329 uhub/if_upgt
# kldload if_upgt
  kldload: can't load if_upgt: File exists
# kldload if_upgt.ko
  interface if_upgt.1 already present in the KLD 'kernel'!
  kldload: can't load if_upgt.ko: File exists
# kldload /boot/kernel/if_upgt.ko
  interface if_upgt.1 already present in the KLD 'kernel'!
  kldload: can't load /boot/kernel/if_upgt.ko: File exists
Seems upgt is already built and loaded. if_upgt.ko is in /boot/kernel.
In release 8.2 /boot/loader.conf was used to load if_upgt at boot.
In release 9.0 upgt, tkip, ccmp are all present in the /usr/src/sys/i386/conf/GENERIC kernel.
But ifconfig is still saying SIOCIFCREATE2: Device not configured;
even after rebuilding upgt firmware again as above and then rebuilding the kernel.
I'm on the verge of removing if_upgt from the kernel in order to try loading in /boot/loader.conf, as I did in release 8.2.

But kldstat reports if_upgt but not upgtfw as I saw in release 8.2.
Is that the problem? I STILL haven't got the firmware installed properly?
I noticed the upgt build sometimes mentioned upgt-firmware-2.13.1.0.tar.gz and sometimes upgt-fw-2.13.1.0.tar.gz
I don't actually see a separate upgtfw though. Where has the upgtfw gone? Should I be attempting to load upgtfw as well?

Code:
# uname -a
FreeBSD engine.local 9.0-RELEASE FreeBSD 9.0-RELEASE #1: Sun Mar 11 23:47:10 EST 2012     root@engine.local:/usr/obj/usr/src/sys/VESAKERN  i386
Reply With Quote
Old 20th March 2012
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

There's another thread about building upgt that resolves this, thanks to Carpetsmoker, but FYI here:
There are two files.
However, the build looks for fw and since it's not there tries to download but there's no network, that's why it's needed. Catch 22.
So:
Put the fw zip in /usr/ports/distfiles
Put the other zip, probably anywhere, but I unpacked it in /usr/src/sys/modules/usb/upgtfw/
Then in that directory, "make" and "make install".
Since in release 9.0 everything else is pre-loaded in kernel I'd like to do the same with upgtfw but "device upgtfw" is rejected in the kernel conf file. There are other "device ****fw" lines but it doesn't work in this case.
So to load it dynamically at boot use /boot/loader.conf and add this line: upgtfw_load="YES"
Then reboot. USB wireless stick should be recognised properly.
Now you can use what you paid for.
Thanks to all those that made this possible.
Reply With Quote
Old 16th June 2013
AnilG AnilG is offline
Real Name: Anil Gee
Port Guard
 
Join Date: Sep 2010
Location: Sydney Australia
Posts: 20
Thanked 0 Times in 0 Posts
Default

I just wanted to update this thread since things have changed at least as at 2013 onwards.
The upgt driver and proprietary firmware are required to drive the Netgear WG111V2_2.
The adaptor wasn't recognised in FreeBSD 8.1 so I patched it and my patches were accepted into 8.2.
I'm not sure if it's entirely clear from this thread but I did get the Netgear WG111V2_2 working as normal.

However, it stopped being recognised again in FreeBSD 9.0. Something about a Cohiba device being accepted instead.
I assumed this to be a fault in the driver since the patch had been working, so I gave up and bought a Netcomm NP910N.
This uses the ran0 driver which seems more familiar to FreeBSD and worked out of the box.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW do I ENABLE the wireless device?? bforest FreeBSD General 2 30th January 2009 05:54 PM
Can gmirror be configured during sysinstall? PeterSteele FreeBSD Installation and Upgrading 3 13th November 2008 12:46 AM
Sound missing, no configured soundcard. tobox FreeBSD General 4 26th July 2008 12:03 AM
Netgear Rangemax Wireless-N (WN311T) on FreeBSD [solved] vi5in FreeBSD General 0 12th May 2008 11:09 PM


All times are GMT. The time now is 10:28 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick