Error in module (IPv4)

64 views
Skip to first unread message

Márcio Barbosa

unread,
Sep 13, 2014, 11:27:17 PM9/13/14
to omn...@googlegroups.com
Whenever I try to work with ieee80211nic in access point and sta modes, I get this error:

<!> Error in module (IPv4) (...).networkLayer.ip (id=40) at event #660, t=2.000564561467: (EthernetIIFrame)SYN: Unexpected packet type.

Found this : http://www.omnetpp.org/listarchive/msg07886.php and tried to see if this was the same problem, but its probably not.

Does anyone know a solution?

Running inet 2.4, by the way.

Thanks

Alfonso Ariza Quintana

unread,
Sep 15, 2014, 4:05:34 AM9/15/14
to omn...@googlegroups.com

 

My impression is that a Ethernet module is missing and the link layer header is not removed before to send the packet to the ip layer

--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Márcio Barbosa

unread,
Sep 15, 2014, 9:09:27 PM9/15/14
to omn...@googlegroups.com, aari...@hotmail.com
You are right! I think it was a problem with my RSU module, used in the V2I scenario I'm working on.
I changed my RSU and started using INETs own AccessPoint module and this problem was solved.
The cars successfully get associated with the access points and Ieee80211Prim_BSSDescription& Ieee80211Prim_ScanConfirm::getBssList(unsigned int k)
{
    if (k>=bssList_arraysize) throw cRuntimeError("Array of size %d indexed by %d", bssList_arraysize, k);
    return bssList_var[k];
}are able to transmit data to the server wich they are connected to (server.ethg++ <--> Eth100M <--> rsu[i].ethg++;)

Unfortunately, later in the simulation, I get another error:
<!> Error in module (Ieee80211AgentSTA) scenario.host[0].wlan.agent (id=51) at event #150420, t=41.555726167897: Array of size 0 indexed by 0.

I managed to run the debugger and found out the excepction gets thrown here, in Ieee80211Primitives_cc:
Ieee80211Prim_BSSDescription& Ieee80211Prim_ScanConfirm::getBssList(unsigned int k)
{
    if (k>=bssList_arraysize) throw cRuntimeError("Array of size %d indexed by %d", bssList_arraysize, k);
    return bssList_var[k];
}

The above code gets called here:
void Ieee80211AgentSTA::processScanConfirm(Ieee80211Prim_ScanConfirm *resp)
{
    // choose best AP

    int bssIndex;
    if (this->default_ssid=="")
    {
            // no default ssid, so pick the best one
            bssIndex = chooseBSS(resp);
    }
    else
    {
        // search if the default_ssid is in the list, otherwise
        // keep searching.
        for (int i=0; i<(int)resp->getBssListArraySize(); i++)
        {
            std::string resp_ssid = resp->getBssList(i).getSSID();
            if (resp_ssid == this->default_ssid)
            {
                EV << "found default SSID " << resp_ssid << endl;
                bssIndex = i;
                break;
            }
        }
    }

    if (bssIndex==-1)
    {
        EV << "No (suitable) AP found, continue scanning\n";
        emit(dropConfirmSignal, PR_SCAN_CONFIRM);
        sendScanRequest();
        return;
    }

    dumpAPList(resp);
    emit(acceptConfirmSignal, PR_SCAN_CONFIRM);

    Ieee80211Prim_BSSDescription& bssDesc = resp->getBssList(bssIndex);
    EV << "Chosen AP address=" << bssDesc.getBSSID() << " from list, starting authentication\n";
    sendAuthenticateRequest(bssDesc.getBSSID());
}

I'd immensely appreciate some help here too.
Thanks a lot,

Márcio Vinícius Barbosa

Thank

Alfonso Ariza Quintana

unread,
Sep 16, 2014, 4:03:21 AM9/16/14
to omn...@googlegroups.com

    else

    {

        // search if the default_ssid is in the list, otherwise

        // keep searching.

        bssIndex = -1; // initialize the value

        for (int i=0; i<(int)resp->getBssListArraySize(); i++)

        {

            std::string resp_ssid = resp->getBssList(i).getSSID();

            if (resp_ssid == this->default_ssid)

            {

                EV << "found default SSID " << resp_ssid << endl;

                bssIndex = i;

                break;

            }

        }

    }

 

 

You must initialize the value of bssIndex

Márcio Barbosa

unread,
Sep 23, 2014, 9:11:01 PM9/23/14
to omn...@googlegroups.com, aari...@hotmail.com
Thanks a lot!
Reply all
Reply to author
Forward
0 new messages