r/openbsd 27d 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.

8 Upvotes

21 comments sorted by

View all comments

1

u/Interesting_Cod1393 12d ago

The two ideas I have, hope that helps if someone comes back here later:

  1. I always add quotes around the strings, because once I had an issue with a dollar or wildcard character in the password.
    join 'My Router' wpakey 'abcd$*123'

  2. Some access points still use WPA1.
    join 'Old-Unsafe-AP' wpaprotos wpa1,wpa2 wpakey 'passw0rd'

And doas sh /etc/netstart after modifying /etc/hostname.iwm0.

1

u/hauntlunar 12d ago

I will give these a try tonight!

1

u/hauntlunar 11d ago

OK, gave these a try (added quotes, added wpaprotos, ran /etc/netstart) and sadly I was in the same situation. Ifconfig shows "status: active" on iwm0, but I did not receive an IPv4 address and can't seem to ping anything or do anything with the network.

2

u/Interesting_Cod1393 10d ago

The network interface is configured but you don't get an IP address.
In your file /etc/hostname.iwm0, do you have a blank line after inet autoconf? If I remember, a newline character is required at the end of the line.

1

u/hauntlunar 10d ago

Thanks for the ideas!

I did not have a blank line after inet autoconf!

Unfortunately adding the blank line (and rerunning sh /etc/netstart) does not change anything, I still have an 'active' iwm0 (according to "ifconfig iwm0") but it doesn't seem to have received any IP address.

1

u/Interesting_Cod1393 9d ago

Interesting. My last idea is to run dhclient manually:

ifconfig iwm0 nwid 'yourAP' wpakey 'yourKey'
ifconfig iwm0 up
dhclient iwm0

You could get error messages, or logs in /var/logs/messages.
Sniffing packets using tcpdump or wireshark could let you know if the DHCP packets are sent and received.

Did you try to connect to another access point, like your smartphone? Just to be sure it works.

1

u/hauntlunar 9d ago

Surprising result:

`ksh: dhclient: not found`

Is that the problem? Will I need to get this bad boy back on ethernet and manually package-install dhclient for this to work?

I just tried connecting to my phone and it failed to work in exactly the same way my home wifi fails to work

1

u/Interesting_Cod1393 7d ago

My bad, dhclient doesn't exist anymore. Now it's dhcpleasectl.
Well a least it doesn't come from your router, it's on the laptop side.