How to configure wifi from the commandline
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
That was a quick reply!tempestuous wrote:OK, it appears you have a miniPCI wifi device -
http://www.thinkwiki.org/wiki/IBM_High_ ... h_Modem_II
That script should work fine.
To clarify; at bootup Puppy should automatically load the hostap_pci driver for this device.
Yep, that looks like the critter, alright!
How do I know if it is loading the hostap_pci driver at bootup ... I mean, is there some config file or script that I can take a look thru and check to be sure that it is (and that I haven't messed something up somewhere along the lines)?
Thanks tempestuous for your help!
QBall
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
All I get when I do that is:
and a bunch more stuff pretty much like that ... what is it sposed to signify?
Thanks,
QBall[/code]
Code: Select all
00:00.0 Class 0600: 8086:1a30 (rev 04)
Thanks,
QBall[/code]
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
Got WPA2 connection after adding file named .WPA2.conf to
I was able to connect with the network wizard ("Connect" app) only after I copied the contents of the wpa_supplicant2.conf file to a file named .WPA2.conf in the same directory (/etc/network-wizard/wireless/wpa_profiles.
The reason I created this file is that the program gave me an error message saying there was no supplicant file named .WPA2.conf.
I didn't notice a mention of this file in this thread, so I posted this.
I am running puppy 4.2.1.
Thanks for this thread.
Steve
:
The reason I created this file is that the program gave me an error message saying there was no supplicant file named .WPA2.conf.
I didn't notice a mention of this file in this thread, so I posted this.
I am running puppy 4.2.1.
Thanks for this thread.
Steve
:
- Spaccafumo
- Posts: 33
- Joined: Thu 15 Jan 2009, 11:06
- Location: Sulmona - Italy
Suddenly happens.
My wireless module is: ath_pci
On the same pc i have 2 puppy 4.30 (old kernel), one for each hard disk (full installation).
All went well during last months. Yesterday, suddenly, wifi connection of puppy installed in hda1 failed whereas the other one in hdb1 is still perfect (I am using it now).
Network-wizard reported:
-----------------
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
-----------------
I went to /var/run , made a "wpa_supplicant" directory but
it was erased as soon as i attempted to restart the connection (by Network wizard).
Is there any file in hdb1 (where connection is OK) to copy in hda1 (where connection fails) to solve the problem by a file-transfusion?
Saluti.
I downgraded to wep-128. So i solved.
On the same pc i have 2 puppy 4.30 (old kernel), one for each hard disk (full installation).
All went well during last months. Yesterday, suddenly, wifi connection of puppy installed in hda1 failed whereas the other one in hdb1 is still perfect (I am using it now).
Network-wizard reported:
-----------------
Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
-----------------
I went to /var/run , made a "wpa_supplicant" directory but
it was erased as soon as i attempted to restart the connection (by Network wizard).
Is there any file in hdb1 (where connection is OK) to copy in hda1 (where connection fails) to solve the problem by a file-transfusion?
Saluti.
I downgraded to wep-128. So i solved.
Last edited by Spaccafumo on Wed 21 Dec 2011, 13:17, edited 1 time in total.
Qui si usa Linux
http://www.puppylinux.org
Sulmona - Italy
http://www.puppylinux.org
Sulmona - Italy
-
- Posts: 4
- Joined: Sun 14 Feb 2010, 19:38
Puppy and WiFi setup
I quote: Puppy's Network Wizard is one of the best in the business.
I got this out of the very first forum entries in this thread.
I spent the better part of several hours trying to get Puppy to connect to my hidden SSID. Finally, I enabled broadcasting the SSID and I was able to connect using the same setup as before.
So where in that is "one of the best in the business"?
I got this out of the very first forum entries in this thread.
I spent the better part of several hours trying to get Puppy to connect to my hidden SSID. Finally, I enabled broadcasting the SSID and I was able to connect using the same setup as before.
So where in that is "one of the best in the business"?
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
When forum member rarsa announced the initial development of the wifi component of the Network Wizard approximately 3 years ago, I warned him that it was near-impossible to accommodate the configuration differences of all wifi adaptors and access points, and that he would probably receive no thanks from the majority of users whose configurations work perfectly, but more likely abuse from the minority whose configurations don't work perfectly.
The earlier post is a sad confirmation of this prediction.
It needs to be noted, at the outset, that we're talking about an individual instance here.
It should also be noted that hidden SSID's can be a problem in Linux usually with WPA encryption (even though the poster failed to indicate the type of encryption being used). This is a shortcoming of wpa_supplicant, the application running behind the Network Wizard, and this will be the case (obviously) with all Linux distributions. But more fairly, it's also a shortcoming of certain Linux drivers which fail to interact with wpa_supplicant in a standardised manner.
So again, success or failure will often depend on the nuances of the particular combination of wifi device and router.
Forum member JustGreg did some thorough testing with hidden SSID's here
http://www.murga-linux.com/puppy/viewtopic.php?t=29205
You will see that some wifi devices (and their Linux drivers) work fine, some don't.
Windows XP contains very few, if any, wifi drivers. Most are provided by the individual vendors, and the only reason opensource drivers and utilities need to be used in Linux is because of the discriminatory practice of many wifi vendors in not providing Linux drivers, themselves.
Ultimately, any "failure" under Linux is directly the fault of the wifi device manuafacturers.
And in this particular instance, the wifi connection failure was actually due to the user setting their router for hidden SSID (which is not the default setting on a wifi router) ...
which is not such a bad thing, because hiding your router's SSID, ironically, makes your wifi network less secure.
This has been discussed in technical detail on the forum before
"HOW-TO have a more secure wireless network"
http://www.murga-linux.com/puppy/viewto ... 892#207892
The earlier post is a sad confirmation of this prediction.
It needs to be noted, at the outset, that we're talking about an individual instance here.
It should also be noted that hidden SSID's can be a problem in Linux usually with WPA encryption (even though the poster failed to indicate the type of encryption being used). This is a shortcoming of wpa_supplicant, the application running behind the Network Wizard, and this will be the case (obviously) with all Linux distributions. But more fairly, it's also a shortcoming of certain Linux drivers which fail to interact with wpa_supplicant in a standardised manner.
So again, success or failure will often depend on the nuances of the particular combination of wifi device and router.
Forum member JustGreg did some thorough testing with hidden SSID's here
http://www.murga-linux.com/puppy/viewtopic.php?t=29205
You will see that some wifi devices (and their Linux drivers) work fine, some don't.
Windows XP contains very few, if any, wifi drivers. Most are provided by the individual vendors, and the only reason opensource drivers and utilities need to be used in Linux is because of the discriminatory practice of many wifi vendors in not providing Linux drivers, themselves.
Ultimately, any "failure" under Linux is directly the fault of the wifi device manuafacturers.
And in this particular instance, the wifi connection failure was actually due to the user setting their router for hidden SSID (which is not the default setting on a wifi router) ...
which is not such a bad thing, because hiding your router's SSID, ironically, makes your wifi network less secure.
This has been discussed in technical detail on the forum before
"HOW-TO have a more secure wireless network"
http://www.murga-linux.com/puppy/viewto ... 892#207892
Confession: I've not read every post all the way through this topic, but my rapid scan did not see my problem mentioned.
EDIT: I've read it all now, so...
I'm trying to set up wifi on Puppy 4.3.1 on an Acer Aspire One. Wizard does not work, but the command line method does. Hurrah!! But the configuration does not survive a reboot.
I'm running live usb stick, with a save file on the hard drive.
One odd thing is that all those files that we delete in the config process do not appear afterwards. Should they? Do I need to provide empty directories/files?
gerry
EDIT: I've read it all now, so...
I'm trying to set up wifi on Puppy 4.3.1 on an Acer Aspire One. Wizard does not work, but the command line method does. Hurrah!! But the configuration does not survive a reboot.
I'm running live usb stick, with a save file on the hard drive.
One odd thing is that all those files that we delete in the config process do not appear afterwards. Should they? Do I need to provide empty directories/files?
gerry
The network wizard works great for me, except for the bit about saving a profile and automatically using it on the next boot. I have to re-run the network wizard every boot. Before I resort to trying to trying to determine all the correct parameters for a command line script to leave on my desktop, does anyone have any suggestions for me?
-
- Posts: 94
- Joined: Tue 19 Apr 2011, 11:53
- Spaccafumo
- Posts: 33
- Joined: Thu 15 Jan 2009, 11:06
- Location: Sulmona - Italy
Replacing wpa to wep in iwconfig.
How to replace this wep-128 (ascii) command:
iwconfig eth0 key s:asciipassword
with a wpa2 analogous command?
Can you write any example-text?
iwconfig eth0 key s:asciipassword
with a wpa2 analogous command?
Can you write any example-text?
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
See "PART 2: WPA encryption" on the first page of this threadSpaccafumo wrote:How to replace this wep-128 (ascii) command:
iwconfig eth0 key s:asciipassword
with a wpa2 analogous command?
http://www.murga-linux.com/puppy/viewto ... 336#159336
I had a startup script working perfectly until a few weeks ago when all of a sudden it gets stuck in some loop during the 4 way handshake. I didn't change any configuration files on router or within puppy so I'm not sure what caused this change.
In addition to being stuck in an infinite 4-way handshake loop, after I halt the command my router goes nuts and refuses to connect any other client until I reset it.
I should note that I can connect via net-setup.sh for some reason, even though it appears to issue the same command and points to the same config file I am pointing to.
My script is
I remove -B and add -dd to see a bunch of stuff I don't understand, but I do notice
with MAC:ADD substituting for the real MAC addresses. It seems it actually is connecting, but then disconnecting and retrying for some reason.
Any ideas on how I can fix this? I'd even be satisfied if I could just script whatever net-setup.sh is doing when I click the "use this profile" button to execute at boot since that apparently works.[/code]
In addition to being stuck in an infinite 4-way handshake loop, after I halt the command my router goes nuts and refuses to connect any other client until I reset it.
I should note that I can connect via net-setup.sh for some reason, even though it appears to issue the same command and points to the same config file I am pointing to.
My script is
Code: Select all
#!/bin/sh
ifconfig wlan0 down
modprobe rtl8187
sleep 3s
ifconfig wlan0 up
rm /var/run/wpa_supplicant/*
wpa_supplicant -B -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant2.conf
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
# start dhcp
dhcpcd -t 30 -h myhost -d wlan0
# start the firewall
/etc/rc.d/rc.firewall
Code: Select all
...
Cancelling authentication timeout
State: GROUP_HANDSHAKE -> COMPLETED
CTRL-EVENT-CONNECTED - Connection to MAC:ADD completed (auth) [id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
netlink: Operstate: linkmode=-1, operstate=6
EAPOL: External notification - portValid=1
EAPOL: External notification - EAP success=1
EAPOL: SUPP_PAE entering state AUTHENTICATING
EAPOL: SUPP_BE entering state SUCCESS
EAP: EAP entering state DISABLED
EAPOL: SUPP_PAE entering state AUTHENTICATED
EAPOL: Supplicant port status: Authorized
EAPOL: SUPP_BE entering state IDLE
EAPOL authentication completed successfully
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: MAC:ADD
State: COMPLETED -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
netlink: Operstate: linkmode=-1, operstate=5
Associated with MAC:ADD
WPA: Association event - clear replay counter
WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portValid=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - EAP success=0
EAPOL: Supplicant port status: Unauthorized
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state CONNECTING
...
Any ideas on how I can fix this? I'd even be satisfied if I could just script whatever net-setup.sh is doing when I click the "use this profile" button to execute at boot since that apparently works.[/code]
-
- Posts: 5464
- Joined: Fri 10 Jun 2005, 05:12
- Location: Australia
At the outset I reiterate that manual wifi configuration is only necessary if the Puppy Network Wizard does not work, or you have some special requirement.
First up, I see a problem with your script -
Puppy will almost certainly have automatically loaded the rtl8187 driver, so it appears that you're forcibly loading this same driver a second time! This will most likely corrupt the driver (and the wifi device).
If you feel that the rtl8187 driver needs to be reloaded, it's important that you unload the driver, first. It's not good enough just to take down the interface with "ifconfig wlan0 down".
I suspect the best solution would be to forget about your script, and just use the Network Wizard.
Don't use the Simple Network Wizard - this has a relatively high failure rate, especially with WPA encryption.
First up, I see a problem with your script -
Code: Select all
ifconfig wlan0 down
modprobe rtl8187
If you feel that the rtl8187 driver needs to be reloaded, it's important that you unload the driver, first. It's not good enough just to take down the interface with "ifconfig wlan0 down".
Once you have run the Network Wizard, and click the "save" button, you have enabled the net-setup.sh script to run at each boot up. And since it works, great ... but you appear to be still running your own separate script - so the two will be fighting each other! Which one wins depends on where in the boot sequence you have located your script!renketsu0 wrote:I'd even be satisfied if I could just script whatever net-setup.sh is doing when I click the "use this profile" button to execute at boot since that apparently works.
I suspect the best solution would be to forget about your script, and just use the Network Wizard.
Don't use the Simple Network Wizard - this has a relatively high failure rate, especially with WPA encryption.
Actually network wizard doesn't connect me on boot, not even right after install and only running the wizard once with net-setup.sh. That's the only reason I wanted to script it.
I'm glad you mentioned driver corruption though, as it caused me to take a close look at the drivers. It turns out puppy was using the r8180 for my card and not rtl8187 (even though my card is an 8187). My fault for not looking to see what it detected first. After removing that line everything works fine. Thanks!
I'm glad you mentioned driver corruption though, as it caused me to take a close look at the drivers. It turns out puppy was using the r8180 for my card and not rtl8187 (even though my card is an 8187). My fault for not looking to see what it detected first. After removing that line everything works fine. Thanks!
I have a new problem. Getting wireless running is working fine but it seems my wireless router for whatever reason disconnects all clients whenever a new client connects. Or rather when I look at the router's log it shows that the previously connected clients are stuck in some reauthentication loop and connection on the client-side is shown as dropped. This will go on until I manually disconnect and reconnect. While I know it's really time for a new router I can't help but think there's a way to code reauthentication into my script. But I have no idea how I would go about doing that. Any ideas?