emulate Predictive OLSR protocol on emane

278 views Asked by At

In recent weeks, I'm learning to use EMANE to do the emulation about Ad hoc networks which uses the Predictive OLSR routing protocol.

The locations of the UAVs' location are taken into account to calculate the ETX metric in P-OLSR, which makes it different with ordinary OLSR. I get trouble in transferring the locations data of UAVs into the P-OLSR core. The patch file that I downloaded from the link mentioned above adds a gpsreceiver plugin to the protocol, which is used to receive location data from the out of P-OLSR then transfer it into P-OLSR. And in the olsrd.conf.example file, I'm supposed to set an interface, a multicast IP address and a port for the plugin, I don't know how to set these things when I use the EMANE emulation platform. I tried to set the multicast IP address and the port same as the value of eventservicegroup attribute. But the it cannot be right, because the data format is not consistent.

EMANE uses an application called eelgenerator which can generate location event to deliver the locations data of UAVs, but the data is in a eel log file format not in a NMEA format which is wanted by gpsreceiver. EMANE also has an application called gpsd location agent, and it can handle the location event, and transfer the locations data into NMEA format, but the output of gpsd location agent can only be connected to GPSd directly or to a pseudo terminal then connected by GPSd. GPSd can get the latitude, longitude and altitude information from the NMEA format location data, and serves the other applications via the port 2947 of localhost.

So, How can I transfer the locations data into P-OLSR core? If via the gpsreceiver, How should I set the olsrd.conf and do I need to write a program myself? If do not use the gpsreceiver plugin, can I make the P-OLSR core to get location data through GPSd? If can, how to realize that exactly?

PS:the version of my EMANE is emane-0.9.3. the version of my machine's kernel is 4.2.3-300.fc23.x86_64.

1

There are 1 answers

0
Wtswkz On BEST ANSWER

I solved the problem. I wrote a python script to read data from the pts and send it to the gpsreceiver. Here is the script:

import socket
fd = open("path of pts", "w+")
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(fd.readline(), (host, port))