PcapPlusPlus: Android fail to open wlan0
Question
Hello! I’m trying to use pcap++ with android. I build it using QT 6.5.3, NDK 25, Android API 30 on rooted device in permissive mode.
So, the problem is in this:
pcpp::PcapLiveDeviceList::getInstance().getPcapLiveDeviceByName("wlan0");
This method tries to gets instance of wlan0 . Then I try to use it like this:
if (!dev->open())
{
std::cout << "Cannot open device" << std::endl;
return 1;
}
But the problem is, it always fails to open device. Any ideas to fix it? I’m thinking about monitor mode, but the thing is, when I enable monitor mode for wlan0, it stops being an live device and goes into read-only state.
Operating systems
Android
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (7 by maintainers)
Thanks for the help, issue closed
@seladb crafting my own rawpackets proved to be a working concept: