Disconnection of unrelated USB device causes RTL8187 scan to freeze
orinem opened this issue · 1 comments
If I unplug an unrelated USB device (an iPhone in my case), the scan freezes - no more packets are recorded. Stopping the scan and restarting it has no effect. You have to quit/restart KisMac2 before scan works again.
It looks like USBJack::_handleDeviceRemoval gets confused; the last message logged is "USBJack: Device removed.". I will investigate.
Commit #0331577 has test code to use IOServiceAddInterestNotification for device removal notification.
This has the advantage of only providing the notification for the specified device, rather than every USB device in the system.
I also added code for an alternative method, currently ifdef'd out that matches device departure on vid/pid. It wouldn't work correctly if you had two identical devices.