You are not logged in.

#1 2012-05-04 17:30:35

kens
Member
Registered: 2011-11-11
Posts: 29

[SOLVED] wicd connecting to secure network (Buttons not working)

Hello all,

I have a laptop with a Broadcom 4312 wireless card in it. I have followed the wiki and installed the broadcom-wl drivers. I am trying to use wicd to setup my wireless.

When I open wicd-gtk, I get a list of wireless networks, one of which is mine. I try to connect to it, and it says I need a password and it opens up the Settings page for that network. Then I type in my password, but when I hit OK or Cancel, nothing happens. If I start wicd from a terminal, I see this as output:

$ wicd-gtk

** (process:1063): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** (process:1063): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

** (process:1063): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Importing pynotify failed, notifications disabled.
Has notifications support False
Loading...
Connecting to daemon...
Connected.
displaytray True
Done loading.
refreshing...
ESSID : <hidden>
ESSID : a_network
ESSID : another_network
setting encryption info...
Traceback (most recent call last):
  File "/usr/share/wicd/gtk/gui.py", line 666, in edit_advanced
    if self.run_settings_dialog(dialog, ttype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 679, in run_settings_dialog
    if self.save_settings(nettype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 644, in save_settings
    if not networkentry.save_wireless_settings(networkid):
  File "/usr/share/wicd/gtk/netentry.py", line 940, in save_wireless_settings
    return self.advanced_dialog.save_settings(networkid)
  File "/usr/share/wicd/gtk/netentry.py", line 591, in save_settings
    encrypt_methods[self.combo_encryption.get_active()]['type'])
  File "/usr/share/wicd/gtk/netentry.py", line 532, in set_net_prop
    wireless.SetWirelessProperty(self.networkID, option, value)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/wicd/daemon/wicd-daemon.py", line 1067, in SetWirelessProperty
    prop = misc.sanitize_config(prop)
  File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitize_config
    return s.translate(None, table)
TypeError: translate() takes exactly one argument (2 given)

I tried using the ncurses client but I get the same error. Also I tried editing /usr/lib/python2.7/site-packages/wicd/misc.py on line 433 and changing s.translate(None, table) to just s.translate(table), but I get the exact same error (2 arguments instead of 1, even though in the error message it shows the line as s.translate(table) which only is one argument).

Does anyone know how to fix this error? It's stopping me from using wireless, since I can't get wpa_supplicant working either.

Last edited by kens (2012-05-06 16:01:08)

Offline

#2 2012-05-04 17:51:36

Fallback
Member
From: Austria
Registered: 2009-12-26
Posts: 25

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

I have the same Problem since the update.

Offline

#3 2012-05-04 23:40:08

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

---

Last edited by frette (2025-04-08 15:57:57)

Offline

#4 2012-05-05 00:03:09

mr.MikyMaus
Member
From: disabled
Registered: 2006-03-31
Posts: 285

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

BC 4312 sucks, got it too and always had nothing but trouble. Using opensource driver though - you may give it a try, although this look more like a Wicd bug.

Anyway, how come you cannot get wpa_supplicant working? Maybe it's related...


What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...

... and who is general Failure and why is he reading my harddisk?

Offline

#5 2012-05-05 00:07:41

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

---

Last edited by frette (2025-04-08 15:58:10)

Offline

#6 2012-05-05 02:26:17

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

---

Last edited by frette (2025-04-08 15:58:21)

Offline

#7 2012-05-05 03:15:33

Hiram
Member
From: Brisbane, Australia
Registered: 2010-02-13
Posts: 67
Website

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

frette, I tried using the old function and it worked just  fine for me. What did it do for you? Keep in mind you'll have to restart wicd for change you make to take effect.

The problem here is they're assuming the string is an ascii string, when it's actually a unicode string. Here's a fix that works for the newer code;

def sanitize_config(s):
    """ Sanitize property names to be used in config-files. """
    allowed = string.ascii_letters + '_' + string.digits
    table = string.maketrans(allowed, ' ' * len(allowed))

    return str(s).translate(None, table)

The only change is on the last line. Make no mistake, that's a bad solution for handling unicode.

The problem is that DBus is sending a unicode string through to wicd, which wicd is not expecting. I tried the other route of modifying sanitize_config to better handle unicode strings, but that had... side effects. Like storing the reprs of lists in my /etc/wicd/wireless-settings.conf.

The more correct fix would be to update wicd to use unicode strings, which I imagine would be a rather large undertaking. Today my first encounter with wicd at all, let alone the code, so I couldn't say for sure how easy this change would be.

Edit: I hadn't refreshed before I posted this. Glad you found a fix in the end! smile

Last edited by Hiram (2012-05-05 03:18:36)

Offline

#8 2012-05-05 03:20:38

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

---

Last edited by frette (2025-04-08 15:58:32)

Offline

#9 2012-05-05 03:28:45

snoxu
Member
Registered: 2010-01-24
Posts: 141

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

I don't fully understand the fix, but you're my personal Jesus!

I've recently installed Arch and stumbled upon this thread after hours of racking my brain over why Wicd would not allow me to save any networks settings, making it completely useless. I was about ready to jump ship and install NM.

Last edited by snoxu (2012-05-05 03:31:29)

Offline

#10 2012-05-05 03:28:51

Hiram
Member
From: Brisbane, Australia
Registered: 2010-02-13
Posts: 67
Website

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

Yeah, they both work, which is the important thing smile

Offline

#11 2012-05-05 18:16:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,376

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

Yep, that fixed it.  Thanks all, and good job.
If anyone needs it, here is the patch for extra/wicd 1.7.2.4-1 /usr/share/wicd/daemon/wicd-daemon.py:

1067c1067
<         prop = misc.sanitize_config(prop)
---
>         prop = misc.sanitize_config(str(prop))
1411c1411
<             prop = misc.sanitize_config(prop)
---
>             prop = misc.sanitize_config(str(prop))

Last edited by ewaller (2012-05-05 18:17:11)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#12 2012-05-05 19:38:29

ise
Developer
From: Karlsruhe / Germany
Registered: 2005-10-06
Posts: 404
Website

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

This was reported upstream already: https://bugs.launchpad.net/wicd/+bug/993912
Here is the Arch Linux bug: https://bugs.archlinux.org/task/29709

Hopefully they will release a bugfix release soon...

Offline

#13 2012-05-05 21:25:25

netherscythe
Member
From: Canada
Registered: 2012-05-05
Posts: 1

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

Hi everyone,

I was having the same problem. Frette, your solution fixed it for me, thank you!


Offline

#14 2012-05-06 16:00:23

kens
Member
Registered: 2011-11-11
Posts: 29

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

Thanks guys, the fix indeed worked. I now know that it was because I didn't restart the wicd daemon that it was giving me an irrelevant error when I edited the python file smile

It still can't connect to networks with hidden SSID's though for some reason, it always fails with 'bad password' in the console. I unhid the SSID of my router and it actually gets connected, but seconds later it drops the connection and goes back to "unconnected". That's an unrelated problem though, so I'll start a new thread or something if I can't get it working. Thank you all for the help, I had to apply this patch to my other 2 computers running Arch too smile

Offline

#15 2012-05-07 01:00:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,376

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

It would appear that today's update to 1.7.2.4-2 has fixed the problem smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#16 2012-05-07 11:56:02

frette
Member
Registered: 2012-05-04
Posts: 35

Re: [SOLVED] wicd connecting to secure network (Buttons not working)

---

Last edited by frette (2025-04-08 15:59:29)

Offline

Board footer

Powered by FluxBB