Hi, I have reproduced this example "to the T" but when I connect to the device I always get a null returned.
Sample and sources used:
https://ms-iot.github.io/content/en-US/ ... Sample.htm
The device (http://www.amazon.com/gp/product/B00LODGRV8 ) is the same one used in the example. The device also appears in the Select Device dialog with the following Id:
\\\\?\\USB#VID_10C4&PID_EA60#0001#{86e0d1e0-8089-11d0-9ce4-08003e301f73}
Once I select and "Connect", this line always returns null.
serialPort = await SerialDevice.FromIdAsync(entry.Id);
I have debugged and my entry.Id is shown as:
Id "\\?\USB#VID_10C4&PID_EA60#0001#{86e0d1e0-8089-11d0-9ce4-08003e301f73}" string
I have also read the complete sample document and checked all the caveats. Why isn't this working for me?
Thanks!
-
- Posts: 11
- Joined: Thu Jul 09, 2015 7:05 pm
Re: Windows 10 IoT Core Simple Serial Example not working
This is sort of a known issue.
See here: https://social.msdn.microsoft.com/Forum ... after-boot
and here: https://social.msdn.microsoft.com/Forum ... berry-pi-2
the short answer is unplug and then re-plug your serial device after booting the pi. Some have had success if the serrial device is connected after the Pi is completely booted.
I could not get mine to work until i bought a powered USB hub, attached it to the PI, and then attached the serial device after the pi boots.
Lastly, I found a sample on GitHub that works for FTDI serial devices. It works with the device connected at boot, but uses a FTDI specific library, so the Serial Example will not work with it - also, you'll need an FTDI serial device: https://github.com/Jark/FTDISample
HTH
See here: https://social.msdn.microsoft.com/Forum ... after-boot
and here: https://social.msdn.microsoft.com/Forum ... berry-pi-2
the short answer is unplug and then re-plug your serial device after booting the pi. Some have had success if the serrial device is connected after the Pi is completely booted.
I could not get mine to work until i bought a powered USB hub, attached it to the PI, and then attached the serial device after the pi boots.
Lastly, I found a sample on GitHub that works for FTDI serial devices. It works with the device connected at boot, but uses a FTDI specific library, so the Serial Example will not work with it - also, you'll need an FTDI serial device: https://github.com/Jark/FTDISample
HTH
Re: Windows 10 IoT Core Simple Serial Example not working

Re: Windows 10 IoT Core Simple Serial Example not working
Great! After several attempts at plugging in the USB-TTL Adapter at the right moment with a non-usb power supply -- and then standing on my head -- it worked! The NULL-source in the sample finally came up with something other than a null and I was able to transmit data. Many thanks for this tip! ... and OMG!
I'd be interested if anyone ever finds out a way to get the FTDI adapter working.
I'd be interested if anyone ever finds out a way to get the FTDI adapter working.
-
- Posts: 11
- Joined: Thu Jul 09, 2015 7:05 pm
Re: Windows 10 IoT Core Simple Serial Example not working
To be clear, using https://github.com/Jark/FTDISample I am able to read and write to an FTDI USB to serial device.rghubert wrote:I'd be interested if anyone ever finds out a way to get the FTDI adapter working.
It has instructions for installing the driver and using the library. It is not compatible with the generic SerialDevice library that the "official" Serial sample uses, but is still pretty easy to understand. I got the library working in my own app in just a couple of hours.
Re: Windows 10 IoT Core Simple Serial Example not working
Great. Many thanks! Do you think this driver will also support the FT232RL ( http://wiki.in-circuit.de/images/d/da/610000191A.pdf ) that I have already? I'm searching for the difference between drivers -- if any -- but don't see anything yet.
-
- Posts: 11
- Joined: Thu Jul 09, 2015 7:05 pm
Re: Windows 10 IoT Core Simple Serial Example not working
Yes. I have the same chipset device. works like a charm.rghubert wrote:Great. Many thanks! Do you think this driver will also support the FT232RL ( http://wiki.in-circuit.de/images/d/da/610000191A.pdf ) that I have already? I'm searching for the difference between drivers -- if any -- but don't see anything yet.
Re: Windows 10 IoT Core Simple Serial Example not working
I am using Silicon Labs CP2102 USB to UART Bridge
Here, once the USB is connected, I got roughly 20 seconds to lunch the application. If it done within that time, serialPort will NOT be null and can open the port.
If it gets late than that, serialPort becomes null.
Another thing I have noticed is that, when its null, the Pi is sending some garbage data to the USB to UART. May be that's why I cannot open the port.
Here, once the USB is connected, I got roughly 20 seconds to lunch the application. If it done within that time, serialPort will NOT be null and can open the port.
If it gets late than that, serialPort becomes null.
Another thing I have noticed is that, when its null, the Pi is sending some garbage data to the USB to UART. May be that's why I cannot open the port.