[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ad-hoc wifi - network unreachable



On Sat, 06 Aug 2011 21:10:53 +0200
Vincent Lefevre <vincent@vinc17.net> wrote:

> On 2011-08-05 09:42:11 -0400, Robert Blair Mason Jr. wrote:
> > I am unable to connect to adhoc networks on debian sid using wicd.
> > Whenever I try to connect to an adhoc network (in this case the one
> > broadcast by barnacle on my phone, but the problem is reproducible
> > on any adhoc network), wicd appears to go through all of the steps
> > to connect successfully but then at the last second fails saying
> > 'not connected', and ping complains that the network is unreachable.
> 
> I also sometimes connect to an adhoc network with wicd (between my
> Debian laptop and my Nokia N900), and I also get random failures.
> Otherwise I use a small script running ifconfig and iwconfig directly:
> 
> /etc/init.d/wicd stop
> ifconfig wlan0 down
> iwconfig wlan0 essid xxx mode Ad-Hoc channel 1 key yyy
> ifconfig wlan0 up 192.168.17.3
> iwconfig wlan0 essid xxx mode Ad-Hoc channel 1 key yyy
> 
> With that, I always get the IP address, but the network connection
> itself doesn't always work (test with ping).
> 

Thanks for your help!  I was finally able to get it to work with the
following, which I put into a script:

/etc/init.d/wicd stop
ifconfig $IFACE down
iwconfig $IFACE essid $ESSID mode Ad-Hoc channel $CHANNEL
ifconfig $IFACE up $IPADDR
iwconfig $IFACE essid $ESSID mode Ad-Hoc channel $CHANNEL
route add default gw $DEFAULTGW $IFACE

Adding google dns into resolv.conf allowed me to successfully get
internet.  I now have a couple of questions:

1.  Why do I have to call iwconfig twice?
2.  Is wicd at fault in this case?  If so, should I file a bug report?

--
rbmj


Reply to: