I'm trying to capture and save LoRaWAN packets into a pcap file. But I can't seem to get it to capture the packets. I am very new to ns3 and to the open source LoRaWAN module for ns3.
I want to capture the packets at the gateway.
NS_LOG_INFO("Creating the gateway...");
NodeContainer gateways;
gateways.Create(1);
mobility.Install(gateways);
// Create a netdevice for each gateway
phyHelper.SetDeviceType(LoraPhyHelper::GW);
macHelper.SetDeviceType(LorawanMacHelper::GW);
helper.Install(phyHelper, macHelper, gateways);
/*********************************************
* Install applications on the end devices *
*********************************************/
OneShotSenderHelper oneShotSenderHelper;
oneShotSenderHelper.SetSendTime(Seconds(2));
oneShotSenderHelper.Install(endDevices);
/******************
* Set Data Rates *
******************/
std::vector<int> sfQuantity(6);
sfQuantity = macHelper.SetSpreadingFactorsUp(endDevices, gateways, channel);
/****************
* Simulation *
****************/
Simulator::Stop(Hours(2));
Simulator::Run();
Simulator::Destroy();