Problem with sending packet on wireless port when a node has a wireless and wired nics

31 views
Skip to first unread message

rport...@gmail.com

unread,
May 19, 2013, 4:15:42 PM5/19/13
to omn...@googlegroups.com
Hi,

I'm having trouble with sending a packet from an RSU type node. I have created this RSU compound node which is similar to Car.ned but with the addition of a wired ethernet nic as well as wireless nic both attached to the networklayer.ned

I am trying to transmit a packet from the RSU application layer to be broadcasted wirelessly over the network to be processed by wireless nodes. But when the RSU enters the handlemessage() method to handle a self message to be able to send a packet I get the error Error 139 and the simulation crashes. I am using the same method when sending a packet from a car (which has only a wireless interface in its compound module) and this method works. The RSU can even receive packets from cars and it is also able to process them. But I can't solve the problem for an RSU to send a packet wirelessly.

I found out that error 139 is a memory related problem but I can't understand why.

When sending the packet I am using the below code:

 socket.sendTo(pkt->dup(), dest, destPort, outputInterfaceMulticastBroadcast[i]);

which is in a method which the same as sendBroadcast() method from UDPBasicFlood
dest is  IPvXAddress destAddr(IPv4Address::ALLONES_ADDRESS);
destPort is 1234
and socket is binded by the following code

    socket.setOutputGate(gate("udpOut"));
    socket.bind(localPort); //localPort is 1234
    setSocketOptions();

and the outputInterfaceMulticastBroadcast is set to "ALL" in the .ned file and it is also initialized the same way it is initialized by UDPBasicFlood

Am I doing something wrong with how I'm sending the packet?
Can anyone please help me with this problem?





rport...@gmail.com

unread,
May 20, 2013, 2:46:10 AM5/20/13
to omn...@googlegroups.com
I managed to solve the problem, it was a bit silly. Sorry
Reply all
Reply to author
Forward
0 new messages