Closed Bug 1178629 Opened 10 years ago Closed 10 years ago

Sometimes device name is empty when using LE Scan

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-master fixed)

RESOLVED FIXED
FxOS-S3 (24Jul)
Tracking Status
b2g-master --- fixed

People

(Reporter: yrliou, Assigned: brsun)

References

Details

Attachments

(1 file)

When using bluetoothd as the backend, some devices' names are empty. I suppose this is caused by https://github.com/mozilla-b2g/platform_system_bluetoothd/blob/master/src/bt-gatt-io.c#L314. adv_data might be truncated because of using strlen in this line. We need to fix it in order to pass complete adv_data to gecko backend.
(In reply to Jocelyn Liu [:jocelyn] [:joliu] from comment #0) > When using bluetoothd as the backend, some devices' names are empty. some devices' names are empty when using LEScan. > I suppose this is caused by > https://github.com/mozilla-b2g/platform_system_bluetoothd/blob/master/src/bt- > gatt-io.c#L314. > > adv_data might be truncated because of using strlen in this line. > We need to fix it in order to pass complete adv_data to gecko backend.
Blocks: 1165848
Although the maximum length defined in spec (Vol. 3, Part C, Chapter 11) is 31 octets, bluedroid on AOSP uses 62 bytes to pass EIR data. So probably we need to calculate the total length by accumulating the length of each AD structure. [1] http://androidxref.com/4.4.4_r1/xref/external/bluetooth/bluedroid/btif/src/btif_gatt_client.c#543
Assignee: nobody → brsun
Comment on attachment 8627630 [details] [review] https://github.com/mozilla-b2g/platform_system_bluetoothd/pull/35 Sorry for this review taking so long. I just returned from PTO. Please see the Github repo for some nits. Does this require changes on the Gecko side when we're unpacking the notification?
Attachment #8627630 - Flags: review?(tzimmermann) → review+
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #4) > Comment on attachment 8627630 [details] [review] > https://github.com/mozilla-b2g/platform_system_bluetoothd/pull/35 > > Sorry for this review taking so long. I just returned from PTO. > Not at all. Thanks for reviewing the patch. :) > Please see the Github repo for some nits. Does this require changes on the > Gecko side when we're unpacking the notification? It seems Gecko side [1] is good already as long as the value of the length field is correct. [1] https://dxr.mozilla.org/mozilla-central/source/dom/bluetooth/bluedroid/BluetoothDaemonGattInterface.cpp#1099
Hi Thomas, Would you mind having a look on my comments in the patch before I request for checkin-needed? I am a little afraid that the comments are not short enough...
Flags: needinfo?(tzimmermann)
Done. Just a nit.
Flags: needinfo?(tzimmermann)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S3 (24Jul)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: