DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th July 2020
dnslc dnslc is offline
Port Guard
 
Join Date: Jun 2020
Location: Australia
Posts: 12
Default NetBSD urtwn help

I am trying to get a wifi adapter to work on NetBSD 9.0 ARMv7 on a raspberry pi.
I am using an EdiMax EW-7811Un (which `$ man urtwn' says is supported, and it also works just fine on OpenBSD).
When I plug it in I get this:
Code:
 # dmesg
[ 100181.265897] urtwn0 at uhub1 port 3
[ 100181.265897] urtwn0: Realtek (0x7392) 802.11n WLAN Adapter (0x7811), rev 2.00/2.00, addr 5
[ 100181.345909] urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 74:da:38:f1:9e:16
[ 100181.365908] urtwn0: 1 rx pipe, 2 tx pipes
[ 100181.365908] urtwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
[ 100181.365908] urtwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
Code:
 # ifconfig
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 74:da:38:f1:9e:16
        media: IEEE802.11 autoselect (DS1)
        status: no network
On OpenBSD, I typically just (update firmware since urtwn is not supported by default with `# fw_update) make a file called /etc/hostname.urtwn0
with
Code:
nwid <my network>
wpakey <password>
dhcp
to get the network name I can run `# ifconfig urtwn0 scan'
but this is not the same on NetBSD.

I have tried reading both `man urtwn' and `man ifconfig.if', but I don't think I understood what they wanted.
I tried making a /etc/ifconfig.urtwn0 file with
Code:
nwkey <password>
dhcp
and then running
Code:
# ifconfig urtwn0 nwid <my network>
but the terminal just hangs and ctrl-c or ctrl-z wont even let me exit out of it. I have to yank the actual wifi adapter out, and it feels really hot.

Does anyone have experience with this?

Edit:
I'm not sure if this has done anything, but I had some luck with
Code:
# ifconfig urtwn0 ssid my_network nwkey my_password
But the network is still not active
Code:
 # ifconfig urtwn0
urtwn0: flags=0x8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ssid my_network nwkey my_password
        powersave off
        address: 74:da:38:f1:9e:16
        media: IEEE802.11 autoselect
        status: no network
And I have a new message when I check `dmesg'
Code:
[ 101811.686842] urtwn0: autoconfiguration error: could not load firmware page 0

Last edited by dnslc; 5th July 2020 at 06:30 PM.
Reply With Quote
  #2   (View Single Post)  
Old 5th July 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,062
Default

Disclaimer: I know nothing about NetBSD.

NetBSD's urtwn(4) man page states:
Code:
FILES 
     The driver needs the following firmware files, which are loaded when an
     interface is attached:

           /libdata/firmware/if_urtwn/rtl8188eufw.bin
           /libdata/firmware/if_urtwn/rtl8192cfw.bin
           /libdata/firmware/if_urtwn/rtl8192cfwU.bin
Are these installed? As for WPA/WPA2, you'll need to use wpa_supplicant(8).
Reply With Quote
  #3   (View Single Post)  
Old 5th July 2020
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 926
Default

Hi, and welcome to daemonforums!

I may be able to provide a small amount of help, but should start by saying I haven't used NetBSD in a few years. Also I don't have your exact USB wireless device (though my laptop has the PCI version of it).

For ifconfig, it appears from the man page that nwkey is used to set a WEP password. I don't know if that's what you intended to use, probably not, but WEP is now deprecated for good reason. I recall having to use wpa_supplicant for WPA-type encryption on NetBSD ... I don't know if that's still a requirement or not.

Given your firmware loading error message, the possible mistaken use of nwkey may not be the primary issue. Perhaps someone else more up-to-date on these things can weigh in.

Oh, and I should add as general background, on NetBSD you may also want to familiarize with the wlanctl(8) tool .
Reply With Quote
  #4   (View Single Post)  
Old 4 Weeks Ago
dnslc dnslc is offline
Port Guard
 
Join Date: Jun 2020
Location: Australia
Posts: 12
Default

Quote:
Originally Posted by jggimi View Post
Disclaimer: I know nothing about NetBSD.

NetBSD's urtwn(4) man page states:
Code:
FILES 
     The driver needs the following firmware files, which are loaded when an
     interface is attached:

           /libdata/firmware/if_urtwn/rtl8188eufw.bin
           /libdata/firmware/if_urtwn/rtl8192cfw.bin
           /libdata/firmware/if_urtwn/rtl8192cfwU.bin
Are these installed? As for WPA/WPA2, you'll need to use wpa_supplicant(8).
Yes this was the problem, I was using the wrong tools, wpa_supplicant is what I needed.
Thanks for pointing me in the right direction.
I also found this guide which seems to of worked https://wiki.netbsd.org/tutorials/ho...pa_supplicant/
Reply With Quote
  #5   (View Single Post)  
Old 4 Weeks Ago
dnslc dnslc is offline
Port Guard
 
Join Date: Jun 2020
Location: Australia
Posts: 12
Default

Thanks to that guide I have manage to get it working, but after awhile the wifi adapter just goes offline.
I get this message:
Code:
armv7$ packet_write_wait: Connection to 192.168.0.117 port 22: Broken pipe
Then I have to go to the raspberry pi and unplug the adapter and then plug it in again. Then I can ssh back in and have internet access etc.

I have tried
Code:
$ apropos packet_write_wait | grep packet_write_wait
but nothing comes up.
I am going to look through some /etc/ files in the hope that setting is there somewhere, but otherwise I am not sure why this happens.
Reply With Quote
Reply

Tags
armv7, netbsd, raspberry pi, urtwn

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


All times are GMT. The time now is 02:33 AM.


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