Wpa_supplicant and WEP

Hi to everyone, i’m a new haiku user. I’ve got a problem with wifi connection. I can connect to open networks and i can connect to WPA encripted ones, but i cannot connect to WEP encripted wifi. Hade the same problem on recent slackware, it sort outs, wep is deprecated in wpa_supplicat and not enabled anymore. Had to recompile it whit CONFIG_WEP=1 enabled.
May be the same problem occour here. Wanting to recompile wpa_supplicant, how can i recreate the package? Are there some scripts (like slackware slackbuild) or some wiki pages that i can read/follow?
Thanks in advance

You can use haikuports and see the port repository for Haiku:

Applied the patch, wpa_supplicant compile, some warnings, but compile.
How i use the recipe to generate a hpkg? As i can understand using haikuporter will generate a package identical to the one installed.

Please setup haikuporter:

haikuporter wpa_supplicant
Then patch the sources manually
Run haikuporter again to make a package with your changes.

Did it. Package succesfully built. Moved to /boot/system/packages rebooted, but wep still doesn’t work.
I’m sure the package is the one i built, the datestamp confirm. The net is detected as open, and if i select WEP in the password request field and click “confirm” the requester pops up again in less than a second, as if the undergoing process crashed. If i select WPA the requester pops up again after some seconds, as if it try to connect, and then abort(as it has to, the wifi is wep protected, and it try with wpa). The system log doesn’t report anynthing. Are there others logs i can consult to debug the issue?

I suppose you should stop the net_server service with launch_roster, kill the net_server process if not stopped, then start the net_server in a terminal. The net_server starts wpa_supplicant.

If WEP is disabled by default in wpa_supplicant we should probably remove the option from the menu (unless wpa_supplicant is built with it compiled in, I guess.)

Still investigating, can someone please give me some advice? How does wpa_supplicat_gui works? Does it write all the configs in a file and the it calls wpa_supplicant, or uses another way?

Wouldn’t it be better to always compile wpa_supplicant with WEP enabled on Haiku?
Sure,WEP is a pretty outdated standard without any good reasons to still use it,but that decision is on the side of the router,not the computer connecting to it.
Purposefully breaking Wifi connections to WEP networks doesn’t seem like the best solution to me.

Agreed with Nipos here. Sometimes, the only router available, or for some kind of test, uses wep. Keeping the option there would simplify things for people, and shouldn´t add to the software maintenance.

Look: wpa_supplicant/wpa_supplicant/wpa_gui-haiku at haiku · haiku/wpa_supplicant · GitHub

I have no knowledge of C++, less of haikos gui programming, but from what i can see from the source it interface directly with wpa_supplicant (see the #include <wpa_supplicant.h>.

Done some testing with the builtin wpa_supplicant, and the one compiled by me.
In the first case i’ve this error:

scan_ssid=1 (0x1)
key_mgmt: 0x4
Line 8: unknown network field ‘wep_key0’.

with my compiled version:
key_mgmt: 0x4
Line 8: Invalid WEP key length 10 - this network block will be ignored
wep_key0 - hexdump(len=10): [REMOVED]

in the second case, the WEP encryption is recognized, but there’sm some error in the key parameter. The key is correct, and the same version of wpa_supplicant works well under linux.

Tried to use wpa_cli (compile fine under haiku) ma it complain about not finding a control socket interface

The wpa_supplicant.conf i use is :

ctrl_interface=/tmp/wpa_supplicant
update_config=1
ap_scan=1
network={
ssid=“MySSID”
key_mgmt=NONE
wep_key0=my_hex_key
wep_tx_keyidx=0
}

"The configuration can however be stored manually into the /boot/common/settings/network/wireless_networks config file.

WEP/WPA/WPA2 networks by either selecting them in the network prefs/network status applet or using ifconfig [interface] join [network name] [password]"

https://www.haiku-os.org/docs/userguide/en/desktop-applets/networkstatus.html

Using ifconfig, only pops up the standard gui

Giving up. Too far for my poor programming knowledge. I’ll use the cabled ethernet. Luckly it works well…