You are not logged in.

#1 2008-03-25 09:36:39

ibendiben
Member
Registered: 2007-10-10
Posts: 519

[SOLVED] Can I make my own simple network deamon?

I'm using intel pro wireless 3945 abg and while I can get my connection to work manually it refuses to work automatically...

I tried several things now... The only solution that seems to always work is the most simplistic:

iwconfig wlan0 essid "myessid" key "mykey"

followed by:

dhcpcd wlan0

In total this commands take for about 2/3 seconds... which is great hmm

All setups with the network deamon in rc.conf... or /etc/conf.d/wireless fail... (in dhcp I think)
Also netcfg2 fails everytime with a "dhcp timeout" or a "network not reachable"

Sometimes I can get netcfg2 to work, after trying for several times... but even than it takes ages... say 5-10 seconds which I find slow!

Overall it seems tricky how the configuration finally gets done... because sometimes you get errors... like the network being unreachable... wlan0 not being found... dhcp timing out... (with all kind of variations)... but then some command(s) like:

ifconfig wlan0 up
iwlist wlan0 scan

Seems to do the trick and all of a sudden... netcfg2/network/whatever work again...

Anyway, since I found the two simple commands:

wconfig wlan0 essid "myessid" key "mykey"
dhcpcd wlan0

work the best and the fastest most of the time... I wondered if it is possible to make my own network deamon, to start the thing automatically at boot...
I tried making a simple bash script and putting it in /etc/rc.d/ but somehow it doesn't run...
Maybe I sound foolish and maybe I am, but I'd still like to know what I could do best to get things working automated...

Some background on the default network deamon is also welcome... when I used ipw3945 settings in rc.conf everything worked...
I read a lot of people having their problems getting the iwl3945 to work, but I can't get my finger behind what's causing them with me.... I guess it needs a little spoon full of sugar sometimes smile

Last edited by ibendiben (2008-03-25 09:58:13)

Offline

#2 2008-03-25 09:46:04

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Can I make my own simple network deamon?

If it's just two commands, use /etc/rc.local. If you really want an /etc/rc.d init script, write it using an existing one as an example, and don't forget to add its name to the DAEMONS array.

Offline

#3 2008-03-25 09:46:37

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Can I make my own simple network deamon?

Just copy one of the existing daemons in /etc/rc.d/ and edit it. Easy smile

Offline

#4 2008-03-25 09:53:56

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: [SOLVED] Can I make my own simple network deamon?

For figuring out about what the real problem is, that might be more complicated hmm It could very well be some regressions in iwlwifi, check their bug tracker : http://www.intellinuxwireless.org/bugzilla/query.cgi
Even though iwlwifi is now in the kernel, it seems like this bug tracker is still active.

Last edited by shining (2008-03-25 09:54:27)


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2008-03-25 09:57:33

ibendiben
Member
Registered: 2007-10-10
Posts: 519

Re: [SOLVED] Can I make my own simple network deamon?

Heey,
Just solved the deamon problem, so sorry but I forgot to give it the right writing permissions big_smile
It works now!

With the new udev and this network deamon my boot sure gets faster and faster lol

@shining yeah I guess there is still some little dark corners in the iwl3945 driver...

Thanks for the help! Glad I got it working wink

edit:

tomk wrote:

If it's just two commands, use /etc/rc.local.

ok, I might as well consider that, thanks

Last edited by ibendiben (2008-03-25 10:02:52)

Offline

#6 2008-03-25 11:39:28

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Can I make my own simple network deamon?

I feel I should add that your two commands are the same as those issued by the network init script, assuming the relevant data is entered correctly in /etc/rc.conf and /etc/conf.d/wireless. In your position, I would be interested in finding out why the standard solution does not work, but I understand that you may just be happy that it's working.

Offline

Board footer

Powered by FluxBB