Important: Please read the Qt Code of Conduct -

QBluetoothSocket to send bytes

  • I'm using QBluetoothSocket in Qt Quick on a N9 device to communicate with a SPP port/device but this device works with the 'old' 8 bits ascii characters and QBluetoothSocket in Qt Quick only accepts strings (16 bits and length).

    Is there any way I can send raw bytes, for example copy/write the bytes directly in the string variable or casting ?

    I'm a old school windows CE embedded programmer so i'm still learning QML but it's super for the graphics GUI !!


  • I think you can do both, since the string can hold 16bits you will not miss any data. Be sure to convert char* to QString using any of these two methods
    QString str(*charData);@

Log in to reply