BLE Characteristics greater than 20 bytes with BT 4.2 and above
-
Folks,
I'm trying to get my Qt app to talk to a BT device that uses characteristics greater than twenty bytes.
I believe my laptop is equipped for this, hciconfig tells me that I am running HCI Version 4.2 and LMP Version 4.2 which I believe is fine for larger characteristics.
I have written some code for a Nordic LE device which can talk to my Qt app with characteristics of up to twenty bytes. The Nordic device clearly can cope with characteristics of greater than twenty bytes because my phone can see, read and modify the larger characteristics on the Nordic.
However, when I try to write to a forty byte long characteristic from my Qt app, it doesn't work. I get nothing into the Nordic.
If I write forty byte characteristic from the Nordic to the Qt app I get the first twenty bytes. Larger characteristics do not crash the Qt app though.
This, to me, says either:
- Qt is not set up for long characteristics (or I have to specifically set the MTU somewhere).
- My laptop's BT module isn't really suitable for this.
- Maybe Linux bluez stack isn't.
I am running Mageia 6 on an HP Envy. I am not 100% sure which module I have other than it's Intel. As I said before I think it's running 4.2 stack which should be acceptable for 21+ size characteristics.
I am using Creator 4.2.1 with Qt 5.9.4
Would be most grateful for any pointers. If there's any more useul info I am provide, please let me know.
Many thanks.
-
@DiBosco said in BLE Characteristics greater than 20 bytes with BT 4.2 and above:
Creator 4.2.1 with Qt 5.9.4
To answer my own question: Qt copes just fine with larger characteristics. The problem was at the Nordic end. Although my Android app read all forty bytes, when I subscribe to it, only twenty bytes are read. The Maxumum MTU at the Nordic end had to be increased and all was well.