Hi all! I'm developing a Xamarin.Android app for work (on a PL-40L PDA running Android 7.0 (https www.aliexpress.com/item/Caribe-PL-40LAa050-Industrial-mini-portable-nfc-memory-attendance-rfid-android-integrated-with-gps-1d-barcode/32541742965.html), and we need to connect to an Arduino Due. We've settled on having the Due act as USB Host (Arduino-er) (http arduino-er.blogspot.com/2013/03/adk-running-on-arduino-due.html), because we want to charge the PDA, and when I ran the Arduino sketch and the Android app, I got communication to occur. However, while attempting to debug my attempt using WiFi (https docs.microsoft.com/en-us/xamarin/android/get-started/installation/set-up-device-for-development), every time I connect or disconnect the Arduino via USB, debugging in Visual Studio disconnects. I've searched, and the closest I've gotten to a similar issue is unresolved (Stack Overflow) (https stackoverflow.com/questions/20668200/android-adb-over-wifi-still-disconnects-when-usb-cable-is-cycled). In any case, all this is incidental to hooking into the USB accessory attached broadcast (Android.Hardware.Usb.UsbManager.ActionUsbAccessoryAttached). So:
- Can anyone help with keeping WiFi debugging going when connecting a USB device?
- Alternatively, does anyone know how to reconnect debugging to an Android device when it disconnects like this?
- Any tips for getting USB attached hooks working? (I'm happy to ask another question for this one)
Your help is GREATLY appreciated.