Bluetooth not working

Just got my board last week and finally getting around to setting it up today. I am unable to get bluetooth started.

This is the status of the bluetooth service after trying to start it:

linaro@linaro-alip:~$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit) since Sat 2015-07-11 00:36:19 UTC; 1h 57min ago
  Process: 12630 ExecStart=/usr/sbin/bluetoothd -n (code=exited, status=1/FAILURE)
 Main PID: 12630 (code=exited, status=1/FAILURE)

Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: Failed to init network plugin
Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: Unable to start SCO server socket
Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: Failed to init audio plugin
Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: Failed to init gatt_example plugin
Jul 11 00:36:19 linaro-alip systemd[1]: bluetooth.service failed.
Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: Can't open HCI socket: Address family not supported by protocol (97)
Jul 11 00:36:19 linaro-alip bluetoothd[12630]: bluetoothd[12630]: adapter_ops_setup failed
Jul 11 00:36:19 linaro-alip systemd[1]: start request repeated too quickly for bluetooth.service
Jul 11 00:36:19 linaro-alip systemd[1]: Failed to start Bluetooth service.
Jul 11 00:36:19 linaro-alip systemd[1]: bluetooth.service failed.

If I try hcitool I don’t see any devices:

linaro@linaro-alip:~$ sudo hcitool dev
Devices:

Do I need to build my own kernel with bluetooth support? Is that the problem? I find it hard to believe that the default setup provided for this board does not include the modules for the builtin hardware.

Anyone able to use Bluetooth on the 410c?

When I do lsmod this is all I see:

linaro@linaro-alip:~$ sudo lsmod
Module                  Size  Used by
wcn36xx                53603  0 
wcn36xx_platform       12341  0 
linaro@linaro-alip:~$ 

Here is the full syslog when I try to start bluetoothd:

Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Bluetooth daemon 4.101
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Bluetooth daemon 4.101
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Starting SDP server
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Starting SDP server
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: opening L2CAP socket: Address family not supported by protocol
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Server initialization failed
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: opening L2CAP socket: Address family not supported by protocol
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Server initialization failed
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: DIS cannot start: GATT is disabled
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init deviceinfo plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init proximity plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init time plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init alert plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init thermometer plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to open control socket: Address family not supported by protocol (97)
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Can't init bnep module
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init network plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Unable to start SCO server socket
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init audio plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: DIS cannot start: GATT is disabled
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init deviceinfo plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init proximity plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init time plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init alert plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init thermometer plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to open control socket: Address family not supported by protocol (97)
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Can't init bnep module
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init network plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Unable to start SCO server socket
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init audio plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Failed to init gatt_example plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: bluetoothd[1201]: Failed to init gatt_example plugin
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: Can't open HCI socket: Address family not supported by protocol (97)
Jul 14 15:51:57 linaro-alip bluetoothd[1201]: adapter_ops_setup failed

Also dmesg does not show anything for Bluetooth:

linaro@linaro-alip:~# dmesg | grep Blue
linaro@linaro-alip:~# 

Ok digging some more I see the src on the Linux image. Assuming that the .config in /usr/src/linux-headers-4.0.0-linaro-lt-qcom is the one that was used, it looks like Bluetooth was not included:

linaro@linaro-alip:/usr/src/linux-headers-4.0.0-linaro-lt-qcom$ grep BT_HCI drivers/bluetooth/Kconfig 
config BT_HCIBTUSB
config BT_HCIBTSDIO
config BT_HCIUART
config BT_HCIUART_H4
	depends on BT_HCIUART
config BT_HCIUART_BCSP
	depends on BT_HCIUART
config BT_HCIUART_ATH3K
	depends on BT_HCIUART
config BT_HCIUART_LL
	depends on BT_HCIUART
config BT_HCIUART_3WIRE
	depends on BT_HCIUART
config BT_HCIBCM203X
config BT_HCIBPA10X
config BT_HCIBFUSB
config BT_HCIDTL1
config BT_HCIBT3C
config BT_HCIBLUECARD
config BT_HCIBTUART
config BT_HCIVHCI
	depends on BT_HCIBTUSB
linaro@linaro-alip:/usr/src/linux-headers-4.0.0-linaro-lt-qcom$ grep BT_HCI .config 
linaro@linaro-alip:/usr/src/linux-headers-4.0.0-linaro-lt-qcom$ 

Anyone know if I install build-essential would I be able to build in this path on the 410c? Or should I set up a separate build environment to build the missing modules?

thanks

@create123 - you are correct. Bluetooth is supported in the 15.06 Android release but not on Ubuntu. It needs some init scripts that we haven’t merged in the release yet. I will update this as soon as it is supported.

if you cant wait for the release next month you could do the following:

  1. enable BT on the kernel configuration and reinstall the new kernel
  2. then run the hciattach/hciconfig commands from the shell.

Thanks for the responses.

Steve, any target dates for an updated Ubuntu release with BT support?

I am in the process of building a kernel with BT support and have some questions. Which tag/branch do you recommend starting with? The example in the wiki instructions [1] uses integration-linux-qcomlt, however I am wondering if I should just start from ubuntu-qcom-dragonboard410c-15.06.

[1] https://github.com/96boards/documentation/wiki/Dragonboard-410c-Boot-Image

I have configured, built and flashed a kernel based on:
git checkout -b kernel-15.06 ubuntu-qcom-dragonboard410c-15.06
Bluetooth is enabled but I’m not sure what tty to attach for the built in Bluetooth. Any ideas?

I have confirmed that Bluetooth works if I use a USB based BT device. I’m just not sure what I am missing to get the onboard BT working.

Could you try adding the following files (udev rule and service) to your filesystem and reboot? they should allow you to enable bluetooth using the ui.

  1. /etc/udev/rules.d/70-persistent-net-rules

This file was automatically generated by the /lib/udev/write_net_rules

program, run by the persistent-net-generator.rules rules file.

You can modify it, as long as you keep each rule on a single

line, and change only the value of the NAME= key.

Unknown net device (/devices/platform/wcn36xx/net/wlan0) (wcn36xx)

SUBSYSTEM==“net”, ACTION==“add”, DRIVERS=="?", ATTR{dev_id}==“0x0”, ATTR{type}==“1”, KERNEL=="wlan", NAME=“wlan0”, TAG+=“systemd”, RUN+="/bin/systemctl start wcnss-bt.service "

  1. /etc/systemd/system/wcnss-bt.service

[Unit]
Description=wcnss bluetooth

[Service]
ExecStart=/usr/sbin/hciattach /dev/smd3 qualcomm E0:CB:EF:9c:0b:ca
Type=forking
GuessMainPID=false
RemainAfterExit=yes

@ldts, I tried what you suggested but there is no /dev/smd3 so hciattach fails.

Should I build the kernel from a more recent tag/branch?

please enable the following config options:

CONFIG_SERIAL_MSM_SMD=y
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIBTUSB=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIUART_3WIRE=y

Thanks. I was missing CONFIG_SERIAL_MSM_SMD. I’ll give it a try tomorrow.

Unfortunately that did not do it. This is what I see if I try the hciattach manually.

linaro@linaro-alip:~$ sudo /usr/sbin/hciattach /dev/smd3 qualcomm E0:CB:EF:9c:0b:ca
Can't open serial port: No such device
Can't initialize device: No such device

dmesg has the following:


linaro@linaro-alip:~$ dmesg | grep smd
[    0.232780] msm_smd_init: unable to create SMD logging context
[    0.232789] msm_smd_init: unable to create SMSM logging context
[    0.242056] msm_smd_probe: enable_irq_wake() failed on 130
[    0.242094] smd_channel_probe_now: allocation table not initialized
[    0.244244] msm_smd_probe: enable_irq_wake() failed on 132
[    0.244259] smd_channel_probe_now: allocation table not initialized
[    0.245545] msm_smd_probe: enable_irq_wake() failed on 134
[  256.695404] [<ffffffc0003e387c>] smd_tty_port_activate+0x2f8/0x528
[  256.695426] [<ffffffc0003e2b14>] smd_tty_open+0x2c/0x38
[  256.695573] smd_channel_reset: allocation table not initialized
[  274.184119] [<ffffffc0003e387c>] smd_tty_port_activate+0x2f8/0x528
[  274.184141] [<ffffffc0003e2b14>] smd_tty_open+0x2c/0x38
[  274.184277] smd_channel_reset: allocation table not initialized

This is what dmesg showed when I ran the hciattach manually:


[  274.061736] subsys-pil-tz a21b000.qcom,pronto: wcnss: loading from 0x000000008b600000 to 0x000000008bbe0000
[  274.118567] subsys-pil-tz a21b000.qcom,pronto: wcnss: Brought out of reset
[  274.183933] ------------[ cut here ]------------
[  274.183958] WARNING: CPU: 0 PID: 1152 at ../kernel/irq/manage.c:540 irq_set_irq_wake+0xd4/0x100()
[  274.183966] Unbalanced IRQ 149 wake disable
[  274.183973] Modules linked in:
[  274.183989] CPU: 0 PID: 1152 Comm: hciattach Tainted: G        W       4.0.0 #1
[  274.183997] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
[  274.184005] Call trace:
[  274.184026] [<ffffffc000089be8>] dump_backtrace+0x0/0x12c
[  274.184038] [<ffffffc000089d24>] show_stack+0x10/0x1c
[  274.184051] [<ffffffc00079a668>] dump_stack+0x88/0xd8
[  274.184063] [<ffffffc0000b388c>] warn_slowpath_common+0x94/0xcc
[  274.184074] [<ffffffc0000b3910>] warn_slowpath_fmt+0x4c/0x58
[  274.184084] [<ffffffc0000faad0>] irq_set_irq_wake+0xd0/0x100
[  274.184096] [<ffffffc0003a5818>] disable_all_irqs.isra.13+0x3c/0x88
[  274.184106] [<ffffffc0003a6628>] subsystem_put+0xe4/0x144
[  274.184119] [<ffffffc0003e387c>] smd_tty_port_activate+0x2f8/0x528
[  274.184130] [<ffffffc0003c1e0c>] tty_port_open+0x84/0xd8
[  274.184141] [<ffffffc0003e2b14>] smd_tty_open+0x2c/0x38
[  274.184153] [<ffffffc0003ba484>] tty_open+0xd4/0x5a0
[  274.184165] [<ffffffc0001ab758>] chrdev_open+0x9c/0x1b0
[  274.184178] [<ffffffc0001a492c>] do_dentry_open+0x1e4/0x2fc
[  274.184189] [<ffffffc0001a4e50>] vfs_open+0x3c/0x48
[  274.184201] [<ffffffc0001b2ea0>] do_last.isra.42+0x108/0xbbc
[  274.184212] [<ffffffc0001b54f0>] path_openat+0x84/0x5ec
[  274.184223] [<ffffffc0001b6a80>] do_filp_open+0x2c/0x88
[  274.184234] [<ffffffc0001a5f68>] do_sys_open+0x13c/0x21c
[  274.184244] [<ffffffc0001a607c>] SyS_openat+0xc/0x18
[  274.184252] ---[ end trace 4cbd23151a88a12f ]---
[  274.184277] smd_channel_reset: allocation table not initialized
[  274.185249] Ramdump(ramdump_smem): No consumers. Aborting..
[  274.191148] restart_notifier_cb: unable to dump smem -32

I guess I should wait for the official release.

Any thoughts on how far off that may be?

BT support is expected in the July release for DB410c, which if everything goes fine will be available by the end of this week. This release will be using the Linux kernel 4.0 , like the 15.06 release. The integration-linux-qcomlt branch has been migrated to 4.2 already, and is what we will be using in future releases (Aug or Sep), I don’t recommend you use that branch, unless you know what you are doing…

Thanks for the update. I’ll hang on then.

Whats the best way to get notified of new releases? I.e is there a thread in this forum I can subscribe to?

@create123, it’s a good suggestion to create a ‘new release’ thread. i will check how to make one… you can expect 15.07 release either by the end of this week, or early next week.

BTW I had another look and realized my problem was I did not copy the modules over to the rootfs. After I did that and reboot I get the following error:


linaro@linaro-alip:~$ sudo /usr/sbin/hciattach /dev/smd3 qualcomm E0:CB:EF:9c:0b:ca
Qualcomm module LMP version : 0x07
Qualcomm module LMP sub-version : 0x07d3
Opening firmware file: /etc/firmware/5.01.0_2003.bin
Could not open firmware file /etc/firmware/5.01.0_2003.bin: No such file or directory (2).
Device setup complete
linaro@linaro-alip:~$ 

However it appears to be working:


linaro@linaro-alip:~$ hcitool dev
Devices:
	hci0	00:00:00:00:5A:AD
linaro@linaro-alip:~$ hciconfig -a
hci0:	Type: BR/EDR  Bus: UART
	BD Address: 00:00:00:00:5A:AD  ACL MTU: 1024:7  SCO MTU: 50:8
	UP RUNNING PSCAN 
	RX bytes:13789 acl:0 sco:0 events:325 errors:0
	TX bytes:1077 acl:0 sco:0 commands:48 errors:0
	Features: 0xff 0xfe 0x8f 0xfe 0xd8 0x3f 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF 
	Link mode: SLAVE ACCEPT 
	Name: 'linaro-alip-0'
	Class: 0x600100
	Service Classes: Audio, Telephony
	Device Class: Computer, Uncategorized
	HCI Version:  (0x7)  Revision: 0x0
	LMP Version:  (0x7)  Subversion: 0x7d3
	Manufacturer: Qualcomm (29)
linaro@linaro-alip:~$ 

thanks for the help

Hello all,
I’m experiencing strange behaviour of bluetooth
file transfer getting failed from my phone to dragonboard but its getting success from dragonboard to myphone. where getting wrong?

Regards,
Laxman

hello @steve-taylor

is it supported in debian linux o.s ? as when i installed debian on dragonboard 410c it is not showing any icon please help how to find it and access.

Thanks in advance!!!

Sorry @ren_snappy but I’m really confused. In the last three hours you’ve posted that:

  • your board doesn’t boot
  • you cannot get the display working
  • when you boot debian you cannot find any bluetooth icon on the
    display
  • that you are running android and cannot get adb to work
  • that you are have trouble following the board recovery instructions
  • that you can’t get audio to work in yocto/openembedded
  • that you can’t get GPS to work in debian
  • that you have hooked up a DHT11 but don’t know how to talk to it

I’m afraid this is simply too much for me to comprehend and your observations are spread across lots of fairly old forum topics which makes it difficult to connect the dots.

Please do not post any further on this topic unless the people you tagged above choose to engage in the conversation with you. In fact I think it is best that, for the next few days, you simply avoid replying to any existing topics.

Instead please start a new topic carefully describing the symptoms your observe and we will try to help.