I am brand new to raspberry pi and have been trying to follow a few tutorials to try to set it up as a network scanner (https://www.hackster.io/aallan/a-raspberry-pi-network-scanner-e3dbbc , https://pimylifeup.com/raspberry-pi-network-scanner/) for a school project. The wifi adapter I am using is a realtek adapter that uses the RTL8188EUS chipset and says that it supports monitor mode when I run commands. When I get to the step that says to edit the i/etc/network/interfaces config file and add the entry :
allow-hotplug wlan1
iface wlan1 inet manual
pre-up iw phy phy1 interface add mon1 type monitor
pre-up iw dev wlan1 del
pre-up ifconfig mon1 up
It saves correctly but on reboot it either switches my wlan0 and wlan1 (onboard wifi and realtek adapter) or it won't boot in general. Is there a reason it is having this behaviour?
The OS installed is Rasbian (using os configured from sd card from canakit).
I have also tried setting up a monitor interface by running the sudo iw phy phy1 interface add mon1 type monitor command and then doing ifconfig mon1 up to start it up. Once I do this though the interface does not pick up any packets(i tried changing the channel but am unable to do so as an error is brought up which says device or resource busy), maybe I am misunderstanding how this works. I have attached a few screenshots below showing this approach first being the result of the config command.
Any help with this issue would be much appreciated.