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