On 29-06-17 20:14, Linus Torvalds wrote:
On Thu, Jun 29, 2017 at 10:44 AM, Jan Mulder <[email protected]> wrote:
I verified your patch to select the proper notify characteristic, and that
works correctly. I suppose that this patch does not break other already
working BLE devices, so this one should go in master I think.
Sure, but if it didn't actually fix anything for you, it's pointless.

Well, it does fix my hardcoded selection of the proper notify characteristic, which is imho an general improvement.

Yes, did that, and then the receiving/reading of data is still no yet
working (not surprising as I had the correct notify characteristic hard
coded selected). I found out that BLEObject::characteristcStateChanged() is
never called in my situation, so no incoming packets are seen. Not sure why
(yet).
Ok, so then it's something else that is wrong. Possibly the

Looking at the terminal IO document you posted, I see

   "In order to receive UART data, the Terminal I/O client has to
entitle the Terminal I/O
    server to send data by granting UART credits via writing the number
of credits to be
    granted to the UART credits RX characteristic (see 6.5)."

So I think you need to do a one-byte write with the RX credits to that
third characteristic:

   UART Credits RX Characteristic
   UUID: 00000003-0000-1000-8000-008025000000

to let the other side know your receive buffer size (aka "credits"). I
think that might as well be 255.

In fact, it looks like the thing needs that to be refreshed as you
empty the buffer, so it needs to be written every time you read a
packet.

So it does look like that terminal uart needs a specific setup quirk,
and only then might my patch be relevant.

I think I'll need an actual test target ostc (unless you want to try
to hack a patch up as per my suspicion above)?

                Linus


Tried this, by sending 0xFF to the 00000003 characteristic in the read() function, but no luck (yet). Yet means that I am not giving up right now, but no relevant progress at this point. I will read (tomorrow) the TIO document more carefully, and will check the sample android code we got from Mathias, to look for obvious mistakes. This all said, if you have easy access to an BLE OSTC, just go ahead if you want.

--jan

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to