unpair dual-mode bluetooth device in uwp application - windows

use Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher to discover the device
Windows.Devices.Bluetooth.BluetoothLEDevice.FromBluetoothAddressAsync([address]) to get Windows.Devices.Bluetooth.BluetoothLEDevice
call Windows.Devices.Bluetooth.BluetoothLEDevice.DeviceInformation.Pairing.Custom.PairAsync(....)
because the device is a dual-mode bluetooth device, after pairing, there are same two device names I can see in the Windows Bluetooth list. And after calling the UnpairAsync api, I can only unpair the BLE device.
Is there a way to unpair both devices?

Related

Can't Debug on physical Device (switches to Virtual device)

I am trying to debug(run) an Xamarin Application on a Android device. Every time i try to run the application on the device the target device switches back to the virtual Android_accelerated device. It doesn't matter what project, USB cable or phone i use.

sphero sprk+ isn't discoverable in macbook pro bluetooth

I'm trying to connect to Sphero Sprk+ device with gobot.io, like this example: https://gobot.io/documentation/platforms/sprkplus/
The code cannot connect to the device, so I checked in the visible bluetooth devices from Bluetooth Preferences in MacBook, and Sphero isn't listed there.
Sphero is visible from android devices, and is visible from the MacBook via Sphero EDU application, but not directly from the bluetooth console.
What do I miss?
Thanks
SPRK+ communicates via BLE (Bluetooth Low Energy). BLE comes with concept of 'profiles'. There are public (documented, well-known, standard) profiles, like SPP (serial port profile), A2DP (audio profile), etc. If the device supports these profiles, you can see it in system BT preferences.
However, SPRK+ (Sphero) features it's own private communication profile, not known to Apple nor Google.
That's why the EDU application can 'see' the device, but you cannot find it in BT preferences.

Using USB device on PC in Android Studio Emulator

I am developing an app that A dongle (USB) device must connect to Android OS supported device(mobile phones, tablets...) via OTG (On-The-Go) cable. The problem starts here. I need to do debug while the dongle is connected to the Mobile phone. Unfortunately, such situation makes connecting mobile phone to PC and debugging method impossible. ( Mobile phone has 1 socket but I need 2, one for connecting the dongle to mobile phone and other for connecting mobile phone to pc for debugging)
Is there a way such that the Android Studio Emulator can access to USB device on the PC?
EDIT I have found an alternative way like connecting the mobile phone to PC via Bluetooth which is explained here.
EDIT 2: A better and clear way : Installing Genymotion and Virtual Box.
Another option (I use daily) is
adb connect phone_ip
The phone should be connected to wifi (the host also).
Lots of sources for that on the net (here is one)
mordy.

USB Bluetooth dongle stop working

Windows 7 32bit, Dell laptop.
I find my USB Bluetooth dongle stop working, I used it very rare. When I connected USB dongle, it show 'Unknown device' message, and driver not installed. In taskbar show notifications 'USB device not recognized'.
In Device Manager this USB Bluetooth dongle shown as "Unknown device". I tried right click on icon, 'Uninstall Driver Software', then Action > "Scan for hardware changes", it refreshes and show message driver installed successfully in windows taskbar. But, in Device Manager, this USB dongle still yellow "Unknown Device". When right click in icon, device status is "Windows has stopped this device because it has reported problems. (Code 43)' I tried to ininstall every item under "Universal Serial Bus controllers" menu in Device Manager, then rebooted PC, but this not help. I uninstalled all Bluetooth devices from Device Manager, include Bluetooth Radios and Network adapters:
But this not help, too. From MSDN Bluetooth FAQ I read that Windows 7 include in-box support for Bluetooth.
How to install built-in the system Bluetooth drivers in Windows 7 and enable Bluetooth? (I need only transfer files, not audio capabilities).
I find the problem: USB Bluetooth Adapter dongle is faulty. So this is hardware issue.

Can Windows be set up to automatically launch an application when an HID-compliant USB device is plugged in?

I have a custom HID-compliant USB device. I would like to set up Windows to launch an application when this device is plugged in. Is this possible through a configuration setting? Or do I need to write an application (for example, one that resides in the system tray on Windows startup) that detects when the device is inserted?
I know that my Canon camera and my Nokia phone can start applications or AutoPlay when they are plugged in, but they are not HID devices.
You should be able to achieve this by monitoring for a WMI Win32_DeviceChangeEvent, or RegisterDeviceNotification.
Win32_DeviceChangeEvent: http://msdn.microsoft.com/en-us/library/aa394124(VS.85).aspx
RegisterDeviceNotification: http://msdn.microsoft.com/en-us/library/aa363431(VS.85).aspx

Resources