i want to enable bt on board imx6q_sabresd with android 4.3 , ,and i follow this How to enable BT on board imx6q_sabresd RevC.to Configure my bsp code,but id didn't work ,the type of my bluetooth chip is "ivt_BlueSoleil_i480e".
now i can power on the rfkill,and set "sys/class/rftkill/rfkill0/state" to 1.but the can not enable BT, the logcat says "E/BluetoothAdapterState( 3195): Error enabling Bluetooth"
and in "/device/fsl/sabresd_6dq/BoardConfig.mk" i set "BOARD_USE_AR3K_BLUETOOTH := true",so in "/hardware/imx/libbt-ath3k" module.
the logcat is:
I/bt_upio ( 3195): open set_bluetooth_power success
I/bt_upio ( 3195): write bluetooth_power success
I/bt_vendor( 3195): AR3002 ::BT_VND_OP_USERIAL_OPEN
I/bt_hwcfg( 3195): hw_config
I/bt_hwcfg( 3195): init_uart
I/GKI_LINUX( 3195): gki_task_entry: gki_task_entry task_id=0 [BTU] starting
I/bt-btu ( 3195): btu_task pending for preload complete event
I/bt_hwcfg( 3195): ath3k_init
E/bt-btif ( 3195): ...preload_wait_timeout (retried:0/max-retry:0)...
D/BluetoothAdapterState( 3195): CURRENT_STATE=PENDING, MESSAGE = ENABLE_TIMEOUT, isTurningOn=true, isTurningOff=false
E/BluetoothAdapterState( 3195): Error enabling Bluetooth
is mean my bluetooth enable timeout?
sorry, i am a newer,please help me ,thanks.
Hi, gong Liu. I have met the same problem as yours. Could you give me some tips? Thank you!
Hi All,
Platform : IMX6SL
Bluedroid on Android kitkat 4.4.3.
Can you please help me I am struck at this point not able to move forward.
D/BluetoothAdapterState( 704): CURRENT_STATE=PENDING, MESSAGE = ENABLE_TIMEOUT, isTurningOn=true, isTurningOff=false
E/BluetoothAdapterState( 704): Error enabling Bluetooth
D/BluetoothAdapterProperties( 704): Setting state to 10
I/BluetoothAdapterState( 704): Bluetooth adapter state changed: 11-> 10
D/BluetoothAdapterService( 704): Broadcasting updateAdapterState() to 1 receivers.
what's wrong with this..... Not getting any idea. Please help me.....
Thanks and regards,
MutyalaRao.
Hi all,
I am glad to inform you that the above issue which I have posted earlier got resolved, but I have another 2 issues one while data transfer, the other while enabling via GUI.
1) After enabling bluetooth, while transferring file from third party mobile to IMX_6SL board, file is getting transferred(TX), but vice versa (RX) is not happening, it is giving the error message :
File not Received
File : sample.jpg
Reason : Storage issue
2) And presently I am inserting my driver via GUI, I am getting an error message while enabling bluetooth via GUI ie Operation not permitted while loading .ko (driver)Please suggest me what to do?? whether I need to install my driver at boot by adding in init.rc?? if I do it always on boot bt will be in ON State only?? OR Do i need to build my driver along with android source code???
Please suggest me how to proceed further???
Thanks and Regards,
Mutyala Rao.
Hi neelapala, I met the same problem as yours. Could you give me some tips? I have no idea how to solve it...
Best regards
Zhang Huan
Hi Tao Zheng,
When I am inserting my ko from the GUI, it is giving this error,
Can you please suggest me what to do???
Unable to unload driver module "/system/bin/release/bluetooth.ko": Operation not permitted
************* bluetooth.c insmod is called**********
Failed to load module: Unknown error -1 (-1)
I think it's purely permissions issue,
Here I have few questions,
1. Is the path which I am placing my kernel object file (ko) above /system/bin/release/ is correct ?? or it is /data/misc/bluetooth/ path???
2. If it is /data/misc/bluetooth/ then where should I mention permissions for that path.
Please respond me,
Thanks and Regards,
Mutyalarao.
Hi Haoran wang,
I am new to bluetooth porting on Android KK 4.4.3, May I know how to start and make my bluetooth up and running.
My platform is imx6sl (freescale sololite), I have my own bluetooth driver, I need to integrate driver to Android BSP when I enable/disable bluetooth button on GUI my driver should be loaded/unloaded, as bluedroid is replaced by bluez, do I need to change HAL level code or just integrate my bluetooth driver to GUI.
Hi, Neelapala
Hi Tao Zheng,
Thanks for the valuable information!!!!
1. If I enable bluetooth using GUI, then don't I need tools like hciconfig, hcitool for scanning or inquiring and all ???. will I be able to get scan results if I integrate my driver to GUI???
2. Can you please tell me, How to consult bluetooth silicon vendor??
Hi Tao Zheng,
I work for one of the Silicon vendors company. We develop Bluetooth products.
Generally, we tested our product using Bluez stack. Now we would like to test using Bluedriod.
I am facing trouble to find tools simliar to hciconfig/hcitool in Bluedriod. Please suggest me how can I evaluate using Bluedriod.
Also, I have other question.
In your previous reply, you mentioned that Freescale has only provided UART interface to bluetooth module. What do you mean by this?
Our bluetooth module supports only SDIO/USB interface. Since Frescale has USB ports, cant I connect my bluetooth module through the USB interface??
Your help is very much appreciated.
Hi, neelapala
Bluedroid doesn't support USB interface now, but some guys has implemented it on x86 platform by themselves. So, if you need to use USB interface, there are two ways:
In addition, if possible, you can contact your local FAE for technical support.
Thanks for your reply. I am curious to know what needs to be done in Bluedroid to support USB interface? Can you please point me towards this?
Hi,
I remember our AE engineer Tony Zheng who once enabled BlueZ on Android Kitkat for USB dongle.
Hi Tony,tonyzheng
Could you please help mutyalaraoneelapala for his USB dongle?
Thanks.
BRs,
Haoran
Hi Liu gong,
I think it is the issue on preload with bluedroid.
You may try this patch on your external/bluetooth/bluedroid . I think this patch will work.
=======================================================================
diff --git a/main/bte_main.c b/main/bte_main.c
index 3294d79..5693961 100644
--- a/main/bte_main.c
+++ b/main/bte_main.c
@@ -53,7 +53,7 @@
/* Stack preload process timeout period */
#ifndef PRELOAD_START_TIMEOUT_MS
-#define PRELOAD_START_TIMEOUT_MS 3000 // 3 seconds
+#define PRELOAD_START_TIMEOUT_MS 10000 // 3 seconds
#endif
/* Stack preload process maximum retry attempts */
=========================================================================
BRs,
Haoran
thanks, i try this patch on your external/bluetooth/bluedroid,but it didn't work.
Hi,
I may make the mistake. "ivt_BlueSoleil_i480e" is it the Atheros solution? Our Android BSP support atheros 3002 series BT only.
hi, at addtion , i want to known , in your bsp code"~/device/fsl/imx6/etc/ini.rc" the service "service dbus /system/bin/dbus-daemon --system --nofork" and "service bluetoothd /system/bin/bluetoothd -n" is need?
Hi Liu,
I think you have to get the SDK for your BT module from the vendor. As the libbt-vendor must be implement by the BT vendor.
for the init.rc service, yes, they should be keep.
Hi, wang
i have another question, when the sabresd board Start up succeed, the logcat show this:
.......
init: sys_prop: permission denied uid:1003 name:service.bootanim.exit
ehci_fsl_bus_suspend begins, Host 1
ehci_fsl_bus_suspend ends, Host 1
rfkill: BT RF going to : off
rfkill: BT RF going to : on
mx6q_sd_bt_reset
rfkill: BT RF going to : off
rfkill: BT RF going to : on
mx6q_sd_bt_reset
rfkill: BT RF going to : off
rfkill: BT RF going to : on
mx6q_sd_bt_reset
......
The "rfkill: BT RF going to : off" and "rfkill: BT RF going to : on" every show six times.
i did nothing ,just let "uart5_enabled = 1;". why the BT rfkill always reboot?
Hi Liu,
The BT service will try to restart the stack if it is not enabled successfully.
If you once enabled BT in settings panel the BT state will be store into the /data. Then you reboot board the BT service will be "enabling" state and will try to restart the stack if it is failed.
So that log is normal.
BRs,
Haoran