How to configure wifi from the commandline

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#81 Post by tempestuous »

normanp wrote:DHCP_DISCOVER fails as before.
Is there a log file that I can consult?
Probably. /tmp/bootsysinit.log?
Yes, there have been various reports on the forum about problems with dhcpcd. Some suggestions:

Configure via the latest version of the Network Wizard from here
http://www.murga-linux.com/puppy/viewtopic.php?t=31522

dhcpcd may not be playing well with your particular wifi router. So just assign a static IP address instead. Instructions are in the first post in this thread.

Yankeeboy
Posts: 5
Joined: Mon 03 Nov 2008, 09:18

OK, so I've read through all 6 pages of this forum, but

#82 Post by Yankeeboy »

I can see that it is possible to configure my wireless card from the command line.

In fact, I have done it successfully. My problem is that I can't get this configuration to work at boot time. It always requires manual intervention.

Perhaps I don't understand the init system, or the order that init is occuring is causing me problems.

My status so far is that I finally managed to get the correct driver (ath_pci) to load, and suppressed the loading of an incorrect (ath5k_pci, I think it was called). I'm still not exactly sure what change I made which allowed this to happen, but suffice it to say that the Network Setup Wizard did not ever manage to get this right.

in fact the NEtwork Setup Wizard seems to have undergone a regression, in that it no longer saves any configuration options.

normanp
Posts: 6
Joined: Sat 11 Oct 2008, 12:42

#83 Post by normanp »

Thanks again tempestuous
I forced a static IP address with no success either - even though ifconfig reported my static IP etc correctly.
The updated network wizard is now buried in a long thread and I can't find it any more... I think it was at about page 26! When I last saw it it hadn't changed since Oct 15th anyway - a version I tried with no success.

I find it strange that the b43 driver in the wizard's list doesn't mention mini-PCI... maybe this is the wrong driver for the Broadcom chip?

I'll download 4.4.1 - maybe it will work better!
So many of us now rely on wireless for home use that I think it is a make or break issue for Linux desktop distros now.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#84 Post by 01micko »

Is there a problem with dhcpcd? I can connect with dhcpcd with the first machine I boot, but if I boot the next machine I must use a static IP.
I'll explain (btw, same with 4.1 or 4.11 on either machine)
I configure machine "a" with dhcpcd and connect just fine. I'll configure machine "b" the same and it won't connect using the wizard or from the command line. The result is dhcpcd continues and I get message "wlan0 sleeping for 10 seconds". So I abort and set up with a static IP.
Now if I boot machine "b" first, it will connect with the saved static IP fine. Then I'll boot machine "a" and it wont connect. Workaround is to assign it a static IP. All well and good but it is not the solution. :?
Any ideas?

User avatar
davids45
Posts: 1326
Joined: Sun 26 Nov 2006, 23:33
Location: Chatswood, NSW

#85 Post by davids45 »

G'day up there,
I too am suspicious that there is a problem with dhcpcd.
When starting my desktop in Puppy and connecting using a dhcpcd address, the better half's laptop running XP nearby would stop responding, or if I got in first, she could not connect to our router when she started up XP.

I have also been noticing (using rutilT as a monitor) that I can link to the router immediately (with ndiswrapper & wpa_supplicant) but getting an address and a stable connection could take a minute or two of disconnects and reconnects - with a 169.xxx address showing, until for some mysterious reason, a correct 192.168.xxx address and a firm connection would appear. Other times, an instant connect.
I have given up on auto dhcpcd and am now trying to set up my Pups with a static IP address, hoping this may at least be XP-friendly.

Another oddity to me is that occasionally I can connect to the router and my LAN, but there is no internet (WAN) connection for at least some time. This I assume is a problem in the router and with wireless, but wonder if anyone else has had this amongst their wifi experiences.

Meanwhile, back at the topic, I'm concerned that in using the command line approach after having tried the wizard that there may be a conflict between wizard residues and the new command line instructions.

Is there a way to check for or clear any wizard left-overs in the same way we can remove old wpa files in /var/run? I tried altering the permission of rc.network to stop it executing but this made my wine progams take a minute or two to start in the Pup/wine combination I was running at that time. I use Mailwasher as my first program once I connect to the Net, so this strange delay is not desirable.

David S.

normanp
Posts: 6
Joined: Sat 11 Oct 2008, 12:42

#86 Post by normanp »

OK - tried 4.1.1 with no success - I give up!
Well I'll use Puppy for emergencies but I can't spend any more time on it.
I think I have tried all ways of operating the wizard (including failed ndiswrapper). It is so frustrating as Win XP works just fine so ndiswrapper should. I have also tried at the command line as above.
Just for the record the card is a Dell Wireless 1370 Mini-PCI (Broadcom chipset)
A shame as I like Puppy a lot...

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#87 Post by 01micko »

@ normanp
Be sure if using the wizard to set your preferred DNS IP the same as the gateway IP if using static IP. Works for me. :wink:

normanp
Posts: 6
Joined: Sat 11 Oct 2008, 12:42

#88 Post by normanp »

Hi 01micko
Do you have the same wireless card as me?

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#89 Post by 01micko »

No but I use two separate systems, one using Netgear pcmcia card wg511v2, must use ndiswrapper (Marvell chipset), the other using Netgear usb stick wg111v2 using linux module rtl8187 (Realtek chipset). Keep trying! 8)
Puppy Linux Blog - contact me for access

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

Re: iwconfig not working ?

#90 Post by gyro »

juhasza wrote:where my esid ??
The ESSID for your network is defiined in the wireless Access Point/Router. I think it is case sensitive.
Provided your wireless Access Point is broadcasting it's ESSID, the wizard will tell you what it is when you click on the "Scan" button.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#91 Post by gyro »

01micko wrote:@ normanp
Be sure if using the wizard to set your preferred DNS IP the same as the gateway IP if using static IP. Works for me. :wink:
But that does not mean it will work for others.
If your modem/router (gateway), implements a caching name server, then sending DNS requests directly to it, will work. But many modem/routers do not, so their dhcp server passes on the DNS server addresses it gets from your ISP. In this case you would need to configure DNS to be the addresses provided by your ISP, if you do static IP configuration.
Of course if you can get dhcp to work, then these things are taken care of, automatically.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#92 Post by gyro »

01micko wrote:Is there a problem with dhcpcd? I can connect with dhcpcd with the first machine I boot, but if I boot the next machine I must use a static IP.
I'll explain (btw, same with 4.1 or 4.11 on either machine)
I configure machine "a" with dhcpcd and connect just fine. I'll configure machine "b" the same and it won't connect using the wizard or from the command line. The result is dhcpcd continues and I get message "wlan0 sleeping for 10 seconds". So I abort and set up with a static IP.
Now if I boot machine "b" first, it will connect with the saved static IP fine. Then I'll boot machine "a" and it wont connect. Workaround is to assign it a static IP. All well and good but it is not the solution. :?
Any ideas?
What IP address do you get when you successfully connect only machine "a" with dhcp?
What is the "range" configured in the dhcp server on your modem/router?

gyro

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#93 Post by 01micko »

gyro said
What IP address do you get when you successfully connect only machine "a" with dhcp?
What is the "range" configured in the dhcp server on your modem/router?
192.168.33.2
192.168.33.2 to 192.168.33.254

Mind you I am using an obscure router, a Synet Windy31. Runs thru a window$ box so I can share my wireless broadband. Works fine.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#94 Post by gyro »

01micko wrote: 192.168.33.2
192.168.33.2 to 192.168.33.254

Mind you I am using an obscure router, a Synet Windy31. Runs thru a window$ box so I can share my wireless broadband. Works fine.
Sorry 01micko, I was just wondering if there was a reason why it might appear that the dhcp server on your router had only 1 IP address to lease.
But it looks as though the router config is fine. So I'm back to being mystified.

Gyro

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#95 Post by 01micko »

Gyro said
Sorry 01micko, I was just wondering if there was a reason why it might appear that the dhcp server on your router had only 1 IP address to lease.
But it looks as though the router config is fine. So I'm back to being mystified.
Yesterday I introduced a vi$ta(call it "c") machine to the equation. My main puppypc (a) was running as usual (dhcpcd assigned 192.168.33.2 as normal) and the vi$ta box, machine "c", connected with dhcp assigning it 192.168.33.3 with no problems. This only makes me more suspiscious of a dhcpcd problem in puppy with more than one puppypc on the network. I'll stuff around some more with these three machines to see what I can come up with. Mind you it may take some time because the new machine is a Chrissy present for my son, so have to play with it when he is at school. I'm sure the new machine will become a puppypc too because my son has grown to like puppy. :wink:
Puppy Linux Blog - contact me for access

brazilnut
Posts: 2
Joined: Sun 23 Nov 2008, 11:17

Puppy running on the Eeepc 4g

#96 Post by brazilnut »

As a NEWBIE, I openly admit that I don't yet know what I'm doing. However, by repeated tries, I now have 4.1.1 running nicely in a usb pen drive, with ooo_cutdown 3.2.2.0 running within it. It is my intention to maintain the XANDROS in "mint condition" so that if everything else fails, I still have that working. I do get connectivity through the wired port in Puppy. I haven't tried the webcam or mic yet, but that will come later. UP TO NOW, I AM FINDING THE INTERFACE AND DESKTOP OF PUPPY FAR SUPERIOR TO SEVERAL OTHERS I'VE EXPERIMENTED WITH.
Now, to my headache... I've tried to follow carefully the different instructions that are posted, but I'm still not doing something right to get the wifi recognized at boot so I can configure it.
The only hardware alteration I've made to my "pearlywhite" (I love that description!) is that I've increased the ram to 1 gig.
Any suggestions appreciated!
Brazilnut

brazilnut
Posts: 2
Joined: Sun 23 Nov 2008, 11:17

Puppy running on the Eeepc 4g

#97 Post by brazilnut »

As a NEWBIE, I openly admit that I don't yet know what I'm doing. However, by repeated tries, I now have 4.1.1 running nicely in a usb pen drive, with ooo_cutdown 3.2.2.0 running within it. It is my intention to maintain the XANDROS in "mint condition" so that if everything else fails, I still have that working. I do get connectivity through the wired port in Puppy. I haven't tried the webcam or mic yet, but that will come later. UP TO NOW, I AM FINDING THE INTERFACE AND DESKTOP OF PUPPY FAR SUPERIOR TO SEVERAL OTHERS I'VE EXPERIMENTED WITH.
Now, to my headache... I've tried to follow carefully the different instructions that are posted, but I'm still not doing something right to get the wifi recognized at boot so I can configure it.
The only hardware alteration I've made to my "pearlywhite" (I love that description!) is that I've increased the ram to 1 gig.
Any suggestions appreciated!
Brazilnut

dirks
Posts: 2
Joined: Sun 23 Nov 2008, 18:56

#98 Post by dirks »

Hello guys,

I try now 1 and a half day to run my wifi. I have a conceptronic C45RU USB stick and normal it working with the kernel module rt73.

I try to use the wizard and do it manual. I try to start with

Code: Select all

wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -d 
. I try it with different encrypt moules. Nothing work. But a few hours ago I was able to connect my router with wpa2. It works fine and I was happy.
So I try do install wpa from startup and after the first startup nothing works

iwconfig says Encryption Key:off.

Why it is not possible to set up with encryption? Without no problem but with.... :evil:

Thanks

d.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#99 Post by tempestuous »

brazilnut wrote:I'm still not doing something right to get the wifi recognized at boot so I can configure it.
http://www.murga-linux.com/puppy/viewto ... 740#237740

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#100 Post by gyro »

01micko wrote: This only makes me more suspiscious of a dhcpcd problem in puppy with more than one puppypc on the network.
Just one more guess. Maybe your dhcp server dosen't like more than 1 request from the same hostname. By default all Puppy machines have a hostname of "puppypc". This can be modified by replacing "puppypc" in both "/etc/hostname" and "/etc/hosts" with a name of your choice, but different on each pc.
Actually to test the theory you only have to change the hostname on 1 of the pc's.

PS: sorry, it's been a while since I looked at this topic.

gyro

Post Reply