IanHarvey / bluepy

Python interface to Bluetooth LE on Linux
Other
1.61k stars 490 forks source link

How to send a write command packet? #472

Open xxxcha opened 2 years ago

xxxcha commented 2 years ago

Hi, I want to send a write command packet (opcode=0x52) with Bluepy, but when I use write() or writeCharacteristic(), it always send a write request packet (opcode=0x12). Is there any idea to modify this opcode and send write command packet? Thank you very much!

doug-holtsinger commented 2 years ago

The "withResponse" option to the wr command determines whether a response is required or not. Set it to False for a write command (opcode 0x52) and set to True for a write request (opcode 0x12) with a response. The default value is False.