Open mangocitizenkane opened 1 month ago
Hi Abdullah,
thanks for the kind words, can you go a bit more into details what you want to do in your project? What kind of programming/scripting language do you plan to use, or do you just want to use gattool for testing? I have not used gatttool extensively, but there exists a short introduction here: https://cxiao.net/posts/2015-12-13-gatttool/
Trying to answer your questions:
You start up the omron in pairing mode (blinking P), then pair and connect using bluetooth.
Then you write a sequence of bytes to the characteristic b305b680...
. First to enable key programming mode, then programm a new 16 byte key. This is done in the function writeNewUnlockKey().
Then the omron needs to be restarted in normal mode, and a bluetooth pairing and connection must be reestablished. Then you write the key you programmed previously to the the characteristic b305b680...
to unlock the data access. To give a brief overview of the steps for reading the data:
For some second reference implementation, you can also take a look at the code from the ubpm project, which uses QT.
but I'm interested in understanding how the same could be achieved using gatttool
I'm not sure if gatttool is such a good choice, it feels more like an interactive command line tool, to do a simple read of bluetooth characteristics. As far as I know, it is also deprecated by the bluez team. Is there a specific reason why you don't want to use a library or access the bluez backend directely?
If you really want to do it though, you will need some external code that calls gatttool repeatedly with the --char-write
and --listen
flags and than analyzes the data.
Regards, Benjamin
Hello,
I came across your script on GitHub for connecting to and retrieving data from Omron blood pressure monitors using Bluetooth Low Energy (BLE). It's incredibly well-written and thorough, and I appreciate you sharing it with the community.
I'm currently working on a similar project and was wondering if you could provide some guidance on using gatttool for connecting to the blood pressure monitor and retrieving data. Specifically, I would like to understand the following:
How to initiate a connection to the Omron device using gatttool.
Thank you in advance for your time and assistance. I look forward to your response.
Best regards, Abdullah