Bug 6960 - Kernel Config for NUC machine is incomplete in regard to Bluetooth support
Summary: Kernel Config for NUC machine is incomplete in regard to Bluetooth support
Status: RESOLVED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-intel (show other bugs)
Version: unspecified
Hardware: NUC Multiple
: Medium normal
Target Milestone: 1.9 M1
Assignee: Cristian Iorga
QA Contact: Cristina Agurida
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-11-13 10:00 UTC by Cristian Iorga
Modified: 2015-08-28 11:37 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Full non-exhaustive test log (50.24 KB, text/plain)
2015-04-20 10:38 UTC, Cristian Iorga
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cristian Iorga 2014-11-13 10:00:12 UTC
Any NUC machine has Bluetooth support in hardware.
The kernel configuration for NUC machine has only CONFIG_BT active, which is not enough for general purpose BT support.

I propose a more appropriate BT configuration by adding:

CONFIG_BT_6LOWPAN=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_CMTP=m
CONFIG_BT_HIDP=m
CONFIG_BT_HCIBTUSB=m

The last config option is related to the inclusion in the kernel modules of generic USB BT adapters support, and it will activate NUC's BT hardware.
The right Intel BT firmware needs to be included, of course, but that's a separate issue.

Tested:

root@nuc:~# hciconfig 
hci0:	Type: BR/EDR  Bus: USB
	BD Address: AC:7B:A1:93:C4:3D  ACL MTU: 0:0  SCO MTU: 0:0
	DOWN 
	RX bytes:33 acl:0 sco:0 events:3 errors:0
	TX bytes:9 acl:0 sco:0 commands:3 errors:0


root@nuc:~# hciconfig hci0 up
root@nuc:~# hciconfig 
hci0:	Type: BR/EDR  Bus: USB
	BD Address: AC:7B:A1:93:C4:3D  ACL MTU: 1021:5  SCO MTU: 96:5
	UP RUNNING 
	RX bytes:630 acl:0 sco:0 events:35 errors:0
	TX bytes:376 acl:0 sco:0 commands:35 errors:0

root@nuc:~# hcitool scan 
Scanning ...
root@nuc:~# hcitool scan
Scanning ...
	38:0A:94:B1:22:06	Meek
root@nuc:~# hcitool scan
Scanning ...
	38:0A:94:B1:22:06	Meek

root@nuc:~# hcitool con   
Connections:
root@nuc:~# hcitool dev
Devices:
	hci0	AC:7B:A1:93:C4:3D

root@nuc:~# hcitool info 38:0A:94:B1:22:06
Requesting information ...
	BD Address:  38:0A:94:B1:22:06
	Device Name: Meek
	LMP Version: 4.0 (0x6) LMP Subversion: 0x4103
	Manufacturer: Broadcom Corporation (15)
	Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
		<3-slot packets> <5-slot packets> <encryption> <slot offset> 
		<timing accuracy> <role switch> <sniff mode> <RSSI> 
		<channel quality> <SCO link> <HV2 packets> <HV3 packets> 
		<u-law log> <A-law log> <CVSD> <paging scheme> <power control> 
		<transparent SCO> <broadcast encrypt> <EDR ACL 2 Mbps> 
		<EDR ACL 3 Mbps> <enhanced iscan> <interlaced iscan> 
		<interlaced pscan> <inquiry with RSSI> <extended SCO> 
		<EV4 packets> <EV5 packets> <AFH cap. slave> 
		<AFH class. slave> <LE support> <3-slot EDR ACL> 
		<5-slot EDR ACL> <sniff subrating> <pause encryption> 
		<AFH cap. master> <AFH class. master> <EDR eSCO 2 Mbps> 
		<EDR eSCO 3 Mbps> <3-slot EDR eSCO> <extended inquiry> 
		<LE and BR/EDR> <simple pairing> <encapsulated PDU> 
		<err. data report> <non-flush flag> <LSTO> <inquiry TX power> 
		<EPC> <extended features>
Comment 1 Darren Hart 2014-11-13 17:29:51 UTC
Any sort of generic protocol/etc type support is appropriate for:

meta/cfg/kernel-cache/features/bluetooth/bluetooth.cfg

I would suggest breaking these up into BT Subsystem and BT Drivers. For example:

bluetooth.cfg
CONFIG_NET
CONFIG_BT
CONFIG_BT_RFCOMM*
CONFIG_BT_BNEP*
CONFIG_BT_CMTP
CONFIG_BT_HIDP

The drivers however should be separate, especially if they pull in entire subsystems like USB.

We have other hierarchical driver configs like this, Nitin did the media abstraction for this reason.

You don't want bluetooth to force the inclusion of USB, for example. So those should be separated out, perhaps:

bluetooth-drivers-all
  bluetooth-usb
  bluetooth-sdio
  bluetooth-uart

the top one can also include all the specific drivers, but people can select:

bluetooth-usb

and get everything they need for the NUC, as it would depend on bluetooth, but not pull in SDIO nor UART - for example. Using the scc files for the dependency chain.
Comment 2 Cristian Iorga 2015-04-03 14:26:16 UTC
Investigation started.
Comment 3 Cristian Iorga 2015-04-03 14:27:58 UTC
Design started, based on Darren Hart notes.
Comment 4 Cristian Iorga 2015-04-08 11:00:45 UTC
Partial implementation sent in for review.
Comment 5 Cristian Iorga 2015-04-14 12:24:55 UTC
Partial implementation via commit:
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.19/commit/?h=meta&id=be02def40293bdfbaa9f230e0adba715ec906516 for linux-yocto-3.19
Comment 6 Cristian Iorga 2015-04-14 12:28:00 UTC
Partial implementation via commit:
http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.14/commit/?h=meta&id=8c705b03452f8db4f251c6cef067cc94d5c19f9f for linux-yocto-3.14
Comment 7 Cristian Iorga 2015-04-20 10:36:02 UTC
Final patchset submitted for review.
Comment 8 Cristian Iorga 2015-04-20 10:37:12 UTC
Testing:
Relevant info:

[    1.827694] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated
root@intel-corei7-64:~# hciconfig hci0 up
Can't init device hci0: Operation not possible due to RF-kill (132)
root@intel-corei7-64:~# rfkill unblock bluetooth
root@intel-corei7-64:~# hciconfig hci0 up
root@intel-corei7-64:~# hcitool dev 
Devices:
	hci0	AC:7B:A1:93:C4:3D
root@intel-corei7-64:~# hcitool scan
Scanning ...
	00:27:13:9B:B9:E0	***URIDX-**BL (obfuscated)
	7C:7A:91:85:8F:03	***NFIR-**BL1 (obfuscated)
root@intel-corei7-64:~# uname -a
Linux intel-corei7-64 3.19.2-yocto-standard #1 SMP PREEMPT Mon Apr 20 10:54:41 EEST 2015 x86_64 GNU/Linux
root@intel-corei7-64:~#
Comment 9 Cristian Iorga 2015-04-20 10:38:35 UTC
Created attachment 2483 [details]
Full non-exhaustive test log
Comment 11 Cristian Iorga 2015-04-27 15:08:48 UTC
Fixed for intel-core* machines with commit:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=34ddfb6559c5fb0c7e194cbe9440c619efcc6907