# JoikuSpot: wicd vs net.wlan0 and wpa_gui

## Havin_it

Hi,

For a couple of years I've been using JoikuSpot on my Nokia N95 8GB phone to tether my netbook. However, in all that time, getting connected on Gentoo has been a headache. The netbook's wifi hardware is an Atheros AR5007EG (aka AR2425 chip) miniPCIe card and I use the ath5k driver.

I normally use wicd for my wifi needs, and it doesn't play well with ad-hoc connections: using the "Create Ad-hoc network" dialog achieves nothing more than setting the channel and ESSID, and the mode to ad-hoc, so I have to manually use iwconfig to set the WEP key, then issue a dhcpcd command to get connected.

That alone I could cope with, but the dhcpcd bit is EXTREMELY hit-and-miss. It seems like I need to hit the command at exactly the right instant while the phone app is starting up (a ~10s process with no meaningful progress indicator) for it to get a lease. After upgrading to the latest paid version of the app, it seems even less reliable.

On WinXP on the same machine, there's no issue whatsoever. Whether the app is just starting or still running (after many failed attempts to connect via Gentoo), connection and leasing happen immediately.

This does mean that I can then reboot back into Gentoo, run through the wicd+dhcpcd steps above, and claim the already-granted lease reliably. But I'd rather not have to boot Windows just so I can get the connection: all that faffing around takes away half my lunch-hour!

So, my question is simple: what is Windows's DHCP client doing that dhcpcd isn't? And can I, by using appropriate arguments to dhcpcd or even by using a different DHCP client if necessary, emulate it?

Thanks in advance.Last edited by Havin_it on Mon Sep 12, 2011 11:47 am; edited 1 time in total

----------

## Hu

 *Havin_it wrote:*   

> So, my question is simple: what is Windows's DHCP client doing that dhcpcd isn't? And can I, by using appropriate arguments to dhcpcd or even by using a different DHCP client if necessary, emulate it?

 A tcpdump or wireshark packet capture of the Windows lease acquisition, the failed Gentoo lease acquisition, and the successful Gentoo lease reclaim (post-Windows) would be helpful to answer this question.

However, if the reliability decreased after changing the application on the phone, this sounds like a bug in the phone software.  You may be better off getting them to fix their DHCP server.

----------

## Havin_it

Hi, thanks for the ideas, and sorry for the slow reply - fetchmail silently died on me (again)  :Sad: 

Actually it looks like I haven't looked at this holistically enough. I was quick to blame dhcpcd, but actually the problem might be elsewhere in the stack.  I decided to try, instead of initialising the process with wicd then kludging the rest on the commandline, going back to my old setup of net.wlan0 initscript and wpa_gui.  With this, the connection worked immediately.

I now wonder if the kludgery may have been the problem.  The ability to associate with the wifi peer (the phone) should be handled by wpa_supplicant under wicd, but my commandline interference could be preventing that from happening.

It's good to know that there is a (fairly) simple and quick way to connect to JoikuSpot, but it's a shame that wicd is not it, since it ticks all the other boxes for my needs (particularly wired and wireless settings being under one roof).

Anyway, I'll look a bit deeper into what the programs are doing, and see if I can isolate it. It might be that I can use a script with wicd to coax it into the desired behaviour, or maybe I can turn it into some feedback for the devs.

Thread title changed to reflect situation more accurately.

----------

