Closed kotrs closed 3 years ago
That's odd, because this is the relevant code:
options.put("type", writeType == WriteType.WITH_RESPONSE ? "request" : "command");
nativeCharacteristic.writeValue(bytesToWrite, options);
What version of Bluez are you using and what hardware?
Bluez version 5.50 on Armbian Debian Buster HW Banana Pi M2 Zero I don't know if this is the problem. Because, I need to get data from smart watch. Mobile phone app sends Write Command always. But when I send Write Request from Linux device it works for configuration changes (theme, wear hand, measure interval and so on) but not for gain data. It is strange. The problem is elsewhere maybe.
No idea what the problem could be. Perhaps the driver of the M2 Zero?
Any luck fixing this issue?
Yes, I fixed it. Bluez version 5.50 does not support WriteType parameter. I think that version 5.51 supports it...I use 5.53 and it works.
Ah great to hear it is solved!
I try to send command with writeCharacteristic method with without_response parameter. But the slave device receive Write Request instead of Write Command.