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 5 Days Ago
apfelgluck apfelgluck is offline
New User
 
Join Date: Sep 2016
Location: France
Posts: 5
Default Very slow WiFi

Hello,


I bought a small PC Engines APU2C4 [1][2] with the wle200nx wireless module [3][4].
I installed OpenBSD 6.0 without any problems but I have an issue with the wireless module : the "link" is very slow when I successfully connect it (some times I can't).

My mobile phone is a Honor 5C (Android 6.0) and connect perfectly to other WiFi Access Point (Raspberry Pi 3, various Internet ADSL boxes...) with a speed up to 50 or 70 Mb/s.
Connected to my PC Engines, my phone displays only 1 Mb/s speed link and the connection is not usable : every apps and Web pages time out.

The strange thing is that with the PC Engines antennas, the power signal is -28/32 dBm versus a "poor" -45/54 dBm on my Raspberry Pi 3.

To avoid channel interferences, I switched off the WiFi on my Internet box and Raspberry Pi 3 with no changes

I will try tomorrow with another mobile phone to check if it comes from mine or from the PC Engines...

Below are some inputs and config files, if it can give you some clues...



I ran the command "fw_update" after completing the installation.
Code:
$ fw_update -in
Installed: athn-firmware-1.1p1

Code:
$ cat /etc/hostname.athn0
nwid            pcengines
wpa
wpaprotos       wpa2
wpakey          123456789 # I know it's weak, will change it if I make it work
media autoselect mediaopt hostap mode 11g
up
inet            192.168.50.1 255.255.255.0

Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect (autoselect hostap)
        status: active
        ieee80211: nwid pcengines chan 3 bssid XX:XX:XX:XX:XX:XX wpakey 0x17ddcbf015970cf8bacc8b0702bc2babeb14c93b63ad694f60b115033d055a4c wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255

Code:
$ cat /etc/dhcpd.conf
option domain-name-servers 192.168.0.1;
default-lease-time 3600;
max-lease-time 86400;
authoritative;

subnet 192.168.50.0 netmask 255.255.255.0 {
        range 192.168.50.20 192.168.50.100;
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.50.255;
        option routers 192.168.50.1;
        option domain-name-servers 192.168.0.1;
        option ntp-servers 192.168.0.1;

        host honor5c {
                hardware ethernet XX:XX:XX:XX:XX:XX;
                fixed-address 192.168.50.10;
        }
}

Code:
$ cat /etc/pf.conf
match out on em0 inet from athn0:network to any nat-to (em0) port 1024:65535
set skip on lo
block return            # block stateless traffic
pass                    # establish keep-state
# By default, do not permit remote connections to X11
block return in on ! lo0 proto tcp to port 6000:6010


[1] http://pcengines.ch/apu2c4.htm
[2] http://pcengines.ch/pdf/apu2.pdf
[3] http://pcengines.ch/wle200nx.htm
[4] http://pcengines.ch/pdf/wle200nx.pdf


Thanks in advance for your help !
Reply With Quote
  #2   (View Single Post)  
Old 5 Days Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,228
Default

Hello, and welcome!

1Mb connection might be 802.11b. If the NIC is defaulting to 11b, you should be able to force 802.11g with ifconfig(8) mode 11g.

Unfortunately, 802.11n is not yet available except for two Intel drivers: iwn(4) and iwm(4).
Reply With Quote
  #3   (View Single Post)  
Old 5 Days Ago
apfelgluck apfelgluck is offline
New User
 
Join Date: Sep 2016
Location: France
Posts: 5
Default

Hello jggimi,


I tried multiple versions of "hostname.athn0" but it does not enable mode 11g at boot

Code:
$ cat /etc/hostname.athn0
mode            11g
mediaopt        hostap
nwid            pcengines
wpa
wpaprotos       wpa2
wpakey          123456789
inet            192.168.50.1 255.255.255.0
Right after boot.
Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect (autoselect hostap)
        status: active
        ieee80211: nwid pcengines chan 2 bssid XX:XX:XX:XX:XX:XX wpakey 0x17ddcbf015970cf8bacc8b0702bc2babeb14c93b63ad694f60b115033d055a4c wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
I have to exec "sh /etc/netstart" to enable the mode 11g.
Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect mode 11g hostap
        status: active
        ieee80211: nwid pcengines chan 2 bssid XX:XX:XX:XX:XX:XX wpakey 0x17ddcbf015970cf8bacc8b0702bc2babeb14c93b63ad694f60b115033d055a4c wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
I can connect it with my phone but the speed stay at 6 Mb/s and there is no Internet connection from the phone
Reply With Quote
  #4   (View Single Post)  
Old 5 Days Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,228
Default

My recollection is that mode must be used with mediaopt.

Try $ ifconfig athn0 media to see all valid provisioning options. Then, test using the ifconfig(8) command manually.
Reply With Quote
  #5   (View Single Post)  
Old 5 Days Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,228
Default

And even at 6Mb, you should be able to obtain an internet connection. In order for OpenBSD to route packets between network interfaces, packet forwarding must be enabled. Double check your sysctl values. To forward IPv4 packets, set net.inet.ip.forwarding to 1.
Reply With Quote
  #6   (View Single Post)  
Old 5 Days Ago
apfelgluck apfelgluck is offline
New User
 
Join Date: Sep 2016
Location: France
Posts: 5
Unhappy

Hello,


With this setting, WiFi is activated on boot.
Code:
$ cat hostname.athn0
up media autoselect mode 11g mediaopt hostap nwid pcengines wpa wpakey 123456789 wpaprotos wpa2
inet 192.168.50.1 255.255.255.0
Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect mode 11g hostap
        status: active
        ieee80211: nwid pcengines chan 3 bssid XX:XX:XX:XX:XX:XX wpakey 0x17ddcbf015970cf8bacc8b0702bc2babeb14c93b63ad694f60b115033d055a4c wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
But I'am still stucked at 1-6 Mb/s => timout on apps and Internet browsing

About the no Internet connection I mentioned earlier : I forgot to say ipv4 forwarding was already set in "sysctl.conf".
Reply With Quote
  #7   (View Single Post)  
Old 4 Days Ago
apfelgluck apfelgluck is offline
New User
 
Join Date: Sep 2016
Location: France
Posts: 5
Default

Some news...

I try to boot with an empy "hostname.athn0" conf file and no dhcpd service.
So I get :
Code:
$ ifconfig athn0
athn0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect
        status: no network
        ieee80211: nwid ""
Then I execute :
Code:
$ ifconfig athn0 up media autoselect mode 11g mediaopt hostap wpa nwid pcengines wpakey 123456789 wpaprotos wpa2
$ ifconfig athn0 inet 192.168.50.1
And I get :
Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr XX:XX:XX:XX:XX:XX
        index 4 priority 4 llprio 3
        groups: wlan
        media: IEEE802.11 autoselect mode 11g hostap
        status: active
        ieee80211: nwid pcengines chan 3 bssid XX:XX:XX:XX:XX:XX wpakey 0x17ddcbf015970cf8bacc8b0702bc2babeb14c93b63ad694f60b115033d055a4c wpaprotos wpa2 wpaakms psk wpaciphers tkip,ccmp wpagroupcipher tkip
        inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
Then I launch dhcpd service.

And I can not join the Access Point : I get a timout or a bad password error message
Reply With Quote
  #8   (View Single Post)  
Old 4 Days Ago
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,232
Default

Quote:
Originally Posted by apfelgluck View Post
Then I execute :
Code:
$ ifconfig athn0 up media autoselect mode 11g mediaopt hostap wpa nwid pcengines wpakey 123456789 wpaprotos wpa2
$ ifconfig athn0 inet 192.168.50.1
Executing:

$ ifconfig athn0 inet 192.168.50.1

...assigns an IP address manually to the interface. If your goal is to have the IP address assigned automatically through a centralized DHCP server, the commands issued need to be:
Code:
# ifconfig athn0 up media autoselect mode 11g mediaopt hostap wpa nwid pcengines wpakey 123456789 wpaprotos wpa2
# dhclient athn0
Reply With Quote
  #9   (View Single Post)  
Old 4 Days Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,228
Default

Do you have both your wirless NIC (athn0) and your wired NIC (em0) on the same subnet? If so, this might be why you are having trouble. OpenBSD's network stack does not permit the use of two NICs on the same subnet unless they are special purpose, such as carp(4) or trunk(4).
Reply With Quote
Old 3 Days Ago
apfelgluck apfelgluck is offline
New User
 
Join Date: Sep 2016
Location: France
Posts: 5
Default

Quote:
Originally Posted by jggimi View Post
Do you have both your wirless NIC (athn0) and your wired NIC (em0) on the same subnet?
No, they are on different subnets.
Reply With Quote
Old 3 Days Ago
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,228
Default

I am aware that the user community consensus is that hostap mode, when available on OpenBSD drivers, is not always as effective as infrastructure mode. However, you should be able to pass packets, even if the transfer rate is lower.

Based on the information provided, I recommend reaching out to the larger OpenBSD community on the misc@ mailing list. You are likely to find people with the same mix of hardware components.

If you do decide to take the issue there, please be sure to post as much information about the problem and your configuration as you can. You need not post actual Internet facing addresses, but you should include a full dmesg(8) and the output of $ ifconfig in your informal problem report.
Reply With Quote
Reply

Tags
apu2c4, pc engines, 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
Slow SSH login flit OpenBSD General 3 16th May 2013 08:29 PM
Anonymous Ftp is too slow daemonfowl OpenBSD General 25 4th August 2012 12:50 AM
Does anyone know why Gnome is so slow on BSD? TerryP General software and network 11 27th August 2010 06:06 PM
Why is FreeBSD dd so slow? sharris FreeBSD General 10 18th June 2010 08:33 AM
slow io from hdd knasbas OpenBSD General 3 25th July 2009 02:51 AM


All times are GMT. The time now is 12:20 PM.


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