LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   after install gpsr, test the perimeter mode , it has throw "Wrong the other node" (https://www.linuxquestions.org/questions/linux-newbie-8/after-install-gpsr-test-the-perimeter-mode-it-has-throw-wrong-the-other-node-4175543303/)

whatamazing 05-22-2015 07:11 AM

after install gpsr, test the perimeter mode , it has throw "Wrong the other node"
 
1 Attachment(s)
hello there!
the common communication between nodes is fine, but when i want to test the perimeter mode it has throw the error "Wrong the other node", it seems that it couldn't find its next hop node.
i trace the code as show below
Code:


int
GPSRNeighbors::intersect(nsaddr_t theother, double sx, double sy,
                        double dx, double dy){
  //line 1 (x1,y1)--(x2,y2) is the segment
  //line 2 (x3,y3)--(x4,y4) is the xD
  struct gpsr_neighbor *other = getnb(theother);

  if(other==NULL){
    printf("Wrong the other node\n");
    exit(1);
  }


  ****************

struct gpsr_neighbor*
GPSRNeighbors::getnb(nsaddr_t nid){
  struct gpsr_neighbor *temp = head_;
  while(temp){
    if(temp->id_ == nid){
      if((GPSR_CURRENT - temp->ts_) < DEFAULT_GPSR_TIMEOUT)
        return temp;
      else {
        delnb(temp); //if this entry expire, delete it and return NULL
        return NULL;
      }
      return temp;
    }
    temp = temp->next_;
  }
  return NULL;
}

the simulation scene was shown in the attachment.
when i make node 0 send packet to node 1, the error will occur.
would somebody know how to solve it?
thank you for your time!

whatamazing 05-23-2015 08:55 PM

did anybody face that before?

sims2801 11-20-2015 05:20 AM

Hello everyone

I am using GPSR ke-liu patch on ns2.32 .
For some paramter values (parameters means transmission range , simulation time , no of nodes) its runnning prefectly fine but for other's it is giving an error "wrong the other node".
Example 1: When i am running same code with 150 transmission range, simulation time =1000 and nodes = 150 , it works prefectly fine . But when i run with same simulation time, same number of nodes but transmission range as 200 or 250 , it gives the error "wrong the other node".

Example 2: simulation time = 1000 , nodes = 250, trnamission range = 100 - works prefectly fine
but with simulation time = 1000 , nodes = 250, trnamission range = 50 or 150 or 200 or 250 -- gives error.

Does anyone ever faced this kind of problem . how can i overcome this problem.
Kindly help.

Thanks


All times are GMT -5. The time now is 11:11 AM.