Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireless configuration and startup - The Gentoo way (part 2)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 15, 16, 17  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Nov 29, 2004 10:07 am    Post subject: Reply with quote

Klavs wrote:
Hi,

I've just upgraded to baselayout-1.11.6-r1 - and I see the wireless-ebuild scripts still have one big problem AFAIK :)

I have a USB-wireless device on my server (no more pci-slots- small server) - this wireless device can only do ad-hoc mode - which however works fine.

I need the script to default to my home wlan (ie. to adhoc mode) and be able to fallback to Managed mode if default fails.


The problem here is that Ad-Hoc configuration always works so this request would be pointless.

By always works, I mean that the configuration always works - ie no errors are reported back at the configuration stage. The only possible error to work off is DHCP failing and we don't (and probably never will) have any restart mechanism for this.

However, you can do this yourself - with a little code in /etc/conf.d/net in the preup function :)

(This is very loosely typed - may have errors)

Code:
preup() {
# We only use this code for eth1
[[ ${IFACE} != eth1 ]] && return 0

# Configure ad-hoc for our server
iwconfig ${IFACE} mode ad-hoc
iwconfig ${IFACE} channel 3
iwconfig ${IFACE} essid ESSID
iwconfig ${IFACE} key s:foobar open

# If our server (at 192.168.0.1) is reachable, we will find it
# Otherwise we return gracefully
arping -q -c 2 -w 3 -D -f -I ${IFACE} 192.168.0.1 &>/dev/null && return 0

# We found our server in ad-hoc, so we replace our wireless config
mode_eth1="ad-hoc"
essid_eth1="ESSID"
channel_eth1="3"
key_eth1="s:foobar open"

#return gracefully
return 0
}
Back to top
View user's profile Send private message
tautology
n00b
n00b


Joined: 08 Jan 2004
Posts: 8
Location: Canada

PostPosted: Mon Nov 29, 2004 2:09 pm    Post subject: Apologies Reply with quote

My Apologies,

I did read through /etc/conf.d/net.example but must have missed it. I also searched through /etc/conf.d/net.example for wlan and iwconfig, but these words are not in /etc/conf.d/net.example It says to use
Code:

modules=("!wireless")

which works for me.

Perhapse this should be added to the FAQ, under the wlan-ng.

I recognise that the wlan-ng tools are a pain because they don't support iwconfig, it has been a problem for me on several occasions, but unfortunately that is what I had to do to get wireless support for my card. Don't take my previous post as an attach on your work, I was just frustrated at spending hours and not comming up with the option to disable the wireless config.

Thanks for your prompt reply.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Nov 29, 2004 2:44 pm    Post subject: Re: Apologies Reply with quote

[quote="tautology"]
Perhapse this should be added to the FAQ, under the wlan-ng.

It's done - however, the FAQ is now maintained over at http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup

Quote:
Don't take my previous post as an attach on your work, I was just frustrated at spending hours and not comming up with the option to disable the wireless config.


No problemo - at least you're working now :)
Back to top
View user's profile Send private message
jmack1010
Tux's lil' helper
Tux's lil' helper


Joined: 25 Jan 2004
Posts: 93
Location: University of Cincinnati, Oh

PostPosted: Mon Nov 29, 2004 7:31 pm    Post subject: /etc/conf.d/net troubles Reply with quote

I know this sounds retarded, however, in interactive mode during etc-update, I accidently replaced the new /etc/conf.d/net from baselayout 1.11 with the /etc/conf.d/net from 1.9.4. I tried to reemerge baselayout 1.9.4, and then reemerge 1.11 again, hoping that /etc/conf.d/net would then be replaced, however, it was skipped. How would I obtain the newer version of /etc/conf.d/net? Thank you for any help.

Joe
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Nov 29, 2004 11:00 pm    Post subject: Reply with quote

The latest version of /etc/conf.d/net we ship is pretty much a blank file with a small header directing you to read /etc/conf.d/net.example for configuration instructions.

If, however, you really need it you can expand the newtest rcscripts.tar.bz2 you have in /usr/portage/distfiles - you can find it in there.
Back to top
View user's profile Send private message
gurke
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 260

PostPosted: Thu Dec 02, 2004 8:54 am    Post subject: Reply with quote

im having a small issue with my ipw2100 card. i load the module with coldplug and added the interface (net.eth1) to runlevel default. now when i boot, the module gets loaded, but it seems it immediatly sets the interface on status "started", so the net.eth1 script doenst associate and get dhcp. sometimes, the driver seems to find a network by himself and connects correctly. anyone experienced this before?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Dec 02, 2004 12:31 pm    Post subject: Reply with quote

gurke wrote:
im having a small issue with my ipw2100 card. i load the module with coldplug and added the interface (net.eth1) to runlevel default. now when i boot, the module gets loaded, but it seems it immediatly sets the interface on status "started", so the net.eth1 script doenst associate and get dhcp. sometimes, the driver seems to find a network by himself and connects correctly. anyone experienced this before?


The problem is that you've added net.eth1 to the default runlevel.
This means that it gets started by coldplug AND rc scripts - which causes the problem.

Solution 1) stop coldplug from loading the module or running /etc/hotplug.d/net.agent (for example, remove that file)

Solution 2) remove net.eth1 from the default runlevel

I would go for Solution 2 myself :)
Back to top
View user's profile Send private message
gurke
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 260

PostPosted: Thu Dec 02, 2004 12:56 pm    Post subject: Reply with quote

UberLord wrote:

The problem is that you've added net.eth1 to the default runlevel.
This means that it gets started by coldplug AND rc scripts - which causes the problem.

Solution 1) stop coldplug from loading the module or running /etc/hotplug.d/net.agent (for example, remove that file)

Solution 2) remove net.eth1 from the default runlevel

I would go for Solution 2 myself :)


is there a way of stopping coldplug from starting the device? coldplug doesnt work very well with my wlan at home, while the runlevel script does very well, when i restart the device. i didnt find the file /etc/hotplug.d/net.agent. i only got a /etc/hotplug.d/default/default.hotplug

thanks
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Dec 02, 2004 5:12 pm    Post subject: Reply with quote

gurke wrote:
is there a way of stopping coldplug from starting the device? coldplug doesnt work very well with my wlan at home, while the runlevel script does very well, when i restart the device. i didnt find the file /etc/hotplug.d/net.agent. i only got a /etc/hotplug.d/default/default.hotplug


You can remove/rename the net.agent file in /etc/hotplug (sorry - I gave you the wrong directory before)

Or you can remove coldplug from the default runlevel
Back to top
View user's profile Send private message
gurke
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 260

PostPosted: Thu Dec 02, 2004 6:26 pm    Post subject: Reply with quote

it seems that net.agent starts the interface with the standard runlevel scripts. so my ipw2100 card behaves sloppy, lets see what i can do about it.
Back to top
View user's profile Send private message
jsaints
n00b
n00b


Joined: 28 Nov 2003
Posts: 46

PostPosted: Sat Dec 04, 2004 3:59 am    Post subject: I can scan but no dhcp Reply with quote

Hi

I have follow the instructions described here.. I am almost there!!! I can now scan for access points and see thier Mac Addresses.
Code:
iwconfig ath0
chooses my ap but i still cannot receive a dhcp lease.

Any ideas? most common problems for not getting a dhcp lease?

Thanks
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sat Dec 04, 2004 11:44 am    Post subject: Re: I can scan but no dhcp Reply with quote

jsaints wrote:
Any ideas? most common problems for not getting a dhcp lease?


Invalid WEP configuration or some security on the AP like MAC filtering.
Thats the most common problem for not getting a dhcp lease.
Back to top
View user's profile Send private message
Clue-less
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2004
Posts: 87

PostPosted: Mon Dec 13, 2004 12:57 am    Post subject: Just a few suggestions ... Reply with quote

Uberlord:

I was really confused on the part where you state:

Quote:
Ensure that version 1.11.0 or newer is going to get installed and go for it!
Otherwise, find out why it's not (hint: step 1 or 2 is wrong)
Ensure that etc-update updates /etc/conf.d/net and /etc/conf.d/net.lo - please do this


(From Wireless configuration and startup - The Gentoo way, after emerging baselayout.)

My confusion stemmed from the fact that there is no /etc/conf.d/net.lo but there is /etc/init.d/net.lo. Is that what you are referring to?

If not, then, am I to use the same script in /etc/init.d/net.lo for /etc/conf.d/net.lo?

The other suggestion I have is to mention CVS Script /etc/conf.d/net.example and CVS Script /etc/conf.d/wireless.example. Both are not obvious to newbies like me -- until I stumbled upon it from Matt Clara's Madwifi page.

Do I still need to symlink eth0 to net.lo if that's for the wired ethernet?

Finally, if I use the net.lo.example, would I be able to use any available wireless access point (providing no WEP/WPA) or do I have to configure each individual access point for it?

Sorry for so many questions, but configuring my wireless card has been a frustrating experience.
_________________
Clue-less
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Dec 13, 2004 10:04 am    Post subject: Reply with quote

Sorry, the FAQ is now maintained over at http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup, but use this forum for feedback.

/etc/init.d/net.lo is the mater script which controlls any ethernet device, both wired and wireless.

An interface (say eth1) should symlink to this script (net.eth1 -> net.lo)
The fact that eth1 is wireless or wired is irrelevant.

If you supply a preferred_aps list then we try and connect to those in order.
Then we will try and connect to the strongest un-encrypted access point.
Back to top
View user's profile Send private message
Parasietje
Apprentice
Apprentice


Joined: 25 Jan 2004
Posts: 194

PostPosted: Mon Dec 13, 2004 10:39 am    Post subject: Reply with quote

I'm using a commercial access point here at home, in bridged mode to my local LAN. The access point is at one end of the house, the linux internet router is at the other end. I was wondering if I could make an access point out of the linux internet router, sharing the same SSID as the commercial router. That way, reception in every part of the house can be guaranteed. How do I do this? What is the correct term for what I want to do?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Dec 13, 2004 12:57 pm    Post subject: Reply with quote

You're better off asking in the networking forum as I don't know :/
Back to top
View user's profile Send private message
tgurr
Retired Dev
Retired Dev


Joined: 27 Jan 2004
Posts: 571
Location: germany

PostPosted: Mon Dec 13, 2004 6:47 pm    Post subject: Reply with quote

Hi there, I tried configuring my wireless usb stick (using ndiswrapper) with the new baselayout and stuff but when I execute
Code:

server ~ # /etc/init.d/net.wlan0 start
 * Starting wlan0
 *    Loading networking modules for wlan0
 *       modules: apipa iwconfig essidnet iptunnel ifconfig
 *          iwconfig provides wireless
 *          ifconfig provides interface
 *    Configuring wireless network for wlan0
 *       wlan0 connected as "xxx"
 *       in  mode (WEP disabled)
 *    Configuring wlan0 for "xxx" ...                                [ ok ]
 *    Bringing up wlan0
 *       192.168.10.50                                                    [ !! ]

that error occures.

It states that WEP is disabled which is not, i entered my WEP key in /etc/conf.d/wireless and it says "in mode" which should be "in Ad-Hoc mode" i suppose but the device is set up in managed mode after /etc/init.d/net.wlan0 start.

If i do it manually it works, this is the way i configure it manually:
iwconfig wlan0 essid xxx
ifconfig wlan0 up
ifconfig wlan0 192.168.10.50
iwconfig wlan0 mode Ad-Hoc
iwconfig wlan0 key s:xxx

But i'd like to have it done "the gentoo way", any idea what went wrong ?

I set up RC_VERBOSE="yes" but it won't display where the error exactly is, so I need your help with this :cry:

Thanks in advance!

MfG. Psy
Back to top
View user's profile Send private message
yeags_1001
n00b
n00b


Joined: 20 May 2004
Posts: 20
Location: Pittsburgh, PA

PostPosted: Sat Dec 18, 2004 8:17 am    Post subject: Upgrade to Prism54 from ndiswrapper Reply with quote

Hi I'm having an issue with my wireless config that used to work with my ndiswrapper setup/wlan0. My wireless config in /etc/conf.d/wireless now using a prism54/eth0 now looks like ...
Code:
essid_eth0=""
ifconfig_panera=( "dhcp" )
key_YeagerLAN="X00X-00X0-00 enc open"
ifconfig_YeagerLAN=( "192.168.7.55 netmask 255.255.255.0" )
routes_YeagerLAN=( "default gw YeagerLAN" )
preferred_aps=( "YeagerLAN" "panera" )

My result from my /etc/init.d/net.eth0 start ...
Code:
 * Starting eth0
 *    Running preup function
 *         Configuring wireless network for eth0
 *         Scanning for access points
 *           Found "linksys" at 00:0C:41:F4:26:D9
 *           Found "default" at 00:80:C8:AB:C2:32
 *           Found 00:0C:41:8A:39:DA (WEP required)
 *           Found "NETGEAR" at 00:09:5B:CF:65:86
 *           Found "SpongeBob" at 00:0F:66:38:B5:6F (WEP required)
 *           Found 00:0F:66:2D:16:97 (WEP required)
 *         Trying to force preferred incase they are hidden
/lib/rcscripts/net.modules.d/iwconfig: line 340: iwconfig_get_essid_var: command not found
 *        does not support setting keys
 *       or the parameter "mac_key_" or "key_" is incorrect
 *        does not support setting ESSID to "panera"
lo        no wireless extensions.
 *           connected to "SpongeBob" at 00:0F:66:38:B5:6F
 *          in managed mode on channel 3 (WEP disabled)
 *    Configuring wireless network for eth0
 *       eth0 connected to "default" at 00:80:C8:AB:C2:32
 *       in managed mode on channel 6 (WEP disabled)
 *    Cannot default to dhcp as there is no dhcp module loaded
 *    No configuration for eth0                                                                          [ !! ]

dmsg | grep prism
Code:
Loaded prism54 driver, version 1.2
eth0: prism54_set_txpower() auto power will be implemented later.

However, I can get it to work manually with the following sequence of commands ...
Code:
ifconfig eth0 up
iwconfig eth0 essid "YeagerLAN"
iwconfig eth0 key "X00X-00X0-00"
ifconfig eth0 "192.168.7.55 netmask 255.255.255.0"
route add default gw YeagerLAN

Thanks in advance for any help ...
Back to top
View user's profile Send private message
Parasietje
Apprentice
Apprentice


Joined: 25 Jan 2004
Posts: 194

PostPosted: Sun Dec 19, 2004 10:18 am    Post subject: Reply with quote

Looks to me that "YeagerLAN" isn't mentioned in the list of access points net.eth0 finds.
Maybe you could look in that direction?
Back to top
View user's profile Send private message
fatboyjim
Apprentice
Apprentice


Joined: 12 Jul 2004
Posts: 227
Location: UK

PostPosted: Sun Dec 19, 2004 2:53 pm    Post subject: Reply with quote

yeags_1001 wrote:
Code:
*    Cannot default to dhcp as there is no dhcp module loaded


Guess you could fix that bit with
Code:
emerge dhcpcd

_________________
-----------------------
fatboyjim
Gentoo/AMD64 Arch Tester (Inactive)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Dec 20, 2004 11:00 am    Post subject: Reply with quote

ad-hoc/master mode not setting wep key
https://bugs.gentoo.org/show_bug.cgi?id=74802

unknown function errors/command not found erros
https://bugs.gentoo.org/show_bug.cgi?id=74723
Back to top
View user's profile Send private message
EnigmaedgE
Tux's lil' helper
Tux's lil' helper


Joined: 20 Mar 2003
Posts: 89

PostPosted: Fri Dec 31, 2004 8:26 am    Post subject: Reply with quote

Hey.... I've read a couple of replies from this post as well as Part I of this (even those its rather dated).

I still seem to have a bit of trouble with my built-in wireless. As a small note, the gentoo 2004.3 LiveCD detects it and works wonderfully. In fact, I completed my install wirelessly. After the initial reboot and kernel tweaking, I cant seem to get it to work!

Please see my post:

https://forums.gentoo.org/viewtopic.php?t=273066

Thanks guys!
Back to top
View user's profile Send private message
fatboyjim
Apprentice
Apprentice


Joined: 12 Jul 2004
Posts: 227
Location: UK

PostPosted: Fri Dec 31, 2004 11:48 am    Post subject: Reply with quote

Could try using genkernel? Apparently the kernel is similar to that of the livecd?

Jim
_________________
-----------------------
fatboyjim
Gentoo/AMD64 Arch Tester (Inactive)
Back to top
View user's profile Send private message
Radiator
n00b
n00b


Joined: 06 Sep 2004
Posts: 31

PostPosted: Sat Jan 01, 2005 10:19 pm    Post subject: Reply with quote

Hi,

I think something is going wrong here with wireless-autoconfig.

It runs fine when i use iwconfig to setup it manually, but it doesnt really work with newest baselayouts as the howto says -
I did step by step what http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup says, but it doesnt seem to do any wireless configuration (/etc/init.d/net.eth1 says Bringing eth1 up - nothing more - but it should as i can see here) (eth1 is ipw2200)

How is the configuration in /etc/conf.d/wireless handled by the scripts? I don't see that file parsed by any script. I don't have a directory like /etc/net.modules.d - where can i get that stuff, because i think this is the missing part, eh

what's wrong?
Back to top
View user's profile Send private message
Clue-less
Tux's lil' helper
Tux's lil' helper


Joined: 11 Feb 2004
Posts: 87

PostPosted: Tue Jan 04, 2005 1:54 am    Post subject: net.lo syntax error? Reply with quote

Upon startup, I receive an error that states that net.lo has a syntax error and will not initiate (I'm using this net.lo since I did not have one when I booted before this.)

When I try to log into Gnome, it freezes at the gnome startup screen. I assume that's due to net.lo.

I've symlinked eth0 and ath0 to net.lo ...

Help! :(

(If this all fails, how do I un-symlink eth0 and ath0?)
_________________
Clue-less
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2, 3 ... 8, 9, 10 ... 15, 16, 17  Next
Page 9 of 17

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum