Replies: 2 comments 1 reply
-
Removed the dramatic title 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ah, you know what, I think I have indeed found it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Has anyone worked with trouble and a bluetooth device that has the attibute
Write Without Response
usingtrouble
? I'm trying to connect to an Acaia bluetooth scale and I'm really, really not having a good time with it, and I'm starting to wonder if there's an aspect to doing aWrite Without Response
thattrouble
is currently missing or has not implemented.Connecting to the device has been very simple and follows the other examples; get the Service and Characteristic by UUID, connect, then subscribe to notifications for a characteristic. That all actually works perfectly fine, and I get messages back from the scale to a
listener
just like in theble_bas_central
. The issue is the scale requires a Heartbeat/Notification message to be sent every N seconds, or the scale disconnects automatically.I cannot, for the life of me, get writing one of the very well documented heartbeat messages to write to the scale without the ATT controller returning a
WRITE_NOT_PERMITTED = 0x03
error code. I've been following the BT connection/heartbeat/message logic of another open-source application called Beanconqueror, which I have downloaded and verified works on my device. Emulating it's behavior has yeilded no results. I've extracted the logic out of that app and simulated the "messages" getting encoded, hard-coded those values into my app, and I'm still getting errors. I can post the source code in a few hours.Buuuuut, I've noticed that some libraries have a flag or something to signify that there's a write without response, but
trouble
currently doesn't have the concept of this as far as I can tell. Here's the source code for the ESP32 BLE arduino library: https://github.com/espressif/arduino-esp32/blob/1467d874549280ad6542ce1a96fd39a47f45562d/libraries/BLE/src/BLERemoteCharacteristic.cpp#L571As you can see, the library passes a flag indicating that this is a write without response. As far as my introspection into the
trouble
host API has taken me last night, I don't see an API surface to add this flag into the host stack, but I'm sure it's in there somewhere. Normally I'd try and fix the issue myself, or at least identify the boundary at which this is missing or needs to be implemented at, but I was starting at this for a good 7 hours last night, so I'll tackle this again last night.Is this something that requires an API change or is this a skill issue?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions