You are not logged in.

#1 2010-10-16 19:42:00

duke11235
Member
Registered: 2009-10-09
Posts: 221

Netcfg Ad Hoc

I'm trying to create an adhoc network for a party tonight using netcfg. However, I've been unsuccessful. It's probably a configuration error, but I don't see it. Thanks
adhoc profile

CONNECTION="wireless"
DESCRIPTION="A simple WPA encrypted wireless connection"
INTERFACE=wlan0
SCAN="no"
TIMEOUT="15"
SECURITY="wpa"
CHANNEL="3"
ESSID="duke"
KEY="yourdoom"
IP="dhcp"
DHCP_TIMEOUT="10"
PREUP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc"

Error Upon running netcfg2

 WPA Authentication/Association Failed

I've done this with wpa_supplicant. Is there a way to create an ad hoc wpa network with netcfg?

EDIT: Incorrect. Only Macs cant create wpa ad hoc

Last edited by duke11235 (2010-10-16 21:34:20)

Offline

#2 2010-10-16 20:05:25

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: Netcfg Ad Hoc

Sorry that I can't help much – but that error message comes up in many instances where it doesn't make much sense. For instance when I attempted to connect to a WEP encrypted wireless network and when the access point was not within range. Honestly it is pretty motivating to learn programming properly with all the frustrations that I have had with Netcfg, so that I hopefully may make it less frustrating some day.

I believe most, if not all of netcfg is implemented in bash script – so you should be able to do the same things as netcfg with other commands.

Offline

#3 2010-10-16 20:09:27

duke11235
Member
Registered: 2009-10-09
Posts: 221

Re: Netcfg Ad Hoc

Yeah, it works with wpa_supplicant. But I was hoping for a solution under netcfg and using wpa

Offline

#4 2010-10-16 21:15:47

Gusar
Member
Registered: 2009-08-25
Posts: 3,604

Re: Netcfg Ad Hoc

Just tested, this works:

CONNECTION="wireless"
INTERFACE="wlan0"
SECURITY="wpa-configsection"
IP="static"
ADDR="192.168.0.1"
CONFIGSECTION='
    ssid="ssid_here"
    mode=1
    frequency=2412
    psk="psk_here"'

This is for the "master" machine, which is running dnsmasq. The other machine has IP="dhcp"

Offline

#5 2010-10-16 21:44:50

duke11235
Member
Registered: 2009-10-09
Posts: 221

Re: Netcfg Ad Hoc

To connect to this network, what would be the username? Other than that this works perfectly. I need it to work on windows as well. Mac asks for a username

Last edited by duke11235 (2010-10-16 23:27:56)

Offline

Board footer

Powered by FluxBB