-
Aarown1017
@JonB said:
Sorry, looking back at docs, the data needs to be a byte string. You passed an actual string.
self.peripheral.write_characteristic_value(c, 0xA00101A2.to_bytes(4, 'big'), False)THIS WORKED!!!!! I cannot thank you enough.
Hope enough people find this thread because there were so many unanswered threads online.This is the device I have:
https://www.amazon.com/dp/B07MKMFP6H/ref=cm_sw_r_tw_dp_46SC6RK392XTNVHDRE89
https://drive.google.com/file/d/1aUKZaKQnj6v4Jz-hOtDGEAVyBKMAJmQk/view?usp=sharing -
Aarown1017
Any insight on how to do that? Reading up and trying to learn....
My background is mostly Bash and Powershell scripting. -
Aarown1017
I need to write "A00101A2" to a BLE Relay and cannot figure out how. The following does not work.
self.peripheral.write_characteristic_value(c, '0xA00101A2', False)
Have no idea how to format "A00101A2" for the Pythonista core bluetooth module. I can use something like "nRF Connect" or "BLE Hero" to set the value and it works.
Executing
self.peripheral.write_characteristic_value(c, '0xA00101A2', False)
sets the value to something else thats not A00101A2