title: QT CAN BUS, SocketCAN cannot read CAN frames
body: <p>I have troubles reading CAN frames using readFrame() method in QT.</p>
  
  <p>My code for initialization:</p>
  
  <pre><code>#include &lt;QCanBusFrame&gt;
  #include &lt;QCanBus&gt;
  #include &lt;QCanBusDevice&gt;
  
  CANSend::CANSend(QString interface){
  
  CANdevice = QCanBus::instance()-&gt;createDevice("socketcan", interface);
  if (!CANdevice-&gt;connectDevice()) {}
  
   }
  </code></pre>
  
  <p>code for sending data - everything works correctly</p>
  
  <pre><code>void CANSend::send_pos(uint16_t pos)
  {
  QCanBusFrame frame;
  frame.setFrameId(1024);
  QByteArray payload;
  payload[0]=0;
  payload[1]=pos&gt;&gt;8;
  payload[2]=pos;
  
  frame.setPayload(payload);
  CANdevice-&gt;writeFrame(frame);
  }
  </code></pre>
  
  <p>code for reading data</p>
  
  <pre><code>int CANSend::check_messages(){
  
   const QCanBusFrame frame = CANdevice-&gt;readFrame();
  
   const qint8 dataLength = frame.payload().size();
  
   const qint32 id = frame.frameId();
  
   return id;
  }
  </code></pre>
  
  <p>during debugging I always get
      frame = @0x7fffffffdf10,
      dataLength = 0,
      id = 0,</p>
  
  <p>So, even though I can clearly see incomming packets via candump command and also in QT CANBUS example, I never receive anything.</p>
  
  <p>Can you help me, please? Thanks.</p>