On Wed, Mar 24, 2010 at 5:05 AM, Pavel Roskin <proski@gnu.org> wrote:
On Tue, 2010-03-23 at 12:36 +0200, Mohammad Abdelhadi wrote:

> Thank you for the reply, I did mark the interface as unmanaged and I
> confirmed that, then I repeated  the steps and I established two
> interfaces using the same cell (checked by iwconfig) but still when I
> use (ping) command to test the connection
> (https://help.ubuntu.com/community/WifiDocs/Adhoc)   the result is
> "Destination Host Unreachable"...  Any suggestions?

It worked for me.

That's how you can troubleshoot the problem:

Make sure both interfaces are in ad-hoc mode, using the same channel and
ESSID, and the cell number is indeed the same.

Make sure both cards see each other in the scan results.  The MAC
address shown by iwlist is the cell address of the other card.

Use ifconfig to check that both cards have different IP addresses.  Use
route to see if the remote IP address is routed via the wireless card.

Run ping on one side and use tshark on both sides on the wireless
interface to make see if the packets are going in both directions.

Use iptables to see if there are any firewall rules that would prevent
sending or receiving packets.

Use a separate interface in monitor mode to see what is happening on the

Pavel Roskin

Hi Pavel,

After I marked the interface as unmanaged, I did the following on both cards:

  wlanconfig ath0 destroy
  wlanconfig ath0 create wlandev wifi0 wlanmode adhoc
  iwconfig ath0 mode ad-hoc
  iwconfig ath0 essid 'name'
iwconfig ath0 channel 2
ifconfig ath0 up
dhclient ath0 (didn't work so I set up an IP address)
ifconfig ath0 'IP Address'

Did I forget something?

- then when I used (iwconfig) every thing was in its right place (essid, channel, adhoc mode, cell number).
- when I used (iwlist) the two cards reported the information well, except one of them couldn't give the essid ( it shows an empty essid; ESSID=' ')!!!
- Ping hasn't worked well yet.
- I used (iptables), and it seems that there is no firewall rules.

Any comments or further suggestions?

Thank you in advance..

Mohammad Jaser Abdelhadi
Communications Engineering-Senior Student
Princess Sumaya University for Technology
Mobile: +962777030924
Email: moh.jaser@yahoo.com \ mo.jaser@gmail.com