Closed
Bug 1142007
Opened 9 years ago
Closed 6 years ago
Bluedroid function |get_remote_service_record| doesn't work
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: tzimmermann, Unassigned)
References
Details
Attachments
(1 obsolete file)
Calling |get_remote_service_record| of the Bluedroid API does not return a service record. The returned UUID id 0, the channel is -1. The logcat contains the following error message.
> E/ ( 207): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_dm.c line 1621 unhandled remote service record event (4) ###
Reporter | ||
Comment 1•9 years ago
|
||
Here's a stack trace from where this error is reported. #0 tgkill () at bionic/libc/arch-arm/bionic/tgkill.S:46 #1 0xb6e8e13c in pthread_kill (t=<optimized out>, sig=6) at bionic/libc/bionic/pthread_kill.cpp:49 #2 0xb6e8e350 in raise (sig=6) at bionic/libc/bionic/raise.cpp:32 #3 0xb6e8d086 in __libc_android_abort () at bionic/libc/bionic/abort.cpp:55 #4 0xb6e9c9a0 in abort () at bionic/libc/arch-arm/bionic/abort_arm.S:41 #5 0xb6c7ea7c in btif_dm_remote_service_record_evt (event=<optimized out>, p_param=0xb729591e "\300\030\205\334\331\237Ͷ\234\377(\267̯\340\266\204\255Ӷ\234\377(\267\f") at external/bluetooth/bluedroid/main/../btif/src/btif_dm.c:1622 #6 0xb6c7d658 in btif_context_switched (p_msg=0xb7295910) at external/bluetooth/bluedroid/main/../btif/src/btif_core.c:189 #7 btif_task (params=<optimized out>) at external/bluetooth/bluedroid/main/../btif/src/btif_core.c:349 #8 0xb6ca6726 in gki_task_entry (params=3068215700) at external/bluetooth/bluedroid/gki/./ulinux/gki_ulinux.c:157 #9 0xb6e8822c in __thread_entry (func=0xb6ca66c9 <gki_task_entry>, arg=0xb6e14194 <gki_pthread_info+12>, tls=0xb6766dd0) at bionic/libc/bionic/pthread_create.cpp:105 #10 0xb6e883c4 in pthread_create (thread_out=0xb6e12df8 <gki_cb+8>, attr=<optimized out>, start_routine=0xb6ca66c9 <gki_task_entry>, arg=0x78) at bionic/libc/bionic/pthread_create.cpp:224 #11 0x00000000 in ?? ()
Reporter | ||
Comment 2•9 years ago
|
||
The final HCI messages on my notebook are listed below. It looks like the request for the service record has been received and responded correctly by the computer. > ACL data: handle 12 flags 0x02 dlen 38 L2CAP(d): cid 0x0040 len 34 [psm 1] SDP SSA Req: tid 0x0 len 0x1d pat uuid-128 00001105-0000-1000-8000-00805f9b34fb max 240 aid(s) 0x0000 - 0xffff cont 00 < ACL data: handle 12 flags 0x00 dlen 115 L2CAP(d): cid 0x0044 len 111 [psm 1] SDP SSA Rsp: tid 0x0 len 0x6a count 103 record #0 aid 0x0000 (SrvRecHndl) uint 0x10006 aid 0x0001 (SrvClassIDList) < uuid-16 0x1105 (OBEXObjPush) > aid 0x0004 (ProtocolDescList) < < uuid-16 0x0100 (L2CAP) > < uuid-16 0x0003 (RFCOMM) uint 0x9 > < uuid-16 0x0008 (OBEX) > > aid 0x0005 (BrwGrpList) < uuid-16 0x1002 (PubBrwsGrp) > aid 0x0009 (BTProfileDescList) < < uuid-16 0x1105 (OBEXObjPush) uint 0x100 > > aid 0x0100 (SrvName) str "OBEX Object Push" aid 0x0303 (SuppFormatsList) < uint 0x1 uint 0x2 uint 0x3 uint 0x4 uint 0x5 uint 0x6 uint 0xff > cont 00 > ACL data: handle 12 flags 0x02 dlen 12 L2CAP(s): Disconn req: dcid 0x0040 scid 0x0044 < ACL data: handle 12 flags 0x00 dlen 12 L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0044 > HCI Event: Number of Completed Packets (0x13) plen 5 handle 12 packets 2
Reporter | ||
Comment 3•9 years ago
|
||
Michael, I can trigger this problem when I call |get_remote_service_record|. I give a correct UUID and device address to the function, but it always returns an error (i.e., UUID of 0, channel of -1, empty record name). Comment 2 indicates that the lookup from the remote device worked correctly. Could this be a driver problem? Have you seen this before?
Flags: needinfo?(mvines)
Comment 4•9 years ago
|
||
We've not seen this crash in our builds yet, no. I assume this is on a Flame? Can you try on a v2.2 reference device?
Flags: needinfo?(mvines)
Reporter | ||
Comment 5•9 years ago
|
||
It's actually not a crash. The function simply doesn't return a meaningful result. We didn't use it until now, so the problem never showed up.
I prepared this path to trigger the function. The STR is
- open Settings app and pair with Notebook/PC
- open Camera app and take a picture
- from within Camera app, send picture to paired BT device
Expected result
- both devices will start the transmission and copy the picture
Actual result
- there's a Gaia message that the transfer started, but nothing happens
The logcat will show the error message. and with the patch applied, Gecko should print lines like these
> I/GeckoBluetooth( 206): RemoteDevicePropertiesNotification: virtual void mozilla::dom::bluetooth::BluetoothServiceBluedroid::RemoteDevicePropertiesNotification(mozilla::dom::bluetooth::BluetoothStatus, const nsAString_internal&, int, const mozilla::dom::bluetooth::BluetoothProperty*):1587 00001105-0000-1000-8000-00805f9b34fb
> I/GeckoBluetooth( 206): RemoteDevicePropertiesNotification: virtual void mozilla::dom::bluetooth::BluetoothServiceBluedroid::RemoteDevicePropertiesNotification(mozilla::dom::bluetooth::BluetoothStatus, const nsAString_internal&, int, const mozilla::dom::bluetooth::BluetoothProperty*):1610 00000000-0000-0000-0000-000000000000
The first line shows the UUID of the service (OPP in this case) that was given to |get_remote_service_record|. The second line is the UUID in the returned service record. It's always zero. I observed this with in-Gecko and bluetoothd backends, and also checked the UUID structure when it comes out of Bluedroid.
Since my PC's HCI data indicates that the request was handled correctly, I assume that there's a problem in the Bluedroid driver or something's wrong in the way I call the function. BTW, the patch explicitly calls |get_remote_services| first to make sure that the local data/state is up-to-date.
Attachment #8577200 -
Flags: feedback?(mvines)
Comment 6•9 years ago
|
||
How does this impact v2.2? I don't see anything on the bug attributes that tie it to our current efforts. Providing such a link would really help to prioritize.
Reporter | ||
Comment 7•9 years ago
|
||
We don't use this function in v2.2, so this version is not affected.
Comment 8•9 years ago
|
||
Comment on attachment 8577200 [details] [diff] [review] Lookup service channel in Bluedroid's OPP manager Review of attachment 8577200 [details] [diff] [review]: ----------------------------------------------------------------- (Sry, hit me up for post v2.2 stuff later in the year)
Attachment #8577200 -
Flags: feedback?(mvines)
Reporter | ||
Updated•9 years ago
|
Attachment #8577200 -
Attachment is obsolete: true
Reporter | ||
Comment 9•9 years ago
|
||
I submitted a bug report to Google: https://code.google.com/p/android/issues/detail?id=179772
Comment 10•6 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•