Discussion:
Communication btw. two RPi's in Adhoc (OLSR)
Shyam B
2013-09-10 18:14:01 UTC
Permalink
Hi Henning, Teco,
https://wiki.debian.org/WiFi/AdHoc
WiFi - Edimax 7811un adaptor, Raspberry PI Model B (Raspbian Wheezy OS). It
has the driver installed (8192cu driver) by default in the distro.

Yes, I do have a different IP configured on two RPi's. I can ping each
other on eth0 but not on wlan0 (in Ad-hoc). wlan0's are configured on a
different static addr' inside the same subnet. Do I need to use any
specific protocol for Adhoc to see each other for ping (I guess, not!). I *
cannot* see the wlan0 interface when I type 'route -n' in command line when
in simple AdHoc (without OLSR).

*Attachments:*
*
*
*Picture*: The two wireless RPi's have Edimax wifi dongle (not WiPi as
shown). This was an older picture but its how my simple setup looks.
*Zip file*: /etc/network/interfaces settings for pi1 and pi2.
iwconfig on both.

*What I did:*
- @Teco: I configured on Channel 11 because I personally love this channel
:) I have tried on other channels as well between 1 to 11 (same result, but
I don't think this may be of concern).
- Arp-scan is 'unable' to see the MAC address of the other device. If this
works, I should have some hope!
- Arp-scan is 'able' to see the MAC address of the other Wi-FI dongle
device (when I connect the two via eth0 (no wireless)).
- The question on the gateway was that if I need a router to route the
individual traffic of the two RPi's, even for a single hop?
- @ Henning, I could not find the "iw wlan0 station dump" for Raspbian,
iwconfig did not provide the dump. I can see bytes being sent/ received on
wlan0 at both ends (Tx/ Rx bytes) as I see from ifconfig wlan0.
--
Best Regards,
Shyam
Thijs van Veen
2013-09-11 07:25:31 UTC
Permalink
Hello Shyam,

I think your primary problem here is your subnet mask.
You have assigned the mask 255.255.255.255, meaning only the indicated
ip address is in the network. Both the other RPi and the broadcast
address aren't, meaning your ARP broadcasts have no known network to go
to.

If you wish to use 192.168.255.255 as the broadcast address, you
should set the subnet mask to 255.255.0.0.

See http://en.wikipedia.org/wiki/Subnet_mask#IPv4_subnetting for more
information on IPv4 subnets.Very short summary: in a netmask 255 means
the octet is part of the network identifier, 0 means it's part of the
host identifier.

Also, in your pi1 config, you use both wireless-channel and
wireless-freq. Try to use either of them (not both). Seeing as they
both set the same parameter, this will keep your configuration simple
and will prevent potential conflicts.

I hope this helps.
--
Thijs van Veen
[1]***@operamail.com


On Tue, Sep 10, 2013, at 20:14, Shyam B wrote:

Hi Henning, Teco,

The procedure I followed (Debian Method) for setup as in here:

[2]https://wiki.debian.org/WiFi/AdHoc


WiFi - Edimax 7811un adaptor, Raspberry PI Model B (Raspbian Wheezy
OS). It has the driver installed (8192cu driver) by default in the
distro.

Yes, I do have a different IP configured on two RPi's. I can ping each
other on eth0 but not on wlan0 (in Ad-hoc). wlan0's are configured on a
different static addr' inside the same subnet. Do I need to use any
specific protocol for Adhoc to see each other for ping (I guess, not!).
I cannot see the wlan0 interface when I type 'route -n' in command line
when in simple AdHoc (without OLSR).

Attachments:

Picture: The two wireless RPi's have Edimax wifi dongle (not WiPi as
shown). This was an older picture but its how my simple setup looks.
Zip file: /etc/network/interfaces settings for pi1 and pi2.
iwconfig on both.

What I did:
- @Teco: I configured on Channel 11 because I personally love this
channel :) I have tried on other channels as well between 1 to 11 (same
result, but I don't think this may be of concern).
- Arp-scan is 'unable' to see the MAC address of the other device. If
this works, I should have some hope!
- Arp-scan is 'able' to see the MAC address of the other Wi-FI dongle
device (when I connect the two via eth0 (no wireless)).
- The question on the gateway was that if I need a router to route the
individual traffic of the two RPi's, even for a single hop?
- @ Henning, I could not find the "iw wlan0 station dump" for Raspbian,
iwconfig did not provide the dump. I can see bytes being sent/ received
on wlan0 at both ends (Tx/ Rx bytes) as I see from ifconfig wlan0.

--
Best Regards,
Shyam

--

Olsr-users mailing list

[3]Olsr-***@lists.olsr.org

[4]https://lists.olsr.org/mailman/listinfo/olsr-users

Email had 2 attachments:
* configfiles.zip
158k (application/zip)
* rsz_two_wireless_rpis.jpg
84k (image/jpeg)

References

1. mailto:***@operamail.com
2. https://wiki.debian.org/WiFi/AdHoc
3. mailto:Olsr-***@lists.olsr.org
4. https://lists.olsr.org/mailman/listinfo/olsr-users
--
http://www.fastmail.fm - The way an email service should be
Henning Rogge
2013-09-11 07:32:01 UTC
Permalink
Post by Thijs van Veen
Hello Shyam,
I think your primary problem here is your subnet mask.
You have assigned the mask 255.255.255.255, meaning only the indicated
ip address is in the network. Both the other RPi and the broadcast
address aren't, meaning your ARP broadcasts have no known network to go to.
If you wish to use 192.168.255.255 as the broadcast address, you should
set the subnet mask to 255.255.0.0.
Exactly...

either use a /24 or /16 subnet mask, but not a /32.

Yes, /32 subnets work as soon as OLSR is running, but they don't work
without it and make testing more difficult. No need to make things
difficult if you have less than 254 devices.

So my suggestion would be to set each node to

IP 192.168.1.X Netmask 255.255.255.0 Broadcast 192.168.1.255

where X is a number between 1 and 254.

Henning Rogge
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
mailto:***@fkie.fraunhofer.de http://www.fkie.fraunhofer.de
Shyam B
2013-09-11 18:20:52 UTC
Permalink
Hi All,

*The biggest foreseen problems have smallest solutions :)*

@Teco: Yes, the problem was on a level earlier not later, that you foresaw!
@ Henning, Thijs: Thank you for your support. Your suggestions hit my
fundamental brain but powerful. Changed to:

IP 192.168.1.X Netmask 255.255.0.0 => Computes Broadcast to
192.168.255.255. Node(s) can listen on all subnets and I tested this with
OLSR too with a router on a separate subnet.

@Teco: Since I work with static addresses, I had to change the silent
process which was accessing the wlan0 in the background
(/etc/default/ifplugd). I got to know this via going into 'monitor mode'.
The driver (Edimax) fails to start airodump-ng. I tried this via TP-Link
WR* dongle (huge but ok), works! armon-ng shows the process that accesses
wlan0.

As I read, ifplugd is a Linux daemon which will automatically configure
your ethernet device when a cable is plugged in and automatically
unconfigure it if the cable is pulled. This was being run for wlan0 too.

***@raspberrypi ~ $ sudo cat /etc/default/ifplugd
INTERFACES="all"
HOTPLUG_INTERFACES="all"

remove "all" and keep "eth0". I may use eth0 for internet access. This will
run process for eth0 interface alone.

So, these two were potential. When I do this both together Ad-Hoc works
smooth!

Now, what I get are multiple (mobile) nodes with OLSR running on it on
RPi's (with no TP-Link routers), with one hop (ping) (pure Adhoc) and two
hops (with OLSR). Also tested routing via router's.. both seem good to go!

Thank you,
Shyam

Loading...