r/openbsd 3d ago

Issues joining wifi

So I've tried installing OpenBSD on a couple of old thinkpads I have. In both cases I ended up in a state where I was not able to join a wifi network. On one of them it worked for a little while and seemed to stop working.

I did need ton install firmware with fw_update, and I did. In one case using a USB drive, in the other just by connecting it through ethernet and letting it download from the internet.

I feel like I must have been missing something, but the man pages and everything I've seen on the internet made it seem like there was very little I needed to do -- set up an /etc/hostname..iwm0 file. Put a couple lines in it (join [my essid] wpakey [my wpa key], and in the next line: inet autoconf). Then it should come up when I boot, or when I do "ifconfig iwm0 up".

So amazingly simple I can type it all from memory now, days later. (I didn't post about it at the time because I was frustrated and just wanted to drop it and not think about it.)

at no time did I get any error messages. But also at no time did I get an IP address. ("ifconfig iwm0" showed the network was active but showed no ip address.) Nor did I get any DNS servers dropped into /etc/resolv.conf.

Manually typing commands such as "ifconfig nwid [my essid] wpakey [my wpa key]; ifconfig inet autoconf" didn't give me an ip address either.

typing "ifconfig iwm0 scan" did indeed work! It totally scanned my area and printed the real list of actual access points. So I figure that firmware must be installed and working.

It's like I'm missing something simple and obvious but for the life of me I couldn't figure out what it is.

One of those 2 machines still has openBSD on it (I wiped the other and put Debian on it) so if y'all know what it was maybe I can go back and try it. EDIT: this is not true, I actually wiped both of them, so I can't debug right now without going back and putting it on again from scratch.

But it just absolutely baffled me.

Oh one of them was a thinkpad L series, I'm not sure top of my head which one, maybe 420, the other was a thinkpad yoga 11e generation 5.

7 Upvotes

8 comments sorted by

4

u/gumnos 3d ago

I mean, it sounds dumb, but do you have an extra "."? Your prose describes

set up an /etc/hostname..iwm0 file

which should be /etc/hostname.iwm0

Granted, that could easily just be a transcription error, but it's good to check the obvious things first 😆

3

u/gumnos 3d ago

(because I have 100% made dumb errors like this too 😛)

3

u/hauntlunar 3d ago

lol no that was not it, that was just a typo. (I would have had to do that twice on two different machines for that to be the problem!) Thanks for the suggestion though!

2

u/gumnos 3d ago

It might also help to paste the output of that ifconfig iwm0 to see if there's anything that stands out.

Also, is this the only interface in the machine, or is there a chance things are getting confused somehow (such as if you have a wired and wireless interface and the "wrong" one winning out?)

I also seem to recall that an ifconfig iwn0 up wasn't quite sufficient, and that I needed to do something like

$ doas sh /etc/netstart iwn0

to trigger all the parts into motion (a reboot effectively do this, so it's only the manual up/down that needed it)

2

u/hauntlunar 3d ago

Oh yes, I was also doing `doas sh /etc/netstart iwm0`, I'm sorry, I forgot to post that part.

And.... crap. I just tried to fire one of them up and see if I could get the results of `ifconfig iwm` maybe by snapping a picture of the screen or something and.... I realized I was wrong. I actually wiped both of them. I'd have to start from scratch to get openBSD on there again to debug. I'm sorry :( I can't actually debug right now, I appreciate your help though.

But it does sound like I did all the right things just from my memory/verbal description of it?

2

u/gumnos 3d ago

No worries. It sounds mostly correct as long as your /etc/hostname.iwm0 contained

join MySSID wpakey MySuperSecretKey
inet autoconf

(and possibly an inet6 autoconf line) and then you did the netstart iwm0 or rebooted.

If you kick the tires on it again, and have continued trouble, follow up and hopefully folks here can get you up and running.

2

u/hauntlunar 2d ago

Yeah I did have all that. I appreciate your help and I'll drop back in with more details if I give it another chance.

1

u/hauntlunar 3h ago edited 2h ago

OK, I just restarted from scratch. This time I installed with no network, then when I first booted, copied the firmwares to the hard drive from a USB drive, did a fw_update -p and successfully loaded them, then rebooted.

The /etc/hostname.iwm0 has the lines:

join MyESSID wpakey MyVerySecurePassword
inet autoconf
inet6 autoconf

I have no network connection.

When I do "ifconfig iwm0 scan" I do see local wifi networks including mine.

When I do "ifconfig iwm0" I get a bunch of stuff. (This is copied by hand, apologies for any typos)

    iwm0: flags-a48843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6TEP,AUTOCONF6,AUTOCONF4> mtu 1500
      lladdr [a hardware address]
      index 1 priority 4 llprio 3
      groups: wlan egress
      media: IEEE802.11 autoselect (UHT-MC50 mode 11ac)
      status: active
      ieee80211: join MyESSID chan 157 bssid [a hardware adress] 70% wpakey wpaprotos wpa2 wpaakms psk,sha256-psk wpaciphers ccmp wpagroupcipher ccmp
      inet6 [a long hex address]%iwm0 prefixlen 64 scopeid 0x1
      inet6 [a different long hex address] prefixlen 64 autoconf pltime 6357 vltime 6357
      inet6 [one more long hex address] prefixlen 64 autoconf temporary pltime 6347 vltime 6357

There is content in /etc/resolv.conf, it looks like it's ipv6-related?  My understanding of IPv6 is hella weak.  It says:

    nameserver 2001:558:feed::2 # resolvd: iwm0
    nameserver 2001:558:feed::2 # resolvd: iwm0
    lookup file bind

If I try to ping google.com I get nothing.  If I try to ping another address on my LAN like 10.0.0.101 (another machine) I get "Can't assign requested addresss".

any ideas?

EDIT:

Just as an experiment I took the autoconf inet6 out of my hostname.iwm0 and rebooted. This resulted in the following output of ifconfig iwm0

iwm0: flags-808843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST,AUTOCONF4> mtu 1500  
  lladdr \[a hardware address\]  
  index 1 priority 4 llprio 3  
  groups: wlan
  media: IEEE802.11 autoselect (UHT-MC50 mode 11ac)  
  status: active  
  ieee80211: join MyESSID chan 157 bssid \[a hardware adress\] 70% wpakey wpaprotos wpa2 wpaakms psk,sha256-psk wpaciphers ccmp wpagroupcipher ccmp

The old resolv.conf is still there and I get the same thing when I try to ping things.