First things first: your hostname.urtwn0
file looks good and if you had a mistake in there you'd get completely different error messages.
The message urtwn0: failed loadfirmware of file urtwn-rt18192cfwT (error 2)
indicates that the firmware isn't installed in the proper location:
As explained in loadfirmware(9)
, this function returns errno
style error codes: and errno(2)
explains:
2 ENOENT No such file or directory.
A component of a specified pathname did not exist, or the pathname
was an empty string.
There should be a file /etc/firmware/urtwn-rt18192cfwT
for the driver to load.1 Most likely you won't find this file in your tree.
1See the end of the answer for more details
Assuming you have some way of connecting your box to the internet:
Try running fw_update -v
to install the firmware and ensure that the files are in the right place and not corrupted. If you're lucky, that's all you need to do.
If this fails, you can try to install the firmware from packages or ports (read this FAQ first!). My local mirror doesn't have any urtwn
-related packages, so you probably need to use the ports tree.
Set up the ports tree as explained in the FAQ, then run make install
as root from /usr/ports/sysutils/firmware/urtwn
.
If you can't connect your box to the internet:
The firmware can be downloaded by hand from http://firmware.openbsd.org/firmware-dist/urtwn-1.1p0.tgz
. Grab it from there, throw it on a USB stick and copy it to your OpenBSD box. Extract the archive and move the files urtwn-*
to /etc/firmware/
.
If this works, it is a good idea to run fw_update -v
once you have network connectivity. That way, the firmware will be monitored and upgraded if necessary by the system maintenance scripts.
If all this doesn't help, you should probably ask on the mailing lists. The people there are generally friendly and helpful if you've done your homework2.
2 The driver is mentioned a few times on [email protected]. For example, there were some usb-related issues, check if anything might be related to what you see before posting.
Added:
I now looked at the source code, and the only way you can get this error message is from the function urtwn_load_firmware()
, in sys/dev/usb/if_urtwn.c
at line 2194
:
/* Read firmware image from the filesystem. */
if ((sc->chip & (URTWN_CHIP_UMC_A_CUT | URTWN_CHIP_92C)) ==
URTWN_CHIP_UMC_A_CUT)
name = "urtwn-rtl8192cfwU";
else
name = "urtwn-rtl8192cfwT";
if ((error = loadfirmware(name, &fw, &len)) != 0) {
printf("%s: failed loadfirmware of file %s (error %d)\n",
sc->sc_dev.dv_xname, name, error);
return (error);
}
The function loadfirmware()
(in sys/dev/firmload.c
) generates the path /etc/firmware/urtwn-rtl8192cfwT
and tries to load that file into the memory of your USB adapter. Since it can't find the file, you get the error message you reported.