(solved)Can anyone help me diagnose my wifi problems?

Hi

I have two computers (netbooks) where I have installed Haiku on bare metal.

One Asus EEE 900 that was delivered with Linux. It has built in wifi with Atheros AR242x chipset.
I had Haiku beta 3 on that for a while and then Wifi worked.
When I upgraded to beta 4 the wifi almost stopped working. A few times I managed to get it to connect.
When beta 5 was released I decided to try by clearing the drive and reinstall instead of upgrading.
With beta 5 I have managed to connect to my router twice, enough to be able to save the password. But since I have not been able to connect again.

One Acer Aspire One 725 with AMD C60 processor, a 64 bit processor. It has an built in broadcom wifi that does not have a driver in Haiku.
Therefore I was happy when beta 4 included support for usb wifi cards. I have a TP-Link TL-WN321G I bought many years ago because of its Linux compatibility.
It is based on Ralink RT25xx chipset.
With that card I have never been able to connect.
This computer is now upgraded from beta 4 to beta 5.

With both computers I have the same symptoms.

I do see networks in Network Status and are able to select the network I would like to connect to.
The signal strenght indicator always shows a much lower value than on other devices at the same location, or on the same device booted with any other OS.
I enter the network password and wait. After a time out period I get back to the sign in dialogue window again with the error message "It was not possible to join the network (Incorrect password?)
For every attempt the list of available networks become shorter and shorter, It is not unusal to see “No networks available” after a while. Even though I live in a block of apartments where I usually see more than 10 wifi networks.

I have tried with another router of a different brand with the same results.

Sometimes Haiku shows a list of 4-5 wifi networks, but not mine, even though I am in the same room as the router and max 4 meters away.

I have tried ifconfig /dev/net/…/0 scan and ifconfig /dev/net/…/0 join with the same results and no error messages. There the signal strenght is displayed as about 25.

Are there any other Terminal commands that can be used to control the wifi connection that might give me more information or better error messages?

I have heard of the syslog. I have looked there and see lots of lines regarding wifi, but no error message. Does those lines give any relevant information?

Are there any other log file available that is relevant for wifi? Can I turn on more logging?

As I understand it there are different regulations on the frequencies used by wifi in different parts of the world.
Can it be that Haiku is missing information on what is allowed in my country and the wifi cards therefore works in some “Safe mode” with limited signal strength?

Is there any way I can manually request the list of available networks to be rescanned? How often does the list of networks refresh automatically?

Is there a way to let it update less frequently? Can it be that the system does refresh the list of networks while I enter the password and then it does not know which network my password should be used with?

Are there anyting I can install from HaikuDepot that can assist me in investigating these wifi issues?

I have tried the Acer Aspire and its usb wifi with GhostBSD 24.10.1 in live mode, as I hope GhostBSD have the same source for wifi drivers as Haiku has.
There connection worked on the first attempt. I might have gotten only an 11 mbit connection even though the card should be able to handle 54 mbit, but that is not important.
I also discovered that there is a led on the card that flashes when it is working. That I have never seen when I try it with Haiku.
Also, the signal strenght was reported as 80%, where I in Haiku on the same spot got 25 from ifconfig scan.

What more investigation can I do before I write a bug? And what should I include in a bug if I choose to write one?

Peter

1 Like

Some of Ralink chipsets are working better than others. I know that RT2571SW has problems. IIRC, on linux, it is known as rt73.
Haiku wifi drivers are mostly coming from FreeBSD or OpenBSD. Some BSD drivers are using a linux compatibility layer, those can’t work on Haiku but it could explain why you had success on GhosBSD.

Even with a working driver, wifi is sometimes failing to connect automatically at boot, due to timing issues. If you’re able to connect manually after, you should be able to use a connexion script that introduce a delay. There are few examples buried somewhere on this forum.
If that doesn’t solve the problem with the Atheros, then it’s a regression and you should open a ticket on Haiku bug Tracker.

Nothing to add in terms of help here… just wanted to mention/(vent?:smiley:) that the symptoms listed are pretty similar (except for the shrinking list of networks with each try) to what I see with the idualwifi7260 driver.

Only once in a blue moon it will connect right away, work more or less normally (low signal level though with router less than 50 cm away), and then months go by where I only get the “Wrong password?” message.

No clue about what’s going on :rofl:

The idualwifi7260 has worked reliably on my Thinkpad T480s. I launch it from boot, and I did have to put a delay in there of a couple seconds. Without the delay, I’d have setup failures from time to time, and once it fails the supplicant system can have a hard time recovering.

I use a shell script in config/settings/boot/launch/, using sleep to delay for two seconds and ifconfig to set up the network. I don’t think any of this will resolve the problems you two are running into, but just in case …

  1. Sync machine to network time server.
  2. ‘uname -a’ - attach output to ticket.
  3. ‘listdev’ - attach output to ticket.
  4. ‘listusb’ - attach output to ticket.
  5. Copy /var/log/syslog and attach to ticket.

There are basic things you can do. But, get that info into a ticket so it is easier and trackable from that point for devs.

1 Like

Hello. I have the same issue, where frecuently Haiku did not show my wireless network. Also have an Atheros chipset. What I did is a simple script to run from Terminal:

#!/bin/sh
ifconfig /dev/net/atheroswifi/0 join <network_name>

This script will not automatically connect, but will bring up the login prompt to enter the password, with the right n There is some other additional parameters that you could add, to automatically connect from command line.

More information here:

https://www.haiku-os.org/docs/userguide/en/workshop-wlan.html

1 Like

I join in with my own lament, even if it probably doesn’t help either… :slight_smile:

My iprowifi4965 auto-connects in 90% of all boot-ups. Nice!
In maybe 20% of those, it doesn’t ask for a password and simply works with the saved authentication. Very nice!
I all other cases, the wpa_supplicant window pops up, with my login+password prefilled, claiming my login password or something maybe have been wrong.

The important part here, is to let the window sit there for a while - I usually play a round of Pairs, so maybe 20 seconds. After clicking “Connect” it almost always works!

Tip: If your list of networks is empty after an unsuccessful login, try killing the wpa_supplicant team with ProcessController or TeamMonitor.

Auto connects? Hm. If you could disable that, and use a launch script with a delay instead, I wonder if that 10-20% failure rate would go away.

I use ifconfig <device> join <host> <password>

How do you prevent auto-connect?
Delete /boot/system/settings/network/wireless_networks ?
I suppose that keeps getting recreated and you’ll have to hope deleting the file first in the UserBootscript will be fast enough…

ETA:
It appears wireless_networks doesn’t get recreated. Unfortunately, I still get the authentication window when just using the “ifconfig” line after waiting 30 seconds…

I actually don’t know how the wireless_networks file gets created. I thought maybe with “Choose automatically” or selecting a network in the Network prefs. But it doesn’t reappear…
I now recreated it manually. The contents should be:

network SSID-of-your-network

1 Like

As context, the popup of “your password is wrong” is the one used for any connection error. It’s not that good error handeling and should be improved in our port.

Also, edit: I think it is a bit ridiciloous to debate if moving configs around can fix this. It really won’t.
Someone has to fix up wpa_supplicant and figure out where auto-connect is failung, user boot scripts should normally never be neccesary for this.

Yes, but delegating to “someone” is not going to help. Until then, people who wouldn’t know how to fix this (myself included) can use workarounds and still get online. That’s not incompatible with eventually fixing the problem.

I already had put up a patch for wpa2 enterprise auth, but if nobody reviews it there is not much I can do either ; )

Unfortunately I don’t think we get very good error information from wpa_supplicant itself here. I recall looking into this before and even displaying the “authentication failed” message is an improvement from what we had before.

Just checked again… I already have an auto-connect-wifi.sh under ~/config/settings/boot/lanch/ (with a sleep 10 delay before the ifconfig line, netbook is on the slow side :-D).

Still, sometimes it connects, sometimes it just wont. No matter if I do warm/cold reboots, reboot from other OSes, etc. Feels just like a lottery, and with my luck…:rofl:

Thanks everyone for your answers. I now understand a little more.

The computer with the Atheros wifi card seems to work very well with another router, so I think the problem might be with my main router. Anyway I consider this as solved.

As several of you mentioned WPA Supplicant as a weak link I brought the computer with the Ralink USB wifi stick to a place with an unprotected Wifi network with hopes that WPA Supplicant would then not be needed. The result was disappointing. No improvement. But, I have since looked more in the syslog and realise that there are multiple USB errors among the connection attempt logings. So now I think the problem is not with wifi drivers or software but with USB. I will try to create a bug for that.

1 Like

I marked it as solved for you.