# [SOLVED] wicd: arbitrary escape characters in essid (ddwrt)

## cach0rr0

for searchability, original subject: "wicd: arbitrary escape characters in AP essid && 'bad password' "

g'day 

Anyone else stumbled onto a situation where wicd shows your wireless AP's essid as being...instead of a normal ascii string (in my case 'crackme'), being a single solitary control character? 

In my case, as taken from wicd.log:

```

2010/10/03 21:26:29 :: ['/usr/bin/wpa_passphrase', '\x06', '<snipped>']

2010/10/03 21:26:29 :: Attempting to authenticate...

2010/10/03 21:26:29 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/687f7464954e', '-D', 'nl80211']

2010/10/03 21:26:29 :: ['iwconfig', 'wlan0', 'essid', '\x06']

2010/10/03 21:26:29 :: iwconfig wlan0 channel 6

```

\x06 ? what the deuce? 

I try changing the essid in /etc/wicd/wireless-settings.conf, and /var/lib/wicd/configurations/687f7464954e, but of course this change does not persist. 

Note that I've tried both wext and nl80211, and it's the same behaviour on both. 

Scanning with iwlist shows the correct essid:

```

wlan0     Scan completed :

          Cell 01 - Address: 68:7F:74:64:95:4E

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=54/70  Signal level=-56 dBm  

                    Encryption key:on

                    ESSID:"crackme"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s

                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s

                    ESSID:""

                    Mode:Unknown/bug

                    Extra:tsf=000000002d838f83

                    Extra: Last beacon: 49ms ago

                    IE: Unknown: 0007637261636B6D65

                    IE: Unknown: 010882848B960C121824

                    IE: Unknown: 030106

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (2) : CCMP TKIP

                        Authentication Suites (1) : PSK

                    IE: Unknown: 2A0100

                    IE: Unknown: 32043048606C

                    IE: Unknown: DD180050F2020101020003A4000027A4000042435E0062322F00

                    IE: Unknown: 331ACC131B0000000000000000000000000000000000000000000000

                    IE: Unknown: 2D1ACC131B0000000000000000000000000000000000000000000000

                    IE: Unknown: 341606001B00000000000000000000000000000000000000

                    IE: Unknown: 3D1606001B00000000000000000000000000000000000000

                    IE: Unknown: 4A0E14000A002C01C800140005001900

                    IE: Unknown: 7F0101

                    IE: Unknown: DD0900037F01010000FF7F

                    IE: Unknown: DD0A00037F04010000000000

          Cell 02 - Address: 00:1D:5A:1F:9F:01

```

But alas in the UI it shows the lovely little square with 

0 0 

0 6

as well in the aforementioned files, showing '^F' 

Every time i restart wicd, or, attempt to connect to one of these AP's it of course overwrites any manual changes I make, so I'm not sure exactly what's up. 

For reference, I'm able to connect via wpa_supplicant without issue, just doing

```

wpa_supplicant -D(nl80211|wext) -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

```

and then firing off dhcpcd wlan0

No issue with the manual connection, using the following wpa_supplicant.conf:

```

# cat /etc/wpa_supplicant/wpa_supplicant.conf 

network={

ssid="crackme"

scan_ssid=1

key_mgmt=WPA-PSK

psk="<snipped>"

}

```

I can't tell where on earth wicd is picking up this strange non-printable character. Any ideas? 

As far as visible symptoms go, as mentioned above I see the little square with '0 0 0 6' in the wicd UI, and of course it fails to connect to the AP with an error message of 'Bad Password'. The password is of course perfectly fine. Far as I can tell, the issue is undoubtedly with its strange interpretation of my essid. 

Happy to post more of the wicd.log or anything else anyone deems useful. 

Hardware:

```

02:00.0 Network controller: Intel Corporation WiFi Link 1000 Series

        Subsystem: Intel Corporation WiFi Link 1000 Series 1000BGN

```

(using iwlagn, with modprobe arg '11n_disable=1' since N is unstable as all hell with this setup - that modprobe arg has no bearing on this behaviour)

AP is a Linksys WRT400N, running DD-WRT, confirmed behaviour on both 14289 and and 14896 builds

No other AP's in my area exhibit this. Presumably, they're not running DD-WRT, but I have trouble believing that's the pertinent variable, largely because I have another gentoo laptop here where wicd works without issue, running 2.6.34 instead of 2.6.35, as well because iwlist scan shows things correctly on both. The only variables between the two laptops that are pertinent to this, are the kernel version, and the driver (other is ath9k on an AR928x). Works fine on the Atheros rig, has done this since day one on the iwlagn laptop. 

Fun stuff! 

Anyway, pass on any ideas you may have. For now it's not horribly painful since wpa_supplicant && dhcpcd by hand give me a stable connection (heh...well, with 11n_disable=1 at least, Wireless-N under Linux is...err...dicey? interesting? fun!?) but of course I'd love to find a root cause of this, with hopes it can help someone else out as well. 

Thanks in advance.

----------

## cach0rr0

solved this

nothing to do with the gentoo install. I'll explain what I did with hopes it helps someone else. 

So, this was a dd-wrt issue. Why does it affect my iwlagn machine (HP Pavillion DV4) and not my ath9k machine (Acer Aspire 4736z) I couldn't begin to say, unless it's a subtle difference between 2.6.34(-zen3 I believe) and 2.6.35(-zen3), or, a subtle difference between drivers? Who knows. 

Anyway, I tried changing the mode for one NIC on dd-wrt from its original (N&G mixed) to BG, to just G, no joy. 

I finally had the brilliant idea of changing the channel mode on ath1 on the router from "Dynamic 20MHz/40MHz" to just "Turbo 40MHz", and made sure ath0 was set to simply "Full 20MHz"

I don't think the G vs NG vs BG is relevant, but since it's working, and it's late, I can't be bothered experimenting further. 

Since image hosts expire eventually, and I'm so lazy with my server maintenance I'll forget this cap is even there, I've uploaded a shot of my settings for anyone else who encounters this, and may stumble upon it at some point. Settings here - http://whitehathouston.com/ddwrt.png

Hopefully this gets indexed and some other poor soul who's banging their head on this finds the thread  :Smile: 

----------

