<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem on Raspberry PI 2B serial port &#x2F;dev&#x2F;ttyAMA0 write timeout]]></title><description><![CDATA[<p dir="auto">Hello guys.</p>
<p dir="auto">I have a problem taking the hair.</p>
<p dir="auto">I do not know have gone for it, but what happens is that I made an application that works correctly in Windows , but when port this application in Qt 5.7.1 for Linux using a Raspberry PI 2B and its UART GPIO port.</p>
<p dir="auto">It is called /dev/ttyAMA0</p>
<pre><code>bool NetMaster485::open(const QString &amp;port, qint32 baudRate)
{
   serialPort.setBaudRate(baudRate);
   serialPort.setDataBits(QSerialPort::Data8);
   serialPort.setParity(QSerialPort::NoParity);
   serialPort.setStopBits(QSerialPort::OneStop);
   serialPort.setFlowControl(QSerialPort::NoFlowControl);
   serialPort.setPortName(port);

   return serialPort.open(QIODevice::ReadWrite);
}
</code></pre>
<pre><code>   QByteArray tx;
   
   ...
   
   serialPort.write(tx);
   serialPort.flush();
   if ( serialPort.waitForBytesWritten(timeoutTX) ) {
      return true;
   }
   return false; &lt;&lt;&lt;
</code></pre>
<p dir="auto">This aways emit error signal  QSerialPort::SerialPortError(TimeoutError)</p>
]]></description><link>https://forum.qt.io/topic/71137/problem-on-raspberry-pi-2b-serial-port-dev-ttyama0-write-timeout</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 19:28:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/71137.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Sep 2016 11:33:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem on Raspberry PI 2B serial port &#x2F;dev&#x2F;ttyAMA0 write timeout on Tue, 13 Sep 2016 20:39:00 GMT]]></title><description><![CDATA[<p dir="auto">Hello friend , I am developing a RS485 communication protocol , and the communication would be the master layer. Ie it need to write on the bus and wait for the slave answer below , if not reply consider timeout . Ie is in a half duplex connection. This will be a free API compatible with Qt , Arduino , Microchip PIC .</p>
<p dir="auto">Follow the project on this link:</p>
<p dir="auto"><a href="https://github.com/JoaoPagotto/Net485" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/JoaoPagotto/Net485</a></p>
]]></description><link>https://forum.qt.io/post/347443</link><guid isPermaLink="true">https://forum.qt.io/post/347443</guid><dc:creator><![CDATA[joaopagotto]]></dc:creator><pubDate>Tue, 13 Sep 2016 20:39:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem on Raspberry PI 2B serial port &#x2F;dev&#x2F;ttyAMA0 write timeout on Tue, 13 Sep 2016 20:15:46 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Out of curiosity, why are you not using the asynchronous mechanism ?</p>
]]></description><link>https://forum.qt.io/post/347436</link><guid isPermaLink="true">https://forum.qt.io/post/347436</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 13 Sep 2016 20:15:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem on Raspberry PI 2B serial port &#x2F;dev&#x2F;ttyAMA0 write timeout on Mon, 12 Sep 2016 22:43:38 GMT]]></title><description><![CDATA[<p dir="auto">Solved removed flush();</p>
<p dir="auto">After:</p>
<pre><code> serialPort.flush();
   if ( serialPort.waitForBytesWritten(timeoutTX) ) {
</code></pre>
<p dir="auto">Before:</p>
<pre><code>   if ( serialPort.waitForBytesWritten(timeoutTX) ) {
</code></pre>
]]></description><link>https://forum.qt.io/post/347208</link><guid isPermaLink="true">https://forum.qt.io/post/347208</guid><dc:creator><![CDATA[joaopagotto]]></dc:creator><pubDate>Mon, 12 Sep 2016 22:43:38 GMT</pubDate></item></channel></rss>