View previous topic :: View next topic |
Author |
Message |
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Sat Dec 10, 2022 10:29 am Post subject: IW error "key must be [d:]..." |
|
|
I have this problem since the installation of Gentoo. During installation I simply turned my wireless network to an open network to avoid the password problem.
I use iw to setup a wireless network with these parameters:
SSID: MY-SSID
Password: wireless-password
Following the hand book manual I type:
iw dev wlp4s2 connect -w MY-SSID key 0:wireless-password (or d:0:wireless-password) (both do not work>)
but I receive this error message
WARNING: at list one error occurred. (-1)
key must be [d:]index:data where
'd:' means default (transmit) key
'index:' is a single digit (0-3)
'data' must be 5 or 13 ascii chars
Wireless card is an ATHEROS AR9227
Whats wrong?
Thanks and regards
Enrico |
|
Back to top |
|
|
Banana Veteran
Joined: 21 May 2004 Posts: 1358 Location: Germany
|
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Sat Dec 10, 2022 11:18 am Post subject: |
|
|
I would like to avoid to disclose my real SSID and password, so the below are just for this topic purposes:
SSID: MY-SSID (real SSID is 4 chars long)
Password: wireless-password (real password is 9 chars long) |
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Sun Dec 11, 2022 8:51 am Post subject: Can't start wireless network at the very beginning |
|
|
I can't even start to install Gentoo because I can't setup a wireless network using iw. I tried the process on 3 different computers but the result is always the same.
The computer where I would like to install Gentoo has an Atheros AR9227 wireless card. lspci -k return the device driver is correctly loaded.
Let's suppose my wireless network has:
SSID: MY-SSID (it's not my real SSID, the real one is 4 chars long)
Password: wireless-password (it's not my real password, the real one is 9 chars long no special chars just a capital letter, a number and other 7 chars)
Following the hand book manual I type:
ifconfig -a return the device name is wlp4s2.
ip link set dev wlp4s2 up, no message returned so it works
iw dev wlp4s2 connect -w MY-SSID key 0:wireless-password (or d:0:wireless-password) (both do not work)
hereafter the error message which seems related on the way I enter the key
WARNING: at list one error occurred. (-1)
key must be [d:]index:data where
'd:' means default (transmit) key
'index:' is a single digit (0-3)
'data' must be 5 or 13 ascii chars
Please note: if change my network to an open network with NO password using: iw dev wlp4s2 connect -w MY-SSID I get immediately connected. So there is something wrong with the key part of the command.
Any idea how to fix it?
Thanks and regards
Enrico |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3875
|
Posted: Sun Dec 11, 2022 9:52 am Post subject: |
|
|
Yes please use an ubuntu live iso to install Gentoo.
It will configure your wireless connection in a jiff. _________________
|
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4018 Location: Bavaria
|
Posted: Sun Dec 11, 2022 3:49 pm Post subject: |
|
|
[I have merged your both topics together. -- pietinger] |
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Sun Dec 11, 2022 7:08 pm Post subject: |
|
|
"Yes please use an ubuntu live iso to install Gentoo.
It will configure your wireless connection in a jiff."
How can install Gentoo from an Ubuntu live iso?
Anyway, somehow the idea is good. I tried with a Live iso of Mint 20.1. I opened a terminal and I tried to configure the wireless network with the same command used for Gentoo. In order:
ifconfig -a ( the wireless card is wpl4s2)
ip link set dev wlp4s2 up (no message returned so it works)
iw dev wlp4s2 connect -w MY-SSID key 0:wireless-password (or d:0:wireless-password)
Result is the exactly the same:
WARNING: at list one error occurred. (-1)
key must be [d:]index:data where
'd:' means default (transmit) key
'index:' is a single digit (0-3)
'data' must be 5 or 13 ascii chars
or 10 or 26 hex digits
for example: d:2:6162636465 is the same as d:2:abcde
Resuming the problem: I have this early message, beginning of a Gentoo installation, on 3 different computers and the also using a Mint iso.
What am I doing un-correctly?
Enrico |
|
Back to top |
|
|
Leonardo.b Apprentice
Joined: 10 Oct 2020 Posts: 294
|
Posted: Sun Dec 11, 2022 10:57 pm Post subject: |
|
|
iw probably doesn't support your WiFi encryption.
https://wireless.wiki.kernel.org/en/users/Documentation/iw
wpa_supplicant is a good alternative, avaiable in Gentoo.
From Linux Mint, you can simply use the graphical interface to connect to the network. |
|
Back to top |
|
|
gentoo_ram Guru
Joined: 25 Oct 2007 Posts: 474 Location: San Diego, California USA
|
Posted: Wed Dec 14, 2022 4:09 pm Post subject: |
|
|
Yes, the 'iw' commands are designed for WEP which isn't used on modern networks anymore. wpa_supplicant supports WPA, WPA2, and WPA3. You should use wpa_supplicant to authenticate and attach to the network. Then use dhcpcd to get an IP address once authenticated. |
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Thu Dec 15, 2022 1:18 pm Post subject: |
|
|
I tried also with wpa_supplicant but I can't complete the process. I used these sequence of command:
ifconfig wlp2s0 up works no problem
iwlist wlp2s0 scan | grep ESSID I can see my SSID listed
wpa_passphrase MU-SSID wireless-password | tee /etc/wpa_supplicant.conf no problem it works
sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp2s0 no error message, so it works
dhclient wlp2s0 here I have the error message command not found.
How can I go further and complete the process?
Enrico |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3875
|
Posted: Thu Dec 15, 2022 2:39 pm Post subject: |
|
|
Plz use ubuntu live desktop.
It will prompt you to connect to network.
If not click the NM applet icon.
Do NOT try it from terminal.
If you must use terminal use iwd
see
[url]
https://wiki.archlinux.org/title/iwd#iwctl
[/url]
wpa_supplicant is a bit disgusting.
I also never succeeded connecting in my home wifi via it
I always use iwd.
Please avoid wasting your time trying to terminall connect to wifi just for installing Gentoo.
After installation you can try it more relaxedly.
If possible please use ethernet.
Quote: |
How can install Gentoo from an Ubuntu live iso?
Anyway, somehow the idea is good. I tried with a Live iso of Mint 20.1. I opened a terminal and I tried to configure the wireless network with the same command used for Gentoo. In order:
|
The same way you would via Gentoo install cd.
Better.
You only need a linux environment.
Any is ok.
Try ubuntu.They are meticulouss about wifi connections because they address "beginners". _________________
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21497
|
Posted: Thu Dec 15, 2022 3:16 pm Post subject: |
|
|
enrico3791 wrote: | Password: wireless-password (it's not my real password, the real one is 9 chars long no special chars just a capital letter, a number and other 7 chars)
WARNING: at list one error occurred. (-1)
key must be [d:]index:data where
'd:' means default (transmit) key
'index:' is a single digit (0-3)
'data' must be 5 or 13 ascii chars | I do not use iw, but as I read this error, if your password is not 5 or 13 characters long, then you cannot use iw to enter it. Per your post, your password is 9 characters long. Perhaps switching to a 13 character password would work. |
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Fri Dec 16, 2022 12:46 pm Post subject: |
|
|
Thanks to everybody for the help, but please note I have this problem of wi-fi connection at Gentoo installation using the Minimal -CD. If I can't manage to setup the connection I can't go further with the installation of Gentoo.
I can't imagine I'm the only one having this problem. I just follow the instruction of the Gentoo Hanbook. Nobody else is using a wireless network with WPA to install Gentoo? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21497
|
Posted: Fri Dec 16, 2022 4:18 pm Post subject: |
|
|
enrico3791 wrote: | During installation I simply turned my wireless network to an open network to avoid the password problem. | If you successfully installed Gentoo with an open network, you should be able to install wpa_supplicant and dhcpcd over that same open network, then use them once the network is again secured. Does that not work for you? enrico3791 wrote: | I would like to avoid to disclose my real SSID and password, so the below are just for this topic purposes:
Password: wireless-password (real password is 9 chars long) | It may be clearer to write your placeholder as Password1, to show the actual length, while withholding the true value. enrico3791 wrote: | How can install Gentoo from an Ubuntu live iso? | The installation instructions only require a working Linux environment with a relatively modern kernel. Whether you boot from a Gentoo minimal CD or an Ubuntu live CD, you get what you need. You can then create partitions, download the stage3, unpack it, and so on.
enrico3791 wrote: | I opened a terminal and I tried to configure the wireless network with the same command used for Gentoo. In order:
iw dev wlp4s2 connect -w MY-SSID key 0:wireless-password (or d:0:wireless-password)
Result is the exactly the same:
WARNING: at list one error occurred. (-1)
key must be [d:]index:data where
'd:' means default (transmit) key
'index:' is a single digit (0-3)
'data' must be 5 or 13 ascii chars
or 10 or 26 hex digits
for example: d:2:6162636465 is the same as d:2:abcde | This is expected. You are still trying to use iw in a way that will not work. Ubuntu's iw is not modified to accept inputs that Gentoo's iw rejects. You must either use iw as its instructions state, or not use iw at all. enrico3791 wrote: | What am I doing un-correctly? | You are using iw with a key it does not accept, according to its error message. You must specify a key that it will accept.
enrico3791 wrote: | I tried also with wpa_supplicant but I can't complete the process. I used these sequence of command:
dhclient wlp2s0 here I have the error message command not found. | If the command is not found, then you need to install it, or use a different command. The instructions you were responding to told you to use dhcpcd, not dhclient: gentoo_ram wrote: | You should use wpa_supplicant to authenticate and attach to the network. Then use dhcpcd to get an IP address once authenticated. |
enrico3791 wrote: | Thanks to everybody for the help, but please note I have this problem of wi-fi connection at Gentoo installation using the Minimal -CD. If I can't manage to setup the connection I can't go further with the installation of Gentoo. | As suggested above, you could use an Ethernet connection, or use a different live environment. For some wireless cards, you might get success just by using wpa_supplicant with dhcpcd. enrico3791 wrote: | I can't imagine I'm the only one having this problem. I just follow the instruction of the Gentoo Hanbook. Nobody else is using a wireless network with WPA to install Gentoo? | According to what gentoo_ram wrote above, which seems to be confirmed by the wireless wiki for iw, you cannot use iw for WPA:Notably absent from this list is WPA. Just above that is a more pointed warning:Personally, I prefer Ethernet for a Gentoo installation even when wireless works, because I can get better download speeds over Ethernet, and an initial install can require several gigabytes of downloads.
The handbook specifically states that you cannot use iw for WPA: |
|
Back to top |
|
|
enrico3791 Tux's lil' helper
Joined: 03 Sep 2010 Posts: 77
|
Posted: Thu Dec 29, 2022 9:50 am Post subject: |
|
|
Let's close this topic. I manage to install using a wired network, but still I have some network problem so I open a new topic.
Thanks to everybody for the support.
Enrico |
|
Back to top |
|
|
haf1zoglu n00b
Joined: 28 Nov 2022 Posts: 12
|
Posted: Sun Feb 05, 2023 8:53 am Post subject: |
|
|
I got the same problem with enrico just with the difference i got into this issue after installing the gentoo on my laptop.
Installation guide followed and net-setup helped to connect my wifi network easily. But after installation and reboot, i couldnt connect to network. Wifi configuration is quite hard for a new user.
wpa_supplicant is also very hard to manage for a beginner.
Ah also beside that when i disable my password and made the network open access, even in this case i couldnt connect.
Happy to provide any output if you need for assistance. Thanks in advance. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21497
|
Posted: Sun Feb 05, 2023 2:46 pm Post subject: |
|
|
haf1zoglu wrote: | I got the same problem with enrico | I think this is incorrect, since: haf1zoglu wrote: | Ah also beside that when i disable my password and made the network open access, even in this case i couldnt connect. |
enrico3791 wrote: | Please note: if change my network to an open network with NO password using: iw dev wlp4s2 connect -w MY-SSID I get immediately connected. | In enrico3791's case, removing the password allowed use of the network. In your case, it does not. Therefore, you do not have the same problem. You may also be encountering the iw error discussed in this thread, but we cannot determine that since you did not provide any error messages. haf1zoglu wrote: | But after installation and reboot, i couldnt connect to network. Wifi configuration is quite hard for a new user. | Yes. Wired Ethernet is much simpler to use, and in my opinion, a better choice to start. After wired Ethernet works well, then you can look at using wireless.
If you need assistance, please give us something to work with. Since you do not have the same problem as enrico3791, we cannot make any assumptions about what hardware you have or how you have configured it. I suggest we address your problems in a separate thread, and link to that thread here for anyone who wants to follow along. I see that you provided some environment information in net-setup details. We could use that thread to get your network up. |
|
Back to top |
|
|
haf1zoglu n00b
Joined: 28 Nov 2022 Posts: 12
|
Posted: Sun Feb 05, 2023 3:20 pm Post subject: |
|
|
Hu wrote: | haf1zoglu wrote: | I got the same problem with enrico | I think this is incorrect, since: haf1zoglu wrote: | Ah also beside that when i disable my password and made the network open access, even in this case i couldnt connect. |
enrico3791 wrote: | Please note: if change my network to an open network with NO password using: iw dev wlp4s2 connect -w MY-SSID I get immediately connected. | In enrico3791's case, removing the password allowed use of the network. In your case, it does not. Therefore, you do not have the same problem. You may also be encountering the iw error discussed in this thread, but we cannot determine that since you did not provide any error messages. haf1zoglu wrote: | But after installation and reboot, i couldnt connect to network. Wifi configuration is quite hard for a new user. | Yes. Wired Ethernet is much simpler to use, and in my opinion, a better choice to start. After wired Ethernet works well, then you can look at using wireless.
If you need assistance, please give us something to work with. Since you do not have the same problem as enrico3791, we cannot make any assumptions about what hardware you have or how you have configured it. I suggest we address your problems in a separate thread, and link to that thread here for anyone who wants to follow along. I see that you provided some environment information in net-setup details. We could use that thread to get your network up. |
thanks a lot for your time and composing that reply on my activity. Yes you are absolutely right, its not similar to enrico3791's issue. When i realised i went differently. Looking for follow up on the seperate thread i raised as you mentioned. net-setup details |
|
Back to top |
|
|
|