Closed Bug 1115653 Opened 10 years ago Closed 9 years ago

[Bluetooth2] Implement GATT support to Bluetooth daemon

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-master fixed)

RESOLVED FIXED
2.2 S14 (12june)
Tracking Status
b2g-master --- fixed

People

(Reporter: yrliou, Assigned: tzimmermann)

References

Details

Attachments

(2 files, 1 obsolete file)

This bug is to adopt daemon architecture for current GATT HAL interface.
We will also need to make sure we can build on JB, KK, and L.
Attached file Github branch for bluetoothd (obsolete) —
Assignee: nobody → tzimmermann
Status: NEW → ASSIGNED
Revise the summary to trace daemon work, I will open another bug for gecko work.
Summary: [Bluetooth2] Implement GATT support in daemon backend → [Bluetooth2] Implement GATT support to Bluetooth daemon
Ah! m( I think I messed this up and should have taken bug 1147002 instead. Thanks for taking care of the problem.
See Also: → 1163499
Hi Michael,

AFAIK flame-kk is at Android API version 19 (Android 4.4.2). For Bluetooth we use [1], which is an interface of API version 18.

The file comes from the default CAF branch for flame-kk. How can we solve this problem?

[1] https://www.codeaurora.org/cgit/external/gigabyte/platform/hardware/libhardware/tree/include/hardware/bt_gatt_client.h?h=caf/LNX.LA.3.5.2.1.1#n190
Flags: needinfo?(mwu)
Comment on attachment 8583168 [details]
Github branch for bluetoothd

Updated Github tree

  - cleaned up code
  - added support for GATT commands
Jocelyn, Bruce,

I'm setting ni? to let you know that I added GATT support to bluetoothd. It should build on flame-kk, but it's not portable until we fixed the version problem from comment 5.
Flags: needinfo?(joliu)
Flags: needinfo?(brsun)
Flags: needinfo?(mwu)
Comment on attachment 8583168 [details]
Github branch for bluetoothd

Updated Github tree

  - handle API differences of Kitkat
  - support Lollipop
Flags: needinfo?(joliu)
Depends on: 1168344
Waiting for bug 1168344...
Flags: needinfo?(brsun)
Attached file Github pull request
Attachment #8583168 - Attachment is obsolete: true
Attachment #8612358 - Flags: review?(joliu)
I have reviewed proposed patches and left some comments on github, except for 'Bug 1115653: Added GATT commands and responses.'.
I will continue to review that patch on next Monday.

Thanks,
Jocelyn
See Also: → 1170071
Jocelyn,

Thanks so far for your review. I fixed the patches accordingly, except for the one you mentioned in comment 11. I'll push out the complete update once you finished the final review.
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #12)
> Jocelyn,
> 
> Thanks so far for your review. I fixed the patches accordingly, except for
> the one you mentioned in comment 11. I'll push out the complete update once
> you finished the final review.

Hi Thomas,

I have finished the review of all the commits.
Please see my comments on github.

If possible, could you provide an interdiff in this bug?
It would be easier to see the changes and identify needed corresponding gecko changes.

Thanks,
Jocelyn
Comment on attachment 8612358 [details] [review]
Github pull request

Updated Github pull request:

  - fixed protocol as mentioned in review
  - fixed nits as mentionde in the review
  - fixed protocol decoding in |set_adv_data|
  - fixed use of format strings 'm' and 'M' where the data pointer and the length were in incorrect order
Jocelyn,

thanks again for the details review. I think that in the future, I'll use the BlueZ sources directly when writing protocol code.

I pushed the updated pull request to Github. The diff is attached.
s/details/detailed
Comment on attachment 8612358 [details] [review]
Github pull request

Please see my comment at github.
r=me after the comment addressed.

Thanks!
Attachment #8612358 - Flags: review?(joliu) → review+
Comment on attachment 8612358 [details] [review]
Github pull request

Updated Github tree:
 
  - renamed 'transport' to 'transid' in |opcode_server_send_response|
Jocelyn,

Do you have an ETA for the GATT server code in Gecko? I'd like to not land this patch set until the server ops and notifications got some basic testing. Is that OK for you?
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #20)
> Jocelyn,
> 
> Do you have an ETA for the GATT server code in Gecko? I'd like to not land
> this patch set until the server ops and notifications got some basic
> testing. Is that OK for you?

As we discussed offline on irc, server code in gecko backend should be this or next week, but there is no DOM API at this moment which will really use these backend code.
It's a bit of hard to do the test for server right now.
I don't have a clear timeline for DOM API, but it might be weeks away.

Me and brsun have tested client part again, it looks fine after apply the gecko fix in Bug 1171100 and Bug 1170971. No daemon bug has been found during our test.

Personally I would like to have at least client support in bluetooth daemon to be landed recently.
In this case, let's land the patch set. Thanks to both of you for testing the client-side code.
Keywords: checkin-needed
Master: https://github.com/mozilla-b2g/platform_system_bluetoothd/commit/9afc4e0e3e883f3a22a5eb94470d50f4b1cfe5c5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S14 (12june)
See Also: → 1228543
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: