Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect application to manet manager (use olsr) #25

Open
romeldo opened this issue Mar 4, 2014 · 3 comments
Open

How to connect application to manet manager (use olsr) #25

romeldo opened this issue Mar 4, 2014 · 3 comments

Comments

@romeldo
Copy link

romeldo commented Mar 4, 2014

We are 3 students doing a project which involves implementing middleware that should use olsr to find and establish neighbors. Our middleware uses multicast packets to find one hop neighbors and establish connections between them. We are using 3 rooted nexus 7's with a custom kernel installed. Should we be importing any classes from the manet manager or just using sockets is fine? We wrote a basic chat application on top of the middleware. So far we have been trouble with multicast packets. Does OLSR support multicast?

@jrobble
Copy link
Member

jrobble commented Mar 5, 2014

Glad to hear about your project. If you have OLSR-specific questions you
should post them on the OLSR forum:
http://www.olsr.org/?q=mailing-lists

I'm not sure if OLSR supports multicast natively. Here is a plugin for it:
http://sourceforge.net/projects/olsr-bmf/

You'll also run into a problem where Android doesn't support multicast
normally. You'll might need to use a MulticastSocket:
http://developer.android.com/reference/java/net/MulticastSocket.html

And a MulticastLock:
http://www.whizzosoftware.com/forums/blog/1/entry-40-android-jmdns-and-wi-fi-multicast-packets/

  • stoker

On Tue, Mar 4, 2014 at 12:46 PM, romeldo [email protected] wrote:

We are 3 students doing a project which involves implementing middleware
that should use olsr to find and establish neighbors. Our middleware uses
multicast packets to find one hop neighbors and establish connections
between them. We are using 3 rooted nexus 7's with a custom kernel
installed. Should we be importing any classes from the manet manager or
just using sockets is fine? We wrote a basic chat application on top of the
middleware. So far we have been trouble with multicast packets. Does OLSR
support multicast?

Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.

@duhmojo
Copy link

duhmojo commented Mar 5, 2014

Typically routers won't blindly support multicast routing. OLSR is the same, though you might be able to work out a way to configure it to work. If you do, please share!

The OLSRD mailing list has been a waste of time in my experience. I think the entire team is working on their next generation version, but I've never had a response once. Even on compiling issues and basic build environment questions. If it wasn't for ManetManager and jrobble I would have hung myself a year ago. :-)

What I had to do was re-broadcast (multicast with a lock, if you're doing UDP broadcast you'll figure this out quick) received UDP packets from my Android app Service. It can get messy because there's a lot of echo you have to sort through. You'll broadcast to everyone within range, they'll receive the message, then re-broadcast it to everyone else in range, including the sender. The point is to re-broadcast to everyone on the other side of a route hop until everyone gets it.

I ended up with a UDP packet format that included a 16 byte header portion which had a device/session unique identifier (partially based on the sender's UUID) that a receiving device could use as an index for tracking already received packets. This way you can ignore packets you've already received, (eliminate the echo) and re-broadcast and process packets you haven't seen yet.

You might want to just base your broadcast communication on the OLSRD nearest neighbor list where you unicast UDP to only the neighbors, who will then re-broadcast unicast to the next nearest neighbor list, and so on. It will seriously cut down on the noise. (ManetManger has code you can look at for pulling OLSRD's txtinfo plugin information from port 2006)

I've found that a noisy Android adhoc network is prone to losing packets too easily. Make sure that the Wifi channels you're using near by don't conflict with what you're using for ManetManager. (2.4Ghz channel 1) It can cause unexpected UDP packet loss that you won't notice until later when you start digging into mysterious issues.

Good luck!

@percyperezdante
Copy link

RECEIVING MORE MESSAGE THAN EXPECTED. WHY?
I am using MulticastSocket to multicast a message to 3 another mobiles. Each time a mobile multicast one message the receivers receive the same message 16 times. I am using datagrams for send and receive the packets. Should I use different approach to have a correct behavior? I would appreciate your advice or comments. Thank you for your time and nice to discover manet manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants