dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Problems in multi casting on an ad hoc wireless network

Fri Jan 17, 2014 9:48 am

I want to establish an ad-hoc wifi network to connect more than 2 Raspberry pis and exchange information. I've written a sample unicast (TCP) and multicast (UDP) client~server programs which work perfectly fine when all the devices are connected via router / AP. However, the same multicast program doesn't work in an ad-hoc network. Am I missing something ?

Any help regarding the issue will be appreciated.

akonstan
Posts: 3
Joined: Fri Sep 13, 2013 9:32 pm

Re: Problems in multi casting on an ad hoc wireless network

Fri Jan 17, 2014 7:05 pm

Hi dhruvvyas90,

I have the same problem here. I use 2 Pis in Adhoc network. They have the same netmask, essid, channel and mode.
IP1: 192.168.0.4
IP2: 192.168.0.5
When i try to ping Pi1 from Pi2, an error comes out (host unreachable)??

Have you found a solution of this problem?
Thanks :)

dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Re: Problems in multi casting on an ad hoc wireless network

Sat Jan 18, 2014 4:11 am

Hi,

For me, even in ad hoc network Ping works fine ie i'm able to ping all 2 machines with another (in my case, 1 pc and 2 Rpi).

May be a print shot of /etc/networks/inferfaces file will help you.

It is as follows:

auto wlan0
iface wlan0 inet static
address 192.168.12.10
netmask 255.255.255.0
wireless-channel 1
wireless-essid MyNet
wireless-mode ad-hoc

for both the pi : it will remain the same except ip address will differ. (for my another pi it is : 192.168.12.12 and PC is : 192.168.12.5)

Hope it helps.

Now going back multicast problem, one of the alternative solution can be sending ARP requests to entire network ie (192.168.0.0/24 in your case) when pi starts to get ip addresses of all the devices in range / periphery and then use TCP unicast one by one to send a message to all the devices when it comes to multicasting. However, i don't know how real time it will be.

akonstan
Posts: 3
Joined: Fri Sep 13, 2013 9:32 pm

Re: Problems in multi casting on an ad hoc wireless network

Sun Jan 19, 2014 9:41 am

Hi,

thanks for the information. I will give it a try and see what happens.

dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Re: Problems in multi casting on an ad hoc wireless network

Sat Feb 08, 2014 3:51 am

Hi,

I was trying to figure out what's wrong in multicasting on ad hoc network and I noticed that Mcast receiver on Rpi works fine ie (i've a setup of two Rpi and 1 pc and all are connected to each other on an ad hoc network). If i send data using PC over multicast ip, both the rpis receive it. However, it doesnt work if one of the Rpi sends the data to mcast ip. Is there any config that I'm missing here on raspbian or something ?

Any help will be appreciated.

Choatjor
Posts: 5
Joined: Wed Feb 05, 2014 10:33 pm

Re: Problems in multi casting on an ad hoc wireless network

Sun Mar 02, 2014 10:35 pm

Hey guys, I was having the same problem recently. I read somewhere online that the latest Rasbian kernel didn't allow ad-hoc connections for a lot of people. I reflashed a older Rasbian image to my pi's and they're now pinging each other like they're supposed to. Here's the link for the old image I flashed.

http://downloads.raspberrypi.org/raspbi ... spbian.zip

Hope this helps!

dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Re: Problems in multi casting on an ad hoc wireless network

Mon Mar 03, 2014 3:40 am

Interesting.

Is there any way to turn it on or something in new kernels ?

Anyway, I will give it a shot with the image that you posted and will post my results here.

Thanks again.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Problems in multi casting on an ad hoc wireless network

Mon Mar 03, 2014 6:12 am

Choatjor wrote:Hey guys, I was having the same problem recently. I read somewhere online that the latest Rasbian kernel didn't allow ad-hoc connections for a lot of people. I reflashed a older Rasbian image to my pi's and they're now pinging each other like they're supposed to. Here's the link for the old image I flashed.

http://downloads.raspberrypi.org/raspbi ... spbian.zip

Hope this helps!
The 09-25-2013 version is a good one. The 2 later versions have issues that are a WIP.

FWIW
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Re: Problems in multi casting on an ad hoc wireless network

Sun Apr 06, 2014 6:21 am

Unfortunately, it didn't work with 25-09 image. :-|

Return to “Beginners”