I really got stuck in working on raspberry pi's. I'm working on a project where I'm collecting mac addresses and wifi signals by listening kismet outputs, however I have a problem. I'm using two usb wifi adapters. Realtek is used to connect the rpi to internet and Ralink is used to monitor wireless devices. I changed /etc/network/interfaces file. I set wlan1 (which is Realtek) to connect internet and removed wlan0 from that file so wlan0 can't be used to connect internet. For wlan0, I set monitor mode on. Sometimes wifi adapters interfaces are changing (I'm not sure in what situations are causing the problem, but probably when internet is disconnected and comes back again,it causes this problem). Wlan0 must be Ralink but Realtek takes its place and wlan1 is set as Ralink. Realtek doesn't have a monitor mode so rpi can't collect wireless devices data.
Is there any way to set wifi adapter to a specific interface?
Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Ralink Technology, Corp. RT5370 Wireless Adapter