Reading GATT characteristic notification not possible

106 views
Skip to first unread message

Волк Тамбовский

unread,
Jan 29, 2024, 2:33:36 AM1/29/24
to Automate for Android
Hi.


I have some bluetooth device with a custom characteristic notification, which value I want to use as a trigger.

nRF Connect and LightBlue are showing the notification messages, but when I try Automate I get "java.io.IOException: Read not permitted"...

I'm new to Automate, so any advice would be very apreciated.
Screenshot_20240126-153758.png
Screenshot_20240126-154008.png
Screenshot_20240129-082111.png
Screenshot_20240126-154022.png
Screenshot_20240129-082239.png
Screenshot_20240129-082248.png

Волк Тамбовский

unread,
Jan 29, 2024, 3:59:35 AM1/29/24
to Automate for Android
Just found a similar request without solution on Reddit: https://www.reddit.com/r/AutomateUser/comments/15iszot/bt_gatt_read_read_not_permitted_exception/
понедельник, 29 января 2024 г. в 08:33:36 UTC+1, Волк Тамбовский:

Henrik "The Developer" Lindqvist

unread,
Jan 29, 2024, 5:40:44 AM1/29/24
to Automate for Android
As the documentation say, "If the proceed option is set to Immediately, then the fiber will proceed when the characteristic value has been read", this requires READ permission.
To await a NOTIFY or INDICATE use Proceed=When changed instead.

Волк Тамбовский

unread,
Jan 29, 2024, 6:13:48 AM1/29/24
to Automate for Android
Oh, sorry, this was my understanding failure...)))
Just one more thing: can you advice me how to get the message values in hex format, like in nRF Connect?

понедельник, 29 января 2024 г. в 11:40:44 UTC+1, Henrik "The Developer" Lindqvist:

Волк Тамбовский

unread,
Jan 29, 2024, 6:28:36 AM1/29/24
to Automate for Android
I mean that I want to make the trigger depend on the value of the exact hex value message.
As I said, I'm new to Automate...

понедельник, 29 января 2024 г. в 12:13:48 UTC+1, Волк Тамбовский:

Henrik "The Developer" Lindqvist

unread,
Jan 29, 2024, 6:32:27 AM1/29/24
to Automate for Android
There's no such thing as hex format, it's just the way nRF connect choose to display the whole characteristics data as binary.
The Bluetooth GATT read block works on a single value in a characteristic, not the whole data.

Волк Тамбовский

unread,
Jan 29, 2024, 6:38:25 AM1/29/24
to Automate for Android
Oh...
So there is no possibility to make a value dependent trigger?
It is so: the service on my device is indicating the charging state (wether device is actually charging or not) and I see in nRF Connect this value changing when I put it to its charging station and changing back when I put it down from charging - I need to difference between this both states and to perform different actions when device is charging and when it's not.
So, you say, no possibility to achieve this? Do I understand right?

понедельник, 29 января 2024 г. в 12:32:27 UTC+1, Henrik "The Developer" Lindqvist:

Henrik "The Developer" Lindqvist

unread,
Jan 29, 2024, 6:46:14 AM1/29/24
to Automate for Android
As it works now is "value dependent", you choose the characteristic, its value format and offset.

Волк Тамбовский

unread,
Jan 29, 2024, 6:49:18 AM1/29/24
to Automate for Android
Yes, just managed it.)))
Sorry for dumb questions and thanks a lot for your time and your support!

понедельник, 29 января 2024 г. в 12:46:14 UTC+1, Henrik "The Developer" Lindqvist:
Reply all
Reply to author
Forward
0 new messages