I have a UWP app which needs to listen to a device on a COM port.
I am attempting to enumerate the available ports such that the user can select which one their device is broadcasting on. The code I am using is as follows:
string serialDeviceType = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.SerialPort); DeviceInformationCollection devices = await DeviceInformation.FindAllAsync(serialDeviceType);
On the first surface I was working with the 'devices' collection got 4 members, "Com1", "Com2", "Com3" and "Serial Port", and I was ultimately able to get everything working correctly. I have another device, however, and on this one I only get "Serial Port' in the 'devices' collection with the same code.
Does anyone know why this might be the case? On what axis would the surfaces have to differ from one another for this code to get these different return values?