This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Troubleshoot the Raspberry Pi Serial Port

Missing or Garbled Data

When you try to exchange data with the serial device, the data is garbled or missing.

write(myserialdevice,[10 12],'uint16')

Creating a connection and writing data to a serial device does not provide any indication of success or failure.

The device is not connected to the Raspberry Pi™ serial port. Or, the connection to the serial device is not configured correctly.

To solve this issue, do the following:

  • Verify the physical connection between the Rx and Tx pins and their counterparts on the serial device.

  • Verify the serial port settings that the serial device requires. Clear the handle for the current serial connection. Create a new connection that uses the correct serial port settings.

  • Verify the data precision that the serial device requires. Write data using the correct serial port settings.