Hi,
I am attempting to get Bluetooth working on an Android platform. I have got
things to the stage where a manual hciattach appears to work ok but an
attempt to start Bluetooth via the Android GUI fails and nothing much
appears to happen. Android version is 2.3.3. Kernal is 2.6.35.
I've had a look around the forums about this but everything seems to be set
up correctly. Can anyone suggest what the problem is?
Thanks,
Bruno
Here's the relevant bit of logcat after an attempt to turn Bluetooth on.
D/BluetoothService( 2084): Bluetooth state 10 -> 11
V/BluetoothEventRedirector( 2194): Received
android.bluetooth.adapter.action.STATE_CHANGED
I/bluedroid( 2084): Starting hciattach daemon
E/bluedroid( 2084): bt_enable: Timeout waiting for HCI device to come up
D/BluetoothService( 2084): Bluetooth state 11 -> 10
V/BluetoothEventRedirector( 2194): Received
android.bluetooth.adapter.action.STATE_CHANGED
W/ActivityManager( 2084): finishReceiver called but active receiver is
different
Here's the relevant piece from the init.rc file
# Prepare for bluetooth
chmod 665 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write /sys/class/rfkill/rfkill0/state 0
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service hfag /system/bin/sdptool add --channel=10 HFAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --channel=12 OPUSH
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hciattach /system/bin/hciattach -n -s 115200 /dev/ttymxc4 texas
3000000 flow
user bluetooth
group bluetooth net_bt_admin
disabled
Here's what I get when I do a manual hciattach. (Note I removed the -n
option in this case)
# hciattach -s 115200 /dev/ttymxc4 texas 3000000 flow
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Serial
port is opened
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Port
settings is gotten
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Port
settings is set
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>:
Initial baud rate is set
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Break
is sent
Found a Texas Instruments' chip!
Firmware file : /system/lib/firmware/ti/TIInit_7.6.15.bts
Sending script to serial device
Loaded BTS script version 1
texas: changing baud rate to 3000000, flow control to 1
CCCCCCCCCCCCCCCCCCCCWRCSCCCCCWRCCWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRCCWRWRWRWRWRCCCCCWRWRWRWRWRWRWRWRWRCCCWRCCCCCCCCCCCCCCCWRCCWRCCCWRCCCCWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRWRCCCCCCWRCCWRCCWRCWRCCCCCCWRCCCC
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>:
u->init is loaded
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Actual
baud rate is set
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Line
discipline is set
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>: Ioctl
device is set
Added device hci0
Sending script to bluetooth socket
[ATH_INFO] (external/bluetooth/bluez/tools/hciattach.c) <init_uart>:
u->post is loaded
Device setup complete
# hciconfig
hci0: Type: BR/EDR Bus: UART
BD Address: 34:B1:F7:97:8E:CE ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING
RX bytes:352 acl:0 sco:0 events:10 errors:0
TX bytes:45 acl:0 sco:0 commands:10 errors:0
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
---
You received this message because you are subscribed to the Google Groups
"android-porting" 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.