PCAP files are data files created using a program. These files contain packet data of a network and are used to analyze the network characteristics. They also contribute to controlling the network traffic and determining network status.
Set up the network simulation environment in cooja simulator.
Open the radio messages tool from the tools menu.
Enable the pcap with analyzer menu in the radio messages window.
Start the simulation.
After finishing the simulation, the pcap file was saved in the below location
contiki/tools/cooja/build