Thanks for checking that - it looks likely that's the issue then.
The opcodes aren't the ones I send to the BLE stack (eg. BLE_GATT_OP_WRITE_REQ vs BLE_GATT_OP_WRITE_CMD) but I suppose it's likely that the Bluetooth stack would use its own enumerations anyway.
If you're able to compile yourself, you could change the opcode used in jsble_central_characteristicWrite and see if it makes any difference.
Otherwise it looks like I need to add code to the BLE_GATTC_EVT_CHAR_DISC_RSP handler to store whether 'write with response' is available for a specific characteristic, and then to check that when writing to see which write should be performed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for checking that - it looks likely that's the issue then.
The opcodes aren't the ones I send to the BLE stack (eg.
BLE_GATT_OP_WRITE_REQ
vsBLE_GATT_OP_WRITE_CMD
) but I suppose it's likely that the Bluetooth stack would use its own enumerations anyway.If you're able to compile yourself, you could change the opcode used in
jsble_central_characteristicWrite
and see if it makes any difference.Otherwise it looks like I need to add code to the
BLE_GATTC_EVT_CHAR_DISC_RSP
handler to store whether 'write with response' is available for a specific characteristic, and then to check that when writing to see which write should be performed.I've just filed a bug for it here: https://github.com/espruino/Espruino/issues/1059