[SOLVED] QByteArray and AT Commands
anybody in here how to put the AT-Commands to QByteArray?
AT+CMGL="ALL" to QByteArray?
AT+CMGS=*0000000#<CR>Hello World<Ctrl+Z> to QByteArray? where <CR> is carriage return/Enter button and <Ctrl+Z> is Ctrl button and Z buton.
thanks a lot.
Hi, create a QString, then use the .toAscii on it, it will be a const data * return, you can insert that into the QByteArray.
@QbyteArray AT_Command = QString("AT+CMGL="ALL"").toAscii()@
the \ needed to have the " character included in the QString
thanks for the reply but how about something that has carriage return or Ctrl+Z?
I would say (not tested though)
QByteArray cmd("AT+CMGS=*0000000#\rHello World\x1A");
You see the other control character in the"ASCII table":http://en.wikipedia.org/wiki/ASCII#ASCII_control_code_chart
Hope it helps
thanks. i will try.
it really works.. thanks a lot..