5

I have reproduced this example "to the T" using the RPi but when I connect to the USB-TTL device I always get a NULL returned.

The sample and sources used.

The device is the same one used in the example with the RPi. The device also appears as shown in the sample 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" as prescribed by the sample, the following line of code always returns null.

serialPort = await SerialDevice.FromIdAsync(entry.Id);

I have debugged and the entry.Id argument appears correct and 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?

  • I thought the Pi's UART was reserved for debugging. I didn't think it was accessible from a Windows IoT application. – joan Sep 10 '15 at 10:30
  • Correct, the serial UART (p1 pin 8, 10) is,not supported yet, which is a drag. However, if you take a look at the links I provide in the question, I (and the sample code from Microsoft) is referring to the USB-TTL not the UART. – GGleGrand Sep 10 '15 at 15:39
  • The first example refers to the UART. You should make it clear in your question that the Pi is the USB end of the link (and not the UART end). – joan Sep 10 '15 at 16:26
  • Yes, the titles in the sample are a bit misleading. I'm using the sample precisely as it is formulated for RPi, no differences. The sample explains that the (board-side) UART is only supported on the minnow board, and not on the RPi. On the RPi only the USB-TTL should work as shown in the example -- and which doesn't work yet in my completely up-to-date and identical setup. – GGleGrand Sep 10 '15 at 19:45
  • This post suggests it is a known problem. – joan Sep 10 '15 at 19:54
4

Thanks to Joan for the pointer to a new answer to my post on the RPi forum. It worked as described there (RPi forum)

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

| improve this answer | |
3

I resolved it adding the next capability in the manifest file:

<DeviceCapability Name="serialcommunication">
   <Device Id="any">
      <Function Type="name:serialPort" />
   </Device>
</DeviceCapability>
| improve this answer | |
2

I resolved all such issues. I made complete article how. Look it on my page: http://microelk.azurewebsites.net/Raspberry_UART/Raspberry_UART.

| improve this answer | |
  • 1
    That article looks as though it has potential - but I think there may be one or two typographical errors - "...Your Raspberry has next UART pins: pin 6 - TX, pin 8 - RX..." should that not be 8 and 10, and don't forget there is a need for a signal ground (for reference for the other two) also? – SlySven Jan 6 '16 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.