locked
UWP UART send/recieve bytes incorrectly RRS feed

  • Question

  • Hi, i have Pi3 and i'm developing UWP to transfer data from/to Pi3 and another device (currently PC over UART)

    but i can't get the right data, i'm using the Sample from Microsoft SerialSample but it didn't work, the data comes not right, i enforced the encoding in the App in both sides but no luck.

    The Sample

    if anyone faced this issue before or have any information regarding.

    Thank you

    Thank you

    Tuesday, December 27, 2016 1:08 PM

Answers

  • Hi,

    After some search and tries and changing the UART cables, i found out that the problem from the cable it self, Win IoT doesn't support all UART cable , it only support one chip HW Supported List .

    i bought the cable from adafruit and it's working now.

    Thank you


    Thank you

    • Marked as answer by Tamer.Ahmed Saturday, January 7, 2017 10:10 AM
    Saturday, January 7, 2017 10:10 AM

All replies

  • Hello Tamer,

    Most serial issues with the Pi3 are due to the hardware.  Pi3 does not have a full UART so not all configurations are available. Can you try a Pi2b?

    Note there a number of other threads in this forum regarding serial & UART that may help you.  For example https://social.msdn.microsoft.com/Forums/en-US/da4f2dde-bd61-477b-bd64-1eb53f3a1d50/windows-iot-core-serial-port-encoding-support-for-sending-hex-value?forum=WindowsIoT

    Sincerely,

    IoTGirl


    Tuesday, December 27, 2016 4:56 PM
  • Hi,

    Actually the issue for the same sample with Pi3 and Pi2 both has the same problem.

    I'll check the post you mentioned and get back to you.

    Thank you


    Thank you

    Tuesday, December 27, 2016 7:07 PM
  • Dear friend,

    If you are going to receive Hex data form Serial Port, this sample is not good for you .

    Please refer to this project:

    https://www.hackster.io/JiongShi/a-pm2-5-and-pm-10-detector-design-for-windows-10-uwp-app-1f3427?ref=user&ref_id=12324&offset=1


    Keep Fighting

    Wednesday, December 28, 2016 4:37 AM
  • Hi Jiong,

    The data i want to send/receive is string, Audio and Video as Bytes .

    i'll check the post you mentioned.


    Thank you

    Wednesday, December 28, 2016 4:43 AM
  • Hi,

    After some search and tries and changing the UART cables, i found out that the problem from the cable it self, Win IoT doesn't support all UART cable , it only support one chip HW Supported List .

    i bought the cable from adafruit and it's working now.

    Thank you


    Thank you

    • Marked as answer by Tamer.Ahmed Saturday, January 7, 2017 10:10 AM
    Saturday, January 7, 2017 10:10 AM
  • Excellent! I assume you mean you had a serial cable that was not wired for cross communication?  For example modem vs nullmodem.
    Sunday, January 8, 2017 11:02 PM
  • No i had a correctly wired cable but using unsupported Chip. the chip was CH340.

    my old cable is working fine with other boards and devices that's why i didn't suspect that the problem was the cable in the first place.


    Regards


    Thank you

    Tuesday, January 10, 2017 10:20 AM
  • Hi Tamer,

    Many thanks for clarifying your answer.

    Sincerely,

    IoTGirl

    Tuesday, January 10, 2017 5:14 PM