Unable to connect to ad-hoc network

Reported by mungewell on 2007-08-01
46
This bug affects 6 people
Affects Status Importance Assigned to Milestone
wicd
Medium
Unassigned

Bug Description

Running on Feisty.

I am unable to connect to a ad-hoc network as Wicd appears to set the interface up in managed mode, even though it recognised that the network is ad-hoc.

This causes the whole application to get stuck in the connecting stage, the only solution is to quit the gui and stop/start the deamon.
Simon.

Related branches

Adam Blackburn (adamblackburn) wrote :

What wireless card do you have, and what is the output of

sudo iwlist scan

?

mungewell (simon-mungewell) wrote :

see attached files.

mungewell (simon-mungewell) wrote :
Dan O'Reilly (oreilldf) wrote :

Could you start the connection process in wicd, then once it gets stuck assigning the ip, run a terminal and post the output of iwconfig?

mungewell (simon-mungewell) wrote :

whilst connected to managed network
---
simon@tupak:~$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:0F:B5:D4:66:F8
          inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::20f:b5ff:fed4:66f8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:74 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1371 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8822 (8.6 KiB) TX bytes:360008 (351.5 KiB)

simon@tupak:~$ iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"linksys"
          Mode:Managed Frequency:2.437 GHz Access Point: 00:0F:66:AB:07:13
          RTS thr:off Fragment thr=2346 B
          Link Quality=36/64 Signal level=37/65
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
---

Whilst attempting to connect to ad-hoc network, stuck at 'setting IP' stage (actually using fixed IP of 10.20.30.40/255.0.0.0 with no DNS)
---
simon@tupak:~$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:0F:B5:D4:66:F8
          inet addr:10.20.30.40 Bcast:10.255.255.255 Mask:255.0.0.0
          inet6 addr: fe80::20f:b5ff:fed4:66f8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1440 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11272 (11.0 KiB) TX bytes:367557 (358.9 KiB)

simon@tupak:~$ iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"calgarymesh"
          Mode:Managed Frequency:2.437 GHz Access Point: 00:0F:66:AB:07:13
          RTS thr:off Fragment thr=2346 B
          Link Quality=35/64 Signal level=38/65
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0
---

Note 'managed' and BSSID is wrong - i.e. it has not connected to other wireless node.

I should also mention that this is Xubuntu Feisty. Thanks for the speedy replies, oh how I love the open source model....
Simon

Dan O'Reilly (oreilldf) wrote :

Try doing this with the fixed networking.py. I'm wondering if the channel variable being set to None is causing some problems during the connection process.

mungewell (simon-mungewell) wrote :

Hi,
Using the suggested files from https://bugs.launchpad.net/wicd/+bug/129610

On 'connect' it would appear to choke before it starts setting up connection.

---
connecting to wireless network...
Traceback (most recent call last):
  File "/opt/wicd/gui.py", line 927, in connect
    wireless.ConnectWireless(networkid)
  File "/var/lib/python-support/python2.5/dbus/proxies.py", line 169, in __call__
    reply_message = self._connection.send_message_with_reply_and_block(message, timeout)
dbus.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/dbus/service.py", line 451, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/opt/wicd/daemon.py", line 367, in ConnectWireless
    return self.wifi.Connect(self.LastScan[id])
  File "/opt/wicd/networking.py", line 242, in Connect
    self.ConnectingThread = self.ConnectThread(network,self.wireless_interface,self.wired_interface,self.wpa_driver,self.before_script,self.after_script,self.global_dns_1,self.global_dns_2,self.global_dns_3)
AttributeError: Wireless instance has no attribute 'global_dns_1'
---

Cheers,
Simon.

Dan O'Reilly (oreilldf) wrote :

Oops, looks like you're not using version 1.3.3. My fault for not asking about that first. Download wicd 1.3.3 from www.sourceforge.net/projects/wicd, download the new files linked to in the other bug report, then try connecting.

Dan O'Reilly (oreilldf) on 2007-08-06
Changed in wicd:
assignee: nobody → oreilldf
status: New → In Progress
Luis Nogueira (lnogueir-med) wrote :

I am unable to connect to a windows xp protect ad-hoc network! The only way I can connect it's unprotected the network...

I am running ubuntu gutsy and wicd 1.3.8!

blasco51 (blasco-bonito) wrote :

I also am unable to connect to ad-hoc networks. wicd does not change mode from managed to ad-hoc.
I am running wicd 1.5.3 on ubuntu 8.04.1 with ath5k driver

I am using this method: a pre-connection script configured on the ad-hoc network:
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
with it wicd connects to the ad-hoc network, the link works well but the network does not get a disconnect button. why?
I tried to configure a disconnect script on the ad-hoc network:
ifconfig wlan0 down
iwconfig wlan0 mode managed
but it is not executed :-( is this related to the missing disconnect button?
so the only impractical way is to put it as pre-connection script on every managed network.

guanx (guanx-bac) wrote :

I also have this problem. Please bring up the interface as late as possible. Please refer to the attached patch.

I've applied the patch, but wicd continues to fail to connect to ad-hoc
network.

Blasco

2009/3/17 guanx <email address hidden>

> I also have this problem. Please bring up the interface as late as
> possible. Please refer to the attached patch.
>
> ** Attachment added: "wicd-1.5.9-setmode.patch"
> http://launchpadlibrarian.net/23998045/wicd-1.5.9-setmode.patch
>
> --
> Unable to connect to ad-hoc network
> https://bugs.launchpad.net/bugs/129608
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
>
> Bug description:
> Running on Feisty.
>
> I am unable to connect to a ad-hoc network as Wicd appears to set the
> interface up in managed mode, even though it recognised that the network is
> ad-hoc.
>
> This causes the whole application to get stuck in the connecting stage, the
> only solution is to quit the gui and stop/start the deamon.
> Simon.
>

--
Antonio-Blasco Bonito
Via Vico Fiaschi 35
54033 Carrara Avenza MS

tel. 0585-091000
cell. 340-6199450

Dan O'Reilly (oreilldf) wrote :

blasco,

are you still using 1.5.3? Could you upgrade to 1.5.9 and try again (if you're not using it already). Try it with the patch applied as well.

blasco51 (blasco-bonito) wrote :

 dpkg -l wicd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-f/Unpacked/Failed-cfg/Half-inst/t-aWait/T-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Nome Versione Descrizione
+++-==============-==============-============================================
ii wicd 1.5.9 wired and wireless network manager

2009/3/19 Dan O'Reilly <email address hidden>

> blasco,
>
> are you still using 1.5.3? Could you upgrade to 1.5.9 and try again (if
> you're not using it already). Try it with the patch applied as well.
>
> --
> Unable to connect to ad-hoc network
> https://bugs.launchpad.net/bugs/129608
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
>
> Bug description:
> Running on Feisty.
>
> I am unable to connect to a ad-hoc network as Wicd appears to set the
> interface up in managed mode, even though it recognised that the network is
> ad-hoc.
>
> This causes the whole application to get stuck in the connecting stage, the
> only solution is to quit the gui and stop/start the deamon.
> Simon.
>

--
Antonio-Blasco Bonito
Via Vico Fiaschi 35
54033 Carrara Avenza MS

tel. 0585-091000
cell. 340-6199450

SirG (sirg-nj) wrote :

Running 1.5.9 on intrepid/EEE PC. The 'card' is AtherosAR928X, using ath9k driver.

At least with this chipset, the mode cannot be set when the interface is up:
# iwconfig wlan0 mode Ad-Hoc
Error for wireless request "Set Mode" (8B06) :
      SET failed on device wlan0 ; Device or resource busy.

The above patch does NOT work, of course.

Workaround:
- create a pre-connection script with:
ifconfig wlan0 down
iwconfig wlan0 mode Ad-Hoc

- create a disconnection script with:
ifconfig wlan0 down
iwconfig wlan0 mode Managed

The per-network button is still stuck at 'Connect' with the above; use the 'Disconnect' button at the top of the window.

Workaround 2:

SirG (sirg-nj) wrote :

Ooops. Too quick on the "Save" button. Continuing...

Apply the attached patch (note the directory). This neither fixes the Connect/Disconnect button state nor causes the connection strength to be reported properly when connected. I will investigate these too.

Does someone know if setting the wireless mode is supposed to work when the interface is up? Seems unlikely.

It would be helpful if a few people with other chipsets reported here whether changing the wireless mode works for them when the interface is up/down. Do (as root) 'ifconfig wlan0 [up|down]; iwconfig wlan0 mode Managed'.

tetzlav (tetzlav-leipzig) wrote :

Jupp! :)
The attached patch solved this Problem for me.

tetzlav (tetzlav-leipzig) wrote :

k, now another bug:
With wicd_set-mode-fix.patch ad-hoc works now for me, but in the list of available networks is no [Disconnect]-button - but in task-bar is right state "Connected to ad-hoc-test at..."

Dan O'Reilly (oreilldf) wrote :

It definitely looks like setting the mode needs to be done with the interface down. I'll try to investigate some of the other issues (Disconnect button not appearing) as well.

Changed in wicd:
importance: Undecided → Medium
silasdavis (forums-silasdavis) wrote :

I can report the same issue as laid out by SirG. I have the following chipset:

03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
 Subsystem: Intel Corporation PRO/Wireless 3945ABG Network Connection
 Flags: bus master, fast devsel, latency 0, IRQ 26
 Memory at d0000000 (32-bit, non-prefetchable) [size=4K]
 Capabilities: [c8] Power Management version 2
 Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable+
 Capabilities: [e0] Express Legacy Endpoint, MSI 00
 Capabilities: [100] Advanced Error Reporting
  UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq+ ACSVoil-
  UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-
  UESvrt: DLP+ SDES- TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-
  CESta: RxErr- BadTLP- BadDLLP+ Rollover- Timeout- NonFatalErr-
  CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
  AERCap: First Error Pointer: 14, GenCap- CGenEn- ChkCap- ChkEn-
 Capabilities: [140] Device Serial Number 5c-9a-cf-ff-ff-d2-19-00
 Kernel driver in use: iwl3945
 Kernel modules: iwl3945

I find that "iwconfig wlan0 essid <network> mode Ad-Hoc" fails when the wlan0 is up in managed mode to start with:

Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Device or resource busy.

However, the sequence:

ifconfig wlan0 down
iwconfig wlan0 mode Ad-Hoc
ifconfig wlan0 up
iwconfig wlan0 essid <network>

Sucessfully allows me to connect. It would be helpful if wicd could manage this, as this was one of the main reasons for me swapping from pure wpa_supplicant (which requires ap_scan=2 being added to allow adhoc networks to be associated with properly).

Thanks for your work.

Sage Major (sage-majorfamily) wrote :

Hi guys. I wanted to jump in here and add my experience with the patch.
After installing the patch wicd works better. I now get an IP and the tray icon shows connected. The main app however does not think I am connected at will try and reconnect every minute or so taking down my network.

If it matters I am connecting to my cell phone a HTC pro running WMWIFIRouter as a access point

 I am using a Dell I bought preinstalled with Ubuntu 8.04
My card is a intel 3945ABC

Sage

Dan O'Reilly (oreilldf) wrote :

@Sage Major

What does the output of iwconfig and ifconfig look like after you get connected?

Sage Major (sage-majorfamily) wrote :

In the time it ook em to cut and paste this it rescanned 3 times

at the bottom it says connected to sage_htc 0db with an ip listed.
The connect button is lit available. I have attached a screen shot.

root@sage-laptop:~# ifconfig -a wlan0
wlan0 Link encap:Ethernet HWaddr 00:1f:3c:b6:91:f2
          inet6 addr: fe80::21f:3cff:feb6:91f2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1550 (1.5 KB) TX bytes:1296 (1.2 KB)

root@sage-laptop:~# iwconfig wlan0
wlan0 IEEE 802.11abg ESSID:"sage_htc"
          Mode:Ad-Hoc Frequency:2.412 GHz Cell: 02:21:E8:47:1A:0C
          Tx-Power=15 dBm
          Retry min limit:7 RTS thr:off Fragment thr=2352 B
          Encryption key:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
          Tx excessive retries:0 Invalid misc:0 Missed beacon:0

On Fri, May 15, 2009 at 9:19 AM, Dan O'Reilly <email address hidden> wrote:
> @Sage Major
>
> What does the output of iwconfig and ifconfig look like after you get
> connected?
>
> --
> Unable to connect to ad-hoc network
> https://bugs.launchpad.net/bugs/129608
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in wicd: In Progress
>
> Bug description:
> Running on Feisty.
>
> I am unable to connect to a ad-hoc network as Wicd appears to set the interface up in managed mode, even though it recognised that the network is ad-hoc.
>
> This causes the whole application to get stuck in the connecting stage, the only solution is to quit the gui and stop/start the deamon.
> Simon.
>

Dan O'Reilly (oreilldf) wrote :

Wicd is disconnecting you because you have no signal strength (0 link quality and 0 signal level in iwconfig), which it interprets to mean your connection is lost. Are you actually able to use the connection once you make it?

Sage Major (sage-majorfamily) wrote :

Yes i can use the connection when it shows as connected in the tray. Iposted my previous message from it. When it goes to searching i loose my connection.

-----Original Message-----
From: Dan O'Reilly <email address hidden>
Sent: Friday, May 15, 2009 10:44 AM
To: <email address hidden>
Subject: [Bug 129608] Re: Unable to connect to ad-hoc network

Wicd is disconnecting you because you have no signal strength (0 link
quality and 0 signal level in iwconfig), which it interprets to mean
your connection is lost. Are you actually able to use the connection
once you make it?

--
Unable to connect to ad-hoc network
https://bugs.launchpad.net/bugs/129608
You received this bug notification because you are a direct subscriber
of the bug.

Status in wicd: In Progress

Bug description:
Running on Feisty.

I am unable to connect to a ad-hoc network as Wicd appears to set the interface up in managed mode, even though it recognised that the network is ad-hoc.

This causes the whole application to get stuck in the connecting stage, the only solution is to quit the gui and stop/start the deamon.
Simon.

Dan O'Reilly (oreilldf) wrote :

Ok, sounds like your wireless driver may just be buggy then. You can work around it by disabling the "Automatically reconnect on connection loss" checkbox in wicd preferences. This should keep wicd from killing your connection and trying to establish a new one.

bblokar (bblokar) wrote :

Same problem here.

Adam Blackburn (adamblackburn) wrote :

Does Dan's proposed solution below fix the problem?

Ok, sounds like your wireless driver may just be buggy then. You can work around it by disabling the "Automatically reconnect on connection loss" checkbox in wicd preferences. This should keep wicd from killing your connection and trying to establish a new one.

Changed in wicd:
status: In Progress → Incomplete
Sage Major (sage-majorfamily) wrote :

I downloaded 1.6.2 and this patch is not in it. Will making the same code changes as listed in the patch here fix the same issue on the new version?

wineos (wineos) wrote :

The same here.

I can connect using "iwconfig mode ad-hoc", but wicd can't.

Dan O'Reilly (oreilldf) wrote :

1.6.2 sets the mode while the interface is down, so it should behave no differently than the patch:

        # Take down interface and clean up previous connections.
        self.put_iface_down(wiface) # Interface goes down
        self.release_dhcp_clients(wiface)
        self.reset_ip_addresses(wiface)
        self.stop_wpa(wiface)
        self.flush_routes(wiface)
        wiface.SetMode(self.network['mode']) # Mode gets set

        # Put interface up.
        self.SetStatus('configuring_interface')
        self.put_iface_up(wiface) # Interface goes up

@wineos, can you enable debug mode, try connecting to an ad-hoc network, and attach /var/log/wicd/wicd.log?

Joe Kowalski (joekowalski) wrote :

I'm running into this problem with wicd-1.7.0 and an iwl4965 card trying to connect to an android wireless tethering network. Debugging advice would be very helpful.

haxwithaxe (mannkoepke) wrote :

I connot connect to an adhoc network via wicd but "ifconfig wlan0 down && iwconfig wlan0 mode Ad-Hoc && iwconfig wlan0 essid haxdroid key off && ifconfig wlan0 up && dhclient wlan0" works just fine
I'm running Ubuntu 10.04 amd64 and Wicd 1.7.0
lspci output for my wificard:
           03:00.0 Network controller: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection

Kavli (ronny-kavli) wrote :

I've got the same problem. Been trying to nail it down today.

System is 10.04 on a EeePC 901 with wicd 1.7.0.
The Ad-Hoc-mode AP is a Nokia E95 8GB, running JoikuSpot.
 01:00.0 Network controller: RaLink RT2860

Just as haxitwithaxe, I've no problems bringing up a working connection by hand, using his approach.

I've added some debug-lines in networking.py to try to see where it fails.

The question is why Disconnect is being called after a successful connect and dhcp-handshake.
Since the connect-thread seem to be doing everything right, there must be some monitoring thread somewhere which doesn't like the state the link is in and then decide to flush it.

 -- K

Thomas Dziedzic (gostrc) wrote :

archlinux bug with patch: https://bugs.archlinux.org/task/22057

Adam Blackburn (adamblackburn) wrote :

Thanks, applied.

Changed in wicd:
status: Incomplete → Fix Committed
assignee: Dan O'Reilly (oreilldf) → nobody
David Paleino (dpaleino) on 2012-02-05
Changed in wicd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers