GATT Transactions examples
Hi all,
I am building a windows application for pokitmeter using Python, PyQT5 and bleak (by hbldh).
What I've done so far:
1. Mock-up for the UI
2. Connect with the device and change the device name using GATT transaction.
I aim to finish the project this year and I am still new to GATT and BLE. I'm having problem configuring the device on DMM mode. I can't even set it to Temperature measurement, please see the GATT transaction I've used below:
GATT Transaction for setting Temp Measurement
-----------------------------------------------------------------
write characteristic: uuid: "53dc9a7a-bc19-4280-b76b-002d0e23b078"
value: "\x08\x00\x00\x00\x00\x00" #set temp: option #8
read characteristic: uuid: "047d3559-8bee-423a-b229-4417fa603b90"
read_value: "006f93d2410800" # hexadecimal 7 bytes
read_gatt_descriptor_value: "\x00\x00" # zero temp reading?
What I need to continue:
1. Example GATT transactions, at least one for each mode (DMM, Scope, Logger). For scope, the GATT example for fetching the waveform would be ideal.
2. Byte mapping for the DMM settings, it is said in the manual 6 bytes ( I've jut assume that the first byte is used for setting the Temperature acquisition). A tabular byte mapping for each configuration will be handy.
3. Example of byte parsing of result to reveal human readable values
Thank you in advance!
Cheers,
jdon
---------------------------------------------------------------------------------------------------------------------------------------
Snapshot of the app I'm developing:
-
Hi all,
Please disregard this enquiry. The problem I'm having is because of a silly mistake in conversion. I was just converting the values to hex form instead of doing a byte conversion. The problem is resolved by following the latest BLE API, I can now configure the pokitMeter in Multimeter mode with no problems :)
Also, all the information I needed was already in the manual.
Regards,
jdon
---------------------------------------------------------------------------------------------------------------
Below are some screenshot for reference:
0
Please sign in to leave a comment.
Comments
1 comment