DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 30th May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default wifi connection instability at work

I have a T400 Thinkpad with Atheros AR9281 wireless card. My daily driver OS is OpenBSD 6.5, but I have Devuan GNU/Linux on a second hard drive.

My wifi connection when using Devuan is solid both at home and at work. On OpenBSD, wifi connection is always solid at home. At work, it starts out good but after a variable length of time (sometimes more than an hour) the connection becomes periodically slow, then a bit later there is no internet access at all. I need to reboot or 'doas sh /etc/netsart' to get connected again. I already ran 'doas fw_update' so my firmware is up-to-date.

The only differences between home router and work router (that I know of) is that at home I have a wifi password and my ancient router does 11g but not 11n; at work there is no password and a much newer router that does have 11n.

I need a more experienced hand to help me in two ways:

1) How should I edit my /etc/hostname.athn0 to force 11g at work? I already tried this, but the syntax must be incorrect because it makes things worse:
Code:
join homeSweetHome wpakey myPassWord
join workBitterWork mode 11g 
dhcp
And this seems to have no effect (output of 'ifconfig athn0' does not show mode 11g):
Code:
!ifconfig \$if mode 11g
join homeSweetHome wpakey myPassWord
join workBitterWork
dhcp
2) Other than forcing 11g at work, can you think of anything else I could try in order to get a more stable wireless internet connection at work? Could the lack of a password at work be somehow introducing some instability?

Thanks for any help you can give this noobie

Last edited by brudan; 30th May 2019 at 03:28 PM.
Reply With Quote
  #2   (View Single Post)  
Old 30th May 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

$ ifconfig athn0 media should show supported media and mode settings. Back when I was setting a wireless NIC to force 11b rather than the newfangled-at-the-time 11g, I recall having to set both media and mode.
Reply With Quote
  #3   (View Single Post)  
Old 30th May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Thank you, jggimi. That did the trick! I can confirm that having this in /etc/hostname.athn0 has the intended effect of forcing 11g at work:

Code:
join homeSweetHome wpakey myPassWord
join workBitterWork media autoselect mode 11g 
dhcp
Fingers crossed that it helps make my wireless connection more stable! If there are other settings I can change to make the connection less newfangled/more likely to be stable, please let me know.
Reply With Quote
  #4   (View Single Post)  
Old 30th May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

I just rebooted a few times, got mode 11g several times but one time I got something different:

Code:
bruno@thinkpad:~321$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:26:b6:8e:50:b4
        index 2 priority 4 llprio 3
        groups: wlan egress
        media: IEEE802.11 autoselect (OFDM24 mode 11a)
        status: active
        ieee80211: join workBitterWork chan 36 bssid 00:e1:6d:63:57:4a -62dBm
        inet 10.1.86.92 netmask 0xffffe000 broadcast 10.1.95.255
Why is the mode 11a when I specifically ask for 11g in /etc/hostname.athn0?
Reply With Quote
  #5   (View Single Post)  
Old 30th May 2019
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I will guess that 11g (2.4 GHz) is not available or degraded, so 11a (5 GHz) was selected instead. 11a and 11g use the same transmission mechanism, OFDM, but on different bands.
Reply With Quote
  #6   (View Single Post)  
Old 31st May 2019
brudan brudan is offline
Fdisk Soldier
 
Join Date: Dec 2018
Posts: 82
Default

Good news: Two days using mode 11a at work and no issues (issue recurred with 11g, so I decided to try 11a).

The only thing is that I was never able to figure out what to put in /etc/hostname.athn0 in order to consistently enforce 11a at work. Instead, I am running this script as regular user at boot:

Code:
#!/bin/sh
sleep 5
ifconfig athn0 | grep -q work && doas ifconfig athn0 mode 11a
Not the cleanest solution, but it works reliably.

Last edited by brudan; 5th June 2019 at 12:12 PM.
Reply With Quote
Reply

Tags
11n, athn0, hostname.if, solved, wifi

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
PF - connection limit per ip bryn1u FreeBSD Security 1 12th May 2020 11:10 PM
Wifi script to display current connection shep OpenBSD General 16 1st May 2019 02:26 PM
TEW-649UB usb wifi adapter doesn't work jakeswen OpenBSD General 4 26th July 2016 08:30 PM
Working dial-up connection - No Client Connection vigol FreeBSD General 5 22nd November 2009 10:59 PM
Losing connection with Atheros wifi noonereallycares FreeBSD General 2 11th June 2008 03:57 AM


All times are GMT. The time now is 11:55 PM.


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