how to enable bluetooth on android 6.0 (marshmallow)

Post Reply
clixu01
Posts: 2
Joined: Sat Apr 09, 2016 5:19 pm
languages_spoken: english
ODROIDs: odroix2/odroidu3/odroidx/odroidq2/odroidq
Has thanked: 0
Been thanked: 0
Contact:

how to enable bluetooth on android 6.0 (marshmallow)

Unread post by clixu01 » Sat Apr 09, 2016 6:22 pm

Hi There,

I need to enable bluetooth on android aosp 6.0 (marshmallow), my bluetooth device is http://www.hardkernel.com/main/products ... 1656580698

Any one know how to get this? It seems that there is no branches for android_marshmallow in https://github.com/hardkernel/android

Thanks for your help in advance.

User avatar
odroid
Site Admin
Posts: 31835
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 252 times
Contact:

Re: how to enable bluetooth on android 6.0 (marshmallow)

Unread post by odroid » Sun Apr 10, 2016 1:40 pm

How did you run the Android 6.0 on the C1+?

clixu01
Posts: 2
Joined: Sat Apr 09, 2016 5:19 pm
languages_spoken: english
ODROIDs: odroix2/odroidu3/odroidx/odroidq2/odroidq
Has thanked: 0
Been thanked: 0
Contact:

Re: how to enable bluetooth on android 6.0 (marshmallow)

Unread post by clixu01 » Sun Apr 10, 2016 2:39 pm

I'm trying to bring android wear 6.0 on odroidx2 now, android wear 6.0 is similar to android aosp 6.0, but it need bluetooth to complete some pair behaviour.

>>> How did you run the Android 6.0 on the C1+?
I brought up android 6.0 on odroidx2 with the device folder using from android 4.4, it can bring up android with the basic functionalities.

To enable odroidx2, I did following changes to the device folder:

Code: Select all

BoardConfig.mk:37:# Bluetooth
BoardConfig.mk:39:BOARD_HAVE_BLUETOOTH := true
BoardConfig.mk:40:BLUETOOTH_HCI_USE_USB := true
BoardConfig.mk:41:BOARD_HAVE_BLUETOOTH_BCM := true
BoardConfig.mk:42:BOARD_BLUETOOTH_DOES_NOT_USE_RFKILL := true
BoardConfig.mk:43:include device/hardkernel/odroidx2/bluetooth.mk      // bluetooth.mk was copied from device/hardkernel/odroidc2 (https://github.com/hardkernel/android/tree/s905_5.1.1_master)

conf/ueventd.odroidx2.rc:55:/dev/ttyHS2               0666   bluetooth  bluetooth
conf/ueventd.odroidx2.rc:56:/sys/devices/platform/bt-dev/rfkill/rfkill0   state   0660    bluetooth   bluetooth
conf/ueventd.odroidx2.rc:57:/sys/devices/platform/bt-dev/rfkill/rfkill0   type    0660    bluetooth   bluetooth
conf/ueventd.odroidx2.rc:58:/sys/devices/bt-dev.*/rfkill/rfkill0   state   0660    bluetooth   bluetooth
conf/ueventd.odroidx2.rc:59:/sys/devices/bt-dev.*/rfkill/rfkill0   type    0660    bluetooth   bluetooth
conf/ueventd.odroidx2.rc:61:# for bluetooth nodes
conf/ueventd.odroidx2.rc:62:/dev/uhid                 0660    bluetooth bluetooth
conf/ueventd.odroidx2.rc:64:# bluetooth device
conf/ueventd.odroidx2.rc:65:/dev/bus/usb/001/*      0660    bluetooth bluetooth

device.mk:126:    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
I have also copied bluetooth/bdroid_buildcfg.h from device/hardkernel/odroidc2

After I flashed the images, I encountered following errors:

Code: Select all

04-09 10:23:19.168  4488  4521 E bt_osi_config: config_new unable to open file '/data/misc/bluedroid/bt_config.conf': No such file or directory
04-09 10:23:19.168  4488  4521 W bt_btif_config: init unable to load config file: /data/misc/bluedroid/bt_config.conf; using backup.
04-09 10:23:19.168  4488  4521 E bt_osi_config: config_new unable to open file '/data/misc/bluedroid/bt_config.bak': No such file or directory
04-09 10:23:19.168  4488  4521 E bt_btif_config: init unable to load backup; creating empty config.
04-09 10:23:19.169  4488  4521 E bt_osi_alarm: timer_create_internal unable to create timer with clock 9: Invalid argument
04-09 10:23:19.169  4488  4521 E bt_btif_config: init unable to create alarm.
04-09 10:23:19.169  4488  4521 E bt_core_module: module_init failed to initialize "btif_config_module"
04-09 10:23:19.169  4488  4521 I bt_bte_conf: bte_load_ble_conf attempt to load ble stack conf from /etc/bluetooth/ble_stack.conf
04-09 10:23:19.176  4488  4521 E bt_osi_config: config_new unable to open file '/etc/bluetooth/ble_stack.conf': No such file or directory
04-09 10:23:19.176  4488  4521 I bt_bte_conf: bte_load_ble_conf file >/etc/bluetooth/ble_stack.conf< not found
04-09 10:23:19.176  4488  4521 I bt_stack_config: init attempt to load stack conf from /etc/bluetooth/bt_stack.conf
--------- beginning of crash
04-09 10:23:19.182  4488  4521 F libc    : system/bt/main/../btif/src/btif_config.c:217: btif_config_get_str: assertion "config != NULL" failed
04-09 10:23:19.182  4488  4521 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 4521 (stack_manager)
04-09 10:23:19.283  1437  1437 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-09 10:23:19.283  1437  1437 F DEBUG   : Build fingerprint: 'Android/odroidx2/odroidx2:6.0.1/MEC23Z/yue03281048:userdebug/test-keys'
04-09 10:23:19.283  1437  1437 F DEBUG   : Revision: '0'
04-09 10:23:19.283  1437  1437 F DEBUG   : ABI: 'arm'
04-09 10:23:19.283  1437  1437 F DEBUG   : pid: 4488, tid: 4521, name: stack_manager  >>> com.android.bluetooth <<<
It seems that I didn't create the necessary configuration files(e.g. /etc/bluetooth/ble_stack.conf & /data/misc/bluedroid/bt_config.conf')

The "Bluetooth Hw module" has been moved to ${AOSP}/system/bt from android 6.0, I did't see how these configuration files are created.

BTW, does I really need BLE? I just need very basic bluetooth functionalities.
my bluetooth/bdroid_buildcfg.h:

Code: Select all

#define BTM_DEF_LOCAL_NAME "Odroid-X2"
// At present either USB or UART is supported
#define BLUETOOTH_HCI_USE_USB          TRUE
// Bluetooth Low Power Mode is supported on BT4.0
#define HCILP_INCLUDED                 FALSE

// 10.2 Updates
#define BLE_INCLUDED TRUE
#define BTA_GATT_INCLUDED TRUE
#define SMP_INCLUDED TRUE
#define PAN_NAP_DISABLED TRUE

User avatar
odroid
Site Admin
Posts: 31835
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 89 times
Been thanked: 252 times
Contact:

Re: how to enable bluetooth on android 6.0 (marshmallow)

Unread post by odroid » Sun Apr 10, 2016 4:19 pm

I have no idea.
Voodik's CM Android 6.0 port also doesn't support the USB Bluetooth.
http://forum.odroid.com/viewtopic.php?f=94&t=17712

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest