I think I'm getting close with integrating android-bluez. I have
bluetoothd 'seeing' my adapter however dies at connecting to IPC. I've
posed the question to the bluez list.
Here is a logcat with debugging enabled. I've googled the errors and have
had no luck.
I/bluetoothd( 1072): Bluetooth daemon 5.28
D/bluetoothd( 1072):
external/bluetooth/bluez/android/main.c:set_capabilities() Caps: eff:
0x3400, perm: 0x3400, inh: 0x0
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:bt_bluetooth_start() index -1
I/bluetoothd( 1072): Starting SDP server
D/bluetoothd( 1072): external/bluetooth/bluez/android/main.c:main()
Entering main loop
I/bluetoothd( 1072): mgmt_if: [0xffff] command 0x0001
I/bluetoothd( 1072): mgmt_if: < 01 00 ff ff 00 00
..??..
I/bluetoothd( 1072): mgmt_if: > 01 00 ff ff 06 00 01 00 00 01 07 00
..??........
I/bluetoothd( 1072): mgmt_if: [0xffff] command 0x0001 complete: 0x00
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:read_version_complete()
I/bluetoothd( 1072): Bluetooth management interface 1.7 initialized
I/bluetoothd( 1072): Kernel connection control will be used
I/bluetoothd( 1072): mgmt_if: [0xffff] command 0x0003
I/bluetoothd( 1072): mgmt_if: < 03 00 ff ff 00 00
..??..
I/bluetoothd( 1072): mgmt_if: > 01 00 ff ff 07 00 03 00 00 01 00 00 00
..??.........
I/bluetoothd( 1072): mgmt_if: [0xffff] command 0x0003 complete: 0x00
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:read_index_list_complete()
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:read_index_list_complete()
Number of controllers: 1
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0004
I/bluetoothd( 1072): mgmt_if: < 04 00 00 00 00 00
......
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 1b 01 04 00 00 e9 36 36 e7 18
00 03 .........?66?...
I/bluetoothd( 1072): mgmt_if: 0f 00 bf 10 00 00 90 00 00 00 00 00 00 42
43 4d ..?..........BCM
I/bluetoothd( 1072): mgmt_if: 32 30 34 35 42 33 00 00 00 00 00 00 00 00
00 00 2045B3..........
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00
.
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0004 complete: 0x00
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:read_info_complete()
D/bluetoothd( 1072):
external/bluetooth/bluez/src/sdpd-service.c:register_device_id() Adding
device id record for 0002:1d6b:0247:051c
D/bluetoothd( 1072):
external/bluetooth/bluez/src/sdpd-service.c:add_record_to_server() Adding
record with handle 0x10001
D/bluetoothd( 1072):
external/bluetooth/bluez/src/sdpd-service.c:add_record_to_server() Record
pattern UUID 00001002-0000-1000-8000-00805f9
D/bluetoothd( 1072):
external/bluetooth/bluez/src/sdpd-service.c:add_record_to_server() Record
pattern UUID 0000113a-0000-1000-8000-00805f9
D/bluetoothd( 1072):
external/bluetooth/bluez/src/sdpd-service.c:add_record_to_server() Record
pattern UUID 0000113b-0000-1000-8000-00805f9
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:load_ltks() ltks 0
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:load_irks() irks 0
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:load_link_keys() keys 0
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x000e
I/bluetoothd( 1072): mgmt_if: < 0e 00 00 00 02 00 02 0c
........
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 06 00 0e 00 00 00 00 00
............
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x000e complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0011
I/bluetoothd( 1072): mgmt_if: < 11 00 00 00 10 00 00 00 00 00 00 00 00 00
00 00 ................
I/bluetoothd( 1072): mgmt_if: 00 00 00 00 00 00
......
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 06 00 11 00 00 00 00 00
............
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0011 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0034
I/bluetoothd( 1072): mgmt_if: < 34 00 00 00 07 00 00 00 00 00 00 00 00
4............
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 0a 00 34 00 00 00 00 00 00 00
00 00 ......4.........
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0034 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0018
I/bluetoothd( 1072): mgmt_if: < 18 00 00 00 01 00 01
.......
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 03 00 18 00 00
.........
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0018 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0028
I/bluetoothd( 1072): mgmt_if: < 28 00 00 00 08 00 02 00 6b 1d 47 02 1c 05
(.......k.G...
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 03 00 28 00 00
......(..
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0028 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0010
I/bluetoothd( 1072): mgmt_if: < 10 00 00 00 11 00 fb 34 9b 5f 80 00 00 80
00 10 ......?4._......
I/bluetoothd( 1072): mgmt_if: 00 00 00 12 00 00 00
.......
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 06 00 10 00 00 00 00 00
............
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0010 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0010
I/bluetoothd( 1072): mgmt_if: < 10 00 00 00 11 00 fb 34 9b 5f 80 00 00 80
00 10 ......?4._......
I/bluetoothd( 1072): mgmt_if: 00 00 3b 11 00 00 00
..;....
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 06 00 10 00 00 00 00 00
............
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0010 complete: 0x00
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0013
I/bluetoothd( 1072): mgmt_if: < 13 00 00 00 02 00 00 00
........
I/bluetoothd( 1072): mgmt_if: > 02 00 00 00 03 00 13 00 0c
.........
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x13 status: 0x0c
I/bluetoothd( 1072): Failed to load LTKs: Not Supported (0x0c)
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0030
I/bluetoothd( 1072): mgmt_if: < 30 00 00 00 02 00 00 00
0.......
I/bluetoothd( 1072): mgmt_if: > 02 00 00 00 03 00 30 00 0c
......0..
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x30 status: 0x0c
I/bluetoothd( 1072): Failed to load IRKs: Not Supported (0x0c)
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0012
I/bluetoothd( 1072): mgmt_if: < 12 00 00 00 03 00 00 00 00
.........
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 03 00 12 00 00
.........
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0012 complete: 0x00
D/bluetoothd( 1072):
external/bluetooth/bluez/android/bluetooth.c:load_link_keys_complete()
status 0
I/bluetoothd( 1072): Adapter initialized
D/bluetoothd( 1072):
external/bluetooth/bluez/android/ipc.c:cmd_connect_cb()
E/bluetoothd( 1072): IPC: command socket connect failed
I/bluetoothd( 1072): Switching controller off
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0005
I/bluetoothd( 1072): mgmt_if: < 05 00 00 00 01 00 00
.......
I/bluetoothd( 1072): mgmt_if: > 01 00 00 00 07 00 05 00 00 90 00 00 00
.............
I/bluetoothd( 1072): mgmt_if: [0x0000] command 0x0005 complete: 0x00
D/bluetoothd( 1072):
external/bluetooth/bluez/android/main.c:cleanup_services()
I/bluetoothd( 1072): Stopping SDP server
I/bluetoothd( 1072): Exit
On Monday, February 16, 2015 at 4:23:24 PM UTC-7, Keith Conger wrote:
>
> Hi,
>
> I'm currently trying two approaches:
>
> 1) Integrating android-x86's bluedroid
>
> 2) Using android-bluez as a replacement to bluedroid
>
> Neither is functional yet :( I'll report back when I have something
> working.
>
> Keith
>
> On Monday, February 16, 2015 at 1:17:03 PM UTC-7, LW wrote:
>>
>> Hi Keith,
>>
>> I am working on similar project and very interested your progress.
>>
>> I have a Knivao BTD-400 Bluetooth USB adapter (it uses Broadcom
>> BCM20702A0 chip). My work is based on the TI stock Beaglebone Black android
>> code base (JB 4.2 Kernel 3.2.0). I noticed that the BCM20702A0 is supported
>> by default.
>>
>> By adding the VID and PID of the USB adapter to the btusb_table in
>> btusb.c and perform an echo in android shell like: echo "0x05ac, 0x21e8" >
>> /sys/bus/usb/driver/btusb/new_id, the hci0 interface will shown up under
>> /sys/class/bluetooth/hci/hci0
>>
>> Then I can the hciconfig to bring hci0 up / down and use hcitool to do
>> scan and detect other bluetooth devices (hciconfig and hcitool are ported
>> from ICS). It seems that the USB bluetooth device at kernel level is alive.
>> As you know in JB4.2 it seems that the UART interface is the by-default
>> interface between the android and kernel. Basically I am not able to enable
>> the bluetooth from android. The interface is missing. I am trying to figure
>> out how to bridge the gap here.
>>
>> It seems that you made progress on the android side but couldn't detect
>> supported device. I wonder if you could share the information on porting
>> and building the bluedroid ( assuming using android-x86).
>>
>> Thanks,
>>
>> Lei
>>
>>
>>
>>
>> On Wednesday, February 11, 2015 at 10:26:23 AM UTC-5, Keith Conger wrote:
>>>
>>> Getting closer. I have everything built and running bdt, produces a
>>> logcat message that there is no supported device. This is with two
>>> different adapters. I've posted some questions to the android-x86 list
>>> including which adapters are supported. I think I'm getting close.
>>>
>>> Also I found that there is a android-bluez project that is a drop in
>>> replacement for bluedroid. I may try that next.
>>>
>>> https://01.org/bluez-android
>>>
>>>
>>> On Tuesday, February 10, 2015 at 3:29:53 PM UTC-7, Keith Conger wrote:
>>>>
>>>> That was it RFKILL needed to be built in also. Rebuilding.
>>>>
>>>> On Tue, Feb 10, 2015 at 2:06 PM, Andrew Henderson <[email protected]>
>>>> wrote:
>>>>
>>>>> Try configuring the kernel using the "menuconfig" target (like "make
>>>>> menuconfig" in the makefile). I suspect that you are manually setting
>>>>> something in the .config and there are other settings that conflict with
>>>>> it. Normally, these conflicts are managed via the Kconfig or menuconfig
>>>>> interface (i.e. it just takes options away from you or forces some items
>>>>> to
>>>>> be modules). Make sure that the options that you are setting are
>>>>> actually
>>>>> all compatible with each other. If all else fails, you can manually
>>>>> insmod
>>>>> modules in the init.{ro.hardware}.rc file inside of Android during boot.
>>>>>
>>>>> On Tuesday, February 10, 2015 at 3:41:52 PM UTC-5, Keith Conger wrote:
>>>>>>
>>>>>> It built without errors. I'm having trouble with the kernel though.
>>>>>> I made sure kernel/.config and am335x_evm_android_defconfig both had
>>>>>> CONFIG_BT=y. I re-ran make in the root of BBBAndroid. As soon as I
>>>>>> answered the questions about the USB gadget driver it reverted to
>>>>>> CONFIG_BT=m
>>>>>> along with the other options I modified. Any ideas Andrew?
>>>>>>
>>>>> --
>>>>> For more options, visit http://beagleboard.org/discuss
>>>>> ---
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "BeagleBoard" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/beagleboard/X4HYHv9cC-0/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Keith Conger
>>>> keith DOT conger AT gmail DOT com
>>>> http://thecongers.org
>>>>
>>>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.