You are not logged in.

#51 2007-11-28 00:22:31

buddabrod
Member
From: Germany
Registered: 2007-02-25
Posts: 220

Re: netcfg2 is now in [testing]

iphitus wrote:

buddabrod: I'll start on Arch64 sometime in the next few months, just have to install it. Also, your problem might be related to the wpa problems some have had with one of the recent kernels.

No, i'm using a custom kernel (zen-sources) and i have no such problems. I got it finally working with "wpa-config" since my wpa_supplicant.conf works as expected.

Offline

#52 2007-11-30 00:26:52

oringo
Member
Registered: 2007-08-23
Posts: 21

Re: netcfg2 is now in [testing]

I'm having some problems with essid containing "$$". I've tried adding \ in front of each '$' and changing the double-quotation to single-quotation, and still doesn't work. Given that I don't have the power to change the essid, what should I do?

[EDIT]: I figured out how to escape the $$ sequence: '\$\$' does the right thing.

Last edited by oringo (2007-11-30 23:43:04)

Offline

#53 2007-11-30 01:49:06

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

oringo wrote:

I'm having some problems with essid containing "$$". I've tried adding \ in front of each '$' and changing the double-quotation to single-quotation, and still doesn't work. Given that I don't have the power to change the essid, what should I do?

what's the error message? wpa or wep?

Offline

#54 2007-11-30 15:14:06

oringo
Member
Registered: 2007-08-23
Posts: 21

Re: netcfg2 is now in [testing]

It's WEP, the error message was it that association failed. While netcfg was trying to associate, iwconfig reports that the wifi interface is "not associated", but displays the essid. However, the '$$' in the essid was replaced with '7141'. That's what makes me believe that somehow the '$$' wasn't passed to iwconfig incorrectly.

Last edited by oringo (2007-11-30 15:14:35)

Offline

#55 2007-12-01 05:57:53

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

oringo wrote:

It's WEP, the error message was it that association failed. While netcfg was trying to associate, iwconfig reports that the wifi interface is "not associated", but displays the essid. However, the '$$' in the essid was replaced with '7141'. That's what makes me believe that somehow the '$$' wasn't passed to iwconfig incorrectly.

Oh. $$ returns the current shell's PID (afaik). I've probably escaped the essid in " quotes instead of ' quotes, so bash is parsing it. I'll do some testing and put out a fix soon.

Could you try changing on lines 134, 136 and 115:

\"$ESSID\"

to this:

'$ESSID'

or if that doesnt work, this

\'$ESSID\'

and let me know how it goes.

Thanks!

Offline

#56 2007-12-03 21:14:54

oringo
Member
Registered: 2007-08-23
Posts: 21

Re: netcfg2 is now in [testing]

iphitus, thanks for all the help. I actually got it to work by using the following line:

ESSID='my\$\$essid'
iphitus wrote:
oringo wrote:

It's WEP, the error message was it that association failed. While netcfg was trying to associate, iwconfig reports that the wifi interface is "not associated", but displays the essid. However, the '$$' in the essid was replaced with '7141'. That's what makes me believe that somehow the '$$' wasn't passed to iwconfig incorrectly.

Oh. $$ returns the current shell's PID (afaik). I've probably escaped the essid in " quotes instead of ' quotes, so bash is parsing it. I'll do some testing and put out a fix soon.

Could you try changing on lines 134, 136 and 115:

\"$ESSID\"

to this:

'$ESSID'

or if that doesnt work, this

\'$ESSID\'

and let me know how it goes.

Thanks!

Offline

#57 2007-12-03 22:43:36

JaQoB
Member
Registered: 2007-04-04
Posts: 60

Re: netcfg2 is now in [testing]

Maybe a stupied question, but are there any way to get information about your connection with netcfg2, to show in the tray. (or in conky or something...) Like Knetworkmanager for NetworkManager. Or am i mixing oranges and apples?

Offline

#58 2007-12-04 07:22:12

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

feel free to write your own script, but there's none as yet. There's status information in /var, and the application could call netcfg to change networks. If you do it in bash, you can source /usr/lib/network/network.subr and use some of the functions in that.

Oringo: Yeah, that works too smile

Enjoy.

Offline

#59 2007-12-04 16:30:38

JaQoB
Member
Registered: 2007-04-04
Posts: 60

Re: netcfg2 is now in [testing]

Got netcfg2 to work now smile
Next stupid question, where in /var ?

Offline

#60 2007-12-04 18:42:56

abhidg
Member
From: City of Kol
Registered: 2006-07-01
Posts: 184
Website

Re: netcfg2 is now in [testing]

Is there a way to automatically pick a wireless and connect to that? Or do we still need autowifi for this?

Offline

#61 2007-12-05 08:58:22

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

JaQoB wrote:

Got netcfg2 to work now smile
Next stupid question, where in /var ?

/var/run/network/ contains basic information on the currently running network profiles/devices.

If you're writing a bash script, you can get this easily by sourcing /usr/lib/network/network.subr and using the various functions within. Open it, it's got some basic documentation inside.

abhidg wrote:

Is there a way to automatically pick a wireless and connect to that? Or do we still need autowifi for this?

Yep. Grab the source package for netcfg2 and have a look in the contrib directory, there's a script that scans the available networks and checks if you have a profile to match.

netcfg2 won't automatically "roam" though it has no running daemon process. If you walk into another room with a different network, you're going to need to prompt it, either running netcfg2 networkname or the autodetect script.

Contributions welcome. netcfg2 offers a reasonable base at least to work from.

Offline

#62 2007-12-06 01:30:59

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: netcfg2 is now in [testing]

Just a heads up -- netcfg 2.0.1-1 package in testing is missing a dep for mktemp.

Offline

#63 2007-12-07 01:09:19

Flasher
Member
From: Bavaria / Germany
Registered: 2005-04-24
Posts: 126

Re: netcfg2 is now in [testing]

Hi!

I have a Atheros MiniPCI wlan card in my laptop. Because I have a wlan at home, I want to connect to my WPA-PSK (TKIP) encrypted network.

I compiled the madwifi modules in my custom kernel and installed wpa_supplicant, wireless_tools and finally the new netcfg2 tools.

When I'm manually connecting with my wlan it works:
I'm using the following commands:

iwconfig ath0 essid "myessid"
ifconfig ath0 192.168.0.100 up
wpa_supplicant -Bw -Dwext -iath0 -c/etc/wpa_supplicant.conf


Ok, now I tried to create a netcfg2 profile:

CONNECTION="wireless"
DESCRIPTION="Network Profile for wireless sim-net"

INTERFACE=ath0
HOSTNAME=sn-client-07

IP="dhcp"

TIMEOUT=10

ESSID="snwirless"
SECURITY="wpa-config"

SCAN="YES"

WPA_OPTS="-w -Dwext -ath0"
WPA_CONF="/etc/wpa_supplicant.conf"

When I want to start my new profile with:

netcfg2 sn_wireless

I get the following error:

:: sn_wireless up  - Network unavailable                                 [FAIL]

Hm.... crazy...

My wpa_supplicant.conf:

# /etc/wpa_supplicant

network={
        ssid="snwireless"
        key_mgmt=WPA-PSK
        proto=WPA
        psk=<password>
}

I tested around for hours. At the moment I'm a little bit helpless hmm

Any ideas?

Thanks for help!!!

Best regards,

Flasher

Offline

#64 2007-12-07 04:08:46

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: netcfg2 is now in [testing]

Flasher: I am also using madwifi with WPA-PSK, and the following works for me.

/etc/network.d/home-wireless

CONNECTION="wireless"
INTERFACE=ath0
SCAN="no"
SECURITY="wpa"
ESSID="MYSSID"
KEY="<WPA-PSK encryption key in plain text>"
IP="dhcp"
TIMEOUT=20

/etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
        ssid="MYSSID"
        psk=<WPA-PSK key in hex as output by wpa_passphrase>
        key_mgmt=WPA-PSK
        proto=WPA
        pairwise=TKIP
        group=TKIP
}

I don't know which parts of which files are necessary/unnecessary, but its working so I don't worry about it smile

The directory /var/run/wpa_supplicant didn't exist, so I had to create it. I'm connected right now and there is a named pipe ath0 sitting inside it, so I imagine it's necessary to create this directory.

Offline

#65 2007-12-07 04:52:26

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: netcfg2 is now in [testing]

oringo wrote:

I'm having some problems with essid containing "$$". I've tried adding \ in front of each '$' and changing the double-quotation to single-quotation, and still doesn't work. Given that I don't have the power to change the essid, what should I do?

[EDIT]: I figured out how to escape the $$ sequence: '\$\$' does the right thing.

Another solution would have been to write your SSID to a text file, say /etc/my.ssid

Then use

ESSID=`cat /etc/my.ssid`

I used this for a long random KEY entry that I didn't feel like figuring out all the necessary escapes for. My method:

dd if=/dev/urandom of=/tmp/rand bs=8 count=128

Then I opened /tmp/rand in a hex editor and took the first 63 characters whose ascii code fell in decimal range 32-126.

Offline

#66 2007-12-07 10:17:13

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

ideally I could get that $$ thing fixed within the scripts when I get a chance to test my own suggestions above.

Offline

#67 2007-12-07 18:54:53

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: netcfg2 is now in [testing]

iphitus: some questions/suggestions.

Could you change the variable name DEFAULT in netcfg-menu to something like DEFAULT_NET or DEFAULT_NET_PROFILE so this can be configured in rc.conf ?  I'm not too big on naming my default profile "main", it's not very descriptive.

Maybe netcfg-menu could always add a last option "No Network", which if chosen will just exit out. Right now I have a profile named "none" to accomplish this, but when I choose it netcfg2 complains that I haven't set an interface. Not a big deal, but not a clean solution.

Is there any way to control the order that profiles appear in netcfg-menu ?  Alphanumeric order doesn't seem to work.

Otherwise, good stuff, I love how I was able to get my wireless connection going with netcfg2 with a minimum of configuration.

Offline

#68 2007-12-07 19:06:44

loserMcloser
Member
From: Canada
Registered: 2004-12-15
Posts: 130

Re: netcfg2 is now in [testing]

Oh, and maybe TIMEOUT in netcfg-menu could be configurable in rc.conf as well?  Right now it's a hard 5 in /etc/rc.d/net-profiles

Offline

#69 2007-12-08 16:50:29

Flasher
Member
From: Bavaria / Germany
Registered: 2005-04-24
Posts: 126

Re: netcfg2 is now in [testing]

Hello guys,

my config is working big_smile

For other archer's I want to post my configuration:

My WLAN: WPA2-PSK:
WLAN-Card: Ethernet controller: Atheros Communications, Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)


profile-file:

CONNECTION="wireless"
DESCRIPTION="Network Profile for wireless sim-net"

INTERFACE=ath0
HOSTNAME=sn-client-07

IP="dhcp"
TIMEOUT=10

SECURITY="wpa-config"
SCAN="no"
WPA_OPTS="-w -Dwext -ath0"
WPA_CONF="/etc/wpa_supplicant.conf"

wpa_supplicant.conf

# /etc/wpa_supplicant
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=2
ap_scan=1

network={
        ssid="sn_wireless"
        key_mgmt=WPA-PSK
        proto=RSN
        pairwise=TKIP
        group=TKIP
        #psk="<plain-text key>"
        psk=<hex-code-key>
}

I hope I could somebody help with my config!

Best regards,

Flasher

Last edited by Flasher (2007-12-08 16:52:07)

Offline

#70 2007-12-10 07:50:02

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

loserMcloser: great suggestions, I'll definitely implement them. For the cancel, you can also just do ctrl-c to kill dialog.

Offline

#71 2007-12-10 20:11:51

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: netcfg2 is now in [testing]

Hi

For anyone who might be interested, I can confirm a successful acquisition of a dynamic IP address from a D-Link DSL-G604T router with 64-bit WEP from a "Cable & Wireless" re-badged USB stick running the Zydas ZD1211 chipset.

Kernel (from uname -a) is 2.6.23-ARCH #1 SMP PREEMPT Mon Nov 26 21:15:02 UTC

Details in the thread below and thanks.

http://bbs.archlinux.org/viewtopic.php? … 28#p306528

Offline

#72 2007-12-10 22:54:48

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

iggy: Missed your post on the last page, thats cause of a typo in an example config, it should be IP="dhcp" not IFOPTS="dhcp"

john: thanks for your testing!

Last edited by iphitus (2007-12-10 22:55:15)

Offline

#73 2007-12-11 03:02:26

sash
Member
Registered: 2005-10-16
Posts: 155

Re: netcfg2 is now in [testing]

Does anyone else have a problem using netcfg2 with the latest kernel and ndiswrapper packages?
I have to revert back to  kernel26 2.6.23.8-1 and ndiswrapper 1.49-3, or else I am getting continuous "DHCP request failed" messages (or something along that line").

When I revert to older packages, things work normally--I can connect from the 1st time just fine.

Offline

#74 2007-12-11 05:15:56

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: netcfg2 is now in [testing]

iphitus: Are there any plans to have a netcfg option or argument that will take down any existing interface when a new one is brought up?

For example, when I unplug my Ethernet and want to go wireless, I always have to remember to take down the eth0 profile before I bring up the wifi, otherwise it won't work. I realize I could just write a bash script that call both commands at once, but I was just wondering if there are any plans to have this option built-in.


thayer williams ~ cinderwick.ca

Offline

#75 2007-12-11 08:41:52

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg2 is now in [testing]

sash: File a bug on the bug tracker.

thayer: No plans no, but patches welcome. It probably wouldnt be so straightforward though, say if people use netcfg2 for loopback, etc. Might work better as an external script -- all the functions used in netcfg2 are re-usable and found in /usr/lib/network/

Offline

Board footer

Powered by FluxBB