title: Sending sms in pdu mod gets cms error 304
body: <p>I'm trying to send sms using huawei e173 gsm modem. Everything works fine in text mode, but I can't figure out how to send sms in pdu mode. I have tried to send simple message that will say "hellohello". This is my message format in Qt designer (which is irrelevant for this subject, I'm having problems with error 304 - invalid PDU mode parameter):</p>
  
  <pre><code>QByteArray PDUtext;
  PDUtext[0] = 0x00;
  PDUtext[1] = 0x11;
  PDUtext[2] = 0x00;
  PDUtext[3] = 0x0b; // Phone number length
  
  PDUtext[4] = 0x91; // International
  
  //Phone: +381 600123456 (83 61 00 21 43 65)
  
  PDUtext[5] = 0x83;
  PDUtext[6] = 0x61;
  PDUtext[7] = 0x00;
  PDUtext[8] = 0x21;
  PDUtext[9] = 0x43;
  PDUtext[10] = 0x65;
  
  PDUtext[11] = 0x00;
  PDUtext[12] = 0x00;
  PDUtext[13] = 0xaa; // 4 days validity period
  
  //E8 32 9B FD 46 97 D9 EC 37
  
  PDUtext[14] = 0x0a; // Message length
  
  // Message "hellohello"
  
  PDUtext[15] = 0xe8;
  PDUtext[16] = 0x32;
  PDUtext[17] = 0x9b;
  PDUtext[18] = 0xfd;
  PDUtext[19] = 0x46;
  PDUtext[20] = 0x97;
  PDUtext[20] = 0xd9;
  PDUtext[20] = 0xec;
  PDUtext[20] = 0x37; 
  </code></pre>
  
  <p>What is wrong with this message?</p>
  
  <p>Commands look like this:</p>
  
  <pre><code>AT+CMGF=0&lt;CR&gt; // PDU mode
  
  Modem &gt; OK
  
  AT+CMGS=20&lt;CR&gt; // Send with message length
  &gt;PDUtext&lt;Ctrl+z&gt;
  
  Modem &gt; +CMS ERROR: 304
  </code></pre>