Community
cancel
Showing results for 
Search instead for 
Did you mean: 
PSuta
Beginner
4,968 Views

Bluetooth not working with Intel Edison image.

Jump to solution

I have downloaded "iot-devkit-prof-dev-image-edison-20160606.zip" file and ran "flashall.sh" and booted edison board with latest image.

 

But hcitool scan gives "Device is not available: No such device"

 

How can to make bluetooth working ?

0 Kudos
1 Solution
FerryT
Valued Contributor I
904 Views

You didn't read the link above right? Don't use bluetooth_attach. Use `systemctl start bluetooth`.

The bluetooth device is attached automatically because it is in an ACPI table. Other internal workings in kernel I don't know.

You can also use `connmanctl enable bluetooth` to unblock the bluetooth.

 

I never tried meta-toolchain. I run `make sdk`, see here: https://htot.github.io/meta-intel-edison/3-Building-the-SDK.html

(tested with sumo, not yet tested with thud)

 

View solution in original post

24 Replies
FerryT
Valued Contributor I
862 Views

A lot of water went under the bridge since these images were created. You might want to try an image based on Yocto Sumo and 4.18 kernel?

Here: https://github.com/edison-fw/meta-intel-edison

Instructions: https://edison-fw.github.io/meta-intel-edison/

 

Or if you are adventurous: Yocto Thud, 4.20 kernel: https://github.com/htot/meta-intel-edison

Instructions: https://htot.github.io/meta-intel-edison/

PSuta
Beginner
862 Views

I am using ubuntu 18

Linux prityaa 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

 

I am trying with Yocto Thud, but I am facing some issues in following link given above.

 

Log files is attached.

 

 

 

 

PSuta
Beginner
862 Views

posted a file with error.

PSuta
Beginner
862 Views

Log file with steps executed.

FerryT
Valued Contributor I
862 Views

@PSuta​ Yes I'm sorry I forgot to commit one commit (layer compatibility) in meta-acpi. If you run `make setup` once more it will pull meta-acpi and then it should work.

PSuta
Beginner
862 Views

 

I appreciate you for your quick and valuable response but I have some doubts.

 

1 . Error in edison-image

prityaa@prityaa:~/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64$

$ bitbake -k edison-image

Loading cache: 100% |##################################################################################################################| Time: 0:00:00

Loaded 1263 entries from dependency cache.

ERROR: Nothing PROVIDES 'edison-image'

NOTE: Resolving any missing task queue dependencies

 

Build Configuration:

BB_VERSION          = "1.40.0"

BUILD_SYS           = "x86_64-linux"

NATIVELSBSTRING     = "universal"

TARGET_SYS          = "i586-poky-linux"

MACHINE             = "qemux86"

DISTRO              = "poky"

DISTRO_VERSION      = "2.6.1"

TUNE_FEATURES       = "m32 i586"

TARGET_FPU          = ""

meta                

meta-poky           

meta-yocto-bsp      = "thud:1cab405d88149fd63322a867c6adb4a80ba68db3"

 

NOTE: Tasks Summary: Attempted 0 tasks of which 0 didn't need to be rerun and all succeeded.

 

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

 

2 . which branch should i consider for Bluetooth. (primary intentions are to work with Bluetooh)

prityaa@prityaa:~/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/meta-intel-edison$

$ git branch --all

* master

 remotes/origin/HEAD -> origin/master

 remotes/origin/dizzy-latest

 remotes/origin/dizzy-multimedia

 remotes/origin/dizzy-rt

 remotes/origin/dizzy-uptodate

 remotes/origin/master

 remotes/origin/morty

 remotes/origin/morty-64

 remotes/origin/original

 remotes/origin/pyro64

 remotes/origin/pyro64-acpi

 remotes/origin/rocko32

 remotes/origin/rocko64-acpi

 remotes/origin/sumo32

 remotes/origin/sumo64

 remotes/origin/sumo64-acpi

 remotes/origin/thud

 

3 . If I would like to compile customized Linux kernel

how can I do ?

FerryT
Valued Contributor I
862 Views
  1. Yes, something is wrong. You can see under Machine you have qemu86,not edison, and the active layers are meta, meta-poky, meta-yocto-bsp, none of meta-intel-edison. Something went wrong with make setup. Maybe it's best to do make clean, then make setup, then make image from your ~/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace directory.
  2. Don't use sumo64, I'm going to remove that one soon. I tested bluetooth on master/thud and on sumo32/sumo64-acpi. In your case I think it is best to use an acpi enabled version, so either master/thud/sumo64-acpi.
  3. You add a patch or a 'kernel fragment' to the recipe linux-yocto like here: https://github.com/edison-fw/meta-intel-edison/blob/sumo64-acpi/meta-intel-edison-bsp/recipes-kernel.... You can see I'm pulling an already customized kernel from andy-shev then adding some 'cfg' which are in the files directory and turn on/off certain kernel configuration flags. You can also add file names ending on .patch from the files directory.
PSuta
Beginner
862 Views

I have made changes in working project

1 . checked out new branch, bluetooth_study, from origin/thud

2 . changed edison.conf fille

prityaa@prityaa:~/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/meta-intel-edison$

$ git diff meta-intel-edison-bsp/conf/machine/edison.conf

diff --git a/meta-intel-edison-bsp/conf/machine/edison.conf b/meta-intel-edison-bsp/conf/machine/edison.conf

index 335ae49..60a40c8 100644

--- a/meta-intel-edison-bsp/conf/machine/edison.conf

+++ b/meta-intel-edison-bsp/conf/machine/edison.conf

@@ -7,6 +7,7 @@

 include conf/machine/include/tune-corei7.inc

 TUNE_CCARGS .= " -mstackrealign"

 #DEFAULTTUNE = "corei7-32"

+#DEFAULTTUNE = "corei2-64"

 

 MACHINE_FEATURES = "bluetooth alsa pci serial usbgadget usbhost wifi x86 ext3"

 KERNEL_IMAGETYPE = "bzImage"

@@ -29,4 +30,6 @@ KCONFIG_MODE="--alldefconfig"

 #KERNEL_MODULE_PROBECONF += "g_multi"

 

 ACPI_TABLES ?= "arduino.asl spidev.asl"

-ACPI_FEATURES ?= "uart_2w i2c"

+#ACPI_FEATURES ?= "uart_2w i2c"

+

+ACPI_FEATURES ?= "uart_2w i2c spi"

 

 

But I am facing and issue in building linux kernel.

and Log is

prityaa@prityaa:~/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build$

$ bitbake -k edison-image

Loading cache: 100% |##################################################################################################################| Time: 0:00:03

Loaded 3084 entries from dependency cache.

Parsing recipes: 100% |################################################################################################################| Time: 0:00:14

Parsing of 2130 .bb files complete (2129 cached, 1 parsed). 3085 targets, 289 skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

 

Build Configuration:

BB_VERSION          = "1.40.0"

BUILD_SYS           = "x86_64-linux"

NATIVELSBSTRING     = "universal"

TARGET_SYS          = "x86_64-poky-linux"

MACHINE             = "edison"

DISTRO              = "poky-edison"

DISTRO_VERSION      = "2.6.1"

TUNE_FEATURES       = "m64 corei7"

TARGET_FPU          = ""

meta                

meta-poky           

meta-yocto-bsp      = "thud:1cab405d88149fd63322a867c6adb4a80ba68db3"

meta-oe             

meta-python         

meta-networking     = "thud:6094ae18c8a35e5cc9998ac39869390d7f3bb1e2"

meta-intel          = "thud:15705474477b091a636f4b32a8760f3ac65b1a6e"

meta-intel-edison-bsp

meta-intel-edison-distro = "bluetooth_study:f9b3c0c6cb0de2d08b7cd6c1d596674b651b48d4"

meta-acpi           = "eds-4.20:91a31127c4059b70af9d09b79a821a18caba5b76"

 

Initialising tasks: 100% |#############################################################################################################| Time: 0:00:11

Sstate summary: Wanted 1061 Found 0 Missed 1061 Current 486 (0% match, 31% complete)

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: linux-yocto-4.20.0-r0 do_configure: Function failed: do_configure (log file is located at /home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/temp/log.do_configure.29133)

ERROR: Logfile of failure stored in: /home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/temp/log.do_configure.29133

Log data follows:

| DEBUG: Executing python function check_oldest_kernel

| DEBUG: Python function check_oldest_kernel finished

| DEBUG: Executing shell function do_configure

| NOTE: make HOSTCC=gcc -isystem/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/usr/include -O2 -pipe -L/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/usr/lib -L/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/lib -Wl,-rpath-link,/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/lib -Wl,-rpath,/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/usr/lib -Wl,-rpath,/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native/lib -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2 HOSTCPP=gcc -E -C /home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work-shared/edison/kernel-source CC=x86_64-poky-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0=/usr/src/debug/linux-yocto/4.20.0-r0 -fdebug-prefix-map=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work-shared/edison/kernel-source=/usr/src/kernel O=/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/linux-edison-standard-build oldnoconfig

| make: Entering directory '/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work-shared/edison/kernel-source'

| make[1]: Entering directory '/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/linux-edison-standard-build'

|  GEN    Makefile

| make[2]: *** No rule to make target 'oldnoconfig'. Stop.

| /home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work-shared/edison/kernel-source/Makefile:544: recipe for target 'oldnoconfig' failed

| make[1]: *** [oldnoconfig] Error 2

| make[1]: Leaving directory '/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/linux-edison-standard-build'

| Makefile:152: recipe for target 'sub-make' failed

| make: *** [sub-make] Error 2

| make: Leaving directory '/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work-shared/edison/kernel-source'

| WARNING: exit code 2 from a shell command.

| ERROR: Function failed: do_configure (log file is located at /home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/out/linux64/build/tmp/work/edison-poky-linux/linux-yocto/4.20.0-r0/temp/log.do_configure.29133)

ERROR: Task (/home/prityaa/documents/workspace/boards/intel/edison/tools/yocto/my_Edison_Workspace/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-yocto_4.20.0.bb:do_configure) failed with exit code '1'

 

Am I missing any configuration or setting for build system. ?

 

 

 

FerryT
Valued Contributor I
862 Views

No, it looks like you are missing this patch: https://github.com/htot/meta-intel-edison/commit/113e55597b20700a91697b9c63ff4f0241834b71

Or for some reason it didn't apply.

What it should do: when running setup it should apply a patch to ...meta/classes/kernel.bbclass and replace oldnoconfig by olddefconfig. You can do that manually of course.

 

That's why you are getting No rule to make target 'oldnoconfig'. Something changed in the kernel makefile and yocto is not yet up to date.

 

Maybe you need to reset --hard to https://github.com/htot/meta-intel-edison? Nope, you are on f9b3c0c6c which is correct. I am going to try a fresh rebuild tomorrow to see if I can reproduce this.

FerryT
Valued Contributor I
862 Views

I can reproduce. What happened is this: when switching to thud the mentioned patch did not apply, so I removed it, hoping it would not be needed anymore. But it was, so I applied the fix mentioned above manually. But forgot to add the patch again. Sorry for that, but thanks for reporting. I will fix that tomorrow. I have just force pushed a fix to master and thud.

PSuta
Beginner
862 Views

Thanks for all help.

 

I followed

1 . make edison-image

2 . make flash

3 . reboot

 

Now I am able to build images but detect BT hci controller.

 

I tried literally all steps to turn on hci controller, but still no luck to detect BT hci controller.

 

Log is attached.

 

Since I am beginner to BT, Kindly correct me if I went wrong.

 

Thanks.

FerryT
Valued Contributor I
862 Views

Follow the instructions here https://htot.github.io/meta-intel-edison/4.3-bluetooth.html, but skip the btattach step (that is only for non-acpi).

FerryT
Valued Contributor I
862 Views

Just to be clear, you don't need to add any driver to the kernel while building, everything you need is already there. Also, you don't need to modprobe any modules, it goes automatic.

You only need to start the bluetooth service, rfkill unblock and then use bluetoothctl to pair/connect.

PSuta
Beginner
862 Views

Thanks for this suggestion.

 

Still I have some doubts.

1 . If you see the log, "rfkill unblock 1", is not setting to "Soft blocked: no".

In my case, we need to correct rfkill unblock 1 to rfkill unblock 0, in above given link.

 

2 . I would like to create cross-tool, so I ran "bitbake meta-toolchain", but where to get these bins created ?

3 . as a programmatic , point of view, how did we turn on HCI controller by systemctl start bluetooth_attach ?

Could you take me through in brief

3.1 linux internal working in kernel and bluez ?

3.2 netlink against BT stack layer i.e. l2cap, HCI with this systemd bluetooth_attach ?

 

Once again thanks for your quick and valuable response and support.

PSuta
Beginner
862 Views

Tool chain log =>

FerryT
Valued Contributor I
905 Views

You didn't read the link above right? Don't use bluetooth_attach. Use `systemctl start bluetooth`.

The bluetooth device is attached automatically because it is in an ACPI table. Other internal workings in kernel I don't know.

You can also use `connmanctl enable bluetooth` to unblock the bluetooth.

 

I never tried meta-toolchain. I run `make sdk`, see here: https://htot.github.io/meta-intel-edison/3-Building-the-SDK.html

(tested with sumo, not yet tested with thud)

 

View solution in original post

PSuta
Beginner
862 Views

Yes, you are right, I did not read that link in deep.

1 .

Now I think of speed up my activities and trying to add customized kernel recipe. So modified linux_custom.bb in "meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux_custom". as

 

KBRANCH ?= "master"

 

require recipes-kernel/linux/linux-yocto.inc

 

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

 

SRC_URI = "file://home/prityaa/documents/workspace/code_base/linux/kernel/linux/.git/;branch=${KBRANCH};protocol=file \

       "

SRCREV ??= "f610818dfb680feb79ac57926ca2d8036b744de4"

 

COMPATIBLE_MACHINE = "edison"

 

do_kernel_configme[depends] += "bison-native:do_populate_sysroot flex-native:do_populate_sysroot"

 

# This one is necessary too - otherwise the compilation itself fails later.

DEPENDS += "openssl-native util-linux-native"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"

~                                                                   KBRANCH ?= "master"

 

require recipes-kernel/linux/linux-yocto.inc

 

LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

 

SRC_URI = "file://home/prityaa/documents/workspace/code_base/linux/kernel/linux/.git/;branch=${KBRANCH};protocol=file \

       "

SRCREV ??= "f610818dfb680feb79ac57926ca2d8036b744de4"

 

COMPATIBLE_MACHINE = "edison"

 

do_kernel_configme[depends] += "bison-native:do_populate_sysroot flex-native:do_populate_sysroot"

 

# This one is necessary too - otherwise the compilation itself fails later.

DEPENDS += "openssl-native util-linux-native"

DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"

 

But still some files(.conf) need to be modified. still it takes 4.20*.bb file as in log file make_kernel.txt

 

2 . Would it be accepted if I changed code directly in "build/tmp/work-shared/qemux86/kernel-source/"

 

3 . Else how can I configure my local Linux kernel source tree in my build environment ?

 

4 . how can I speed up my kernel build (each time it's unpacking, configing and building) ?

Can not I make recipe that will build my external kernel source using make (since make only builds files which are changed ) . and images (zImage) can be installed in rootfs/initramfs ?

 

FerryT
Valued Contributor I
862 Views

1 bitbake looks at version numbers and uses the latest when needing to choose. But 'custom' is not a number. Easiest is to edit the existing recipe.

2 that won't work

3 here https://github.com/edison-fw/meta-intel-edison/blob/sumo32/meta-intel-edison-distro/conf/distro/poky...

4 I don't know. On my machine compiling takes 3 minutes. Maybe 5 for image build to complete. Would be nice if it could be faster, but didn't investigate.

PSuta
Beginner
862 Views

Thanks, I will try this and keep you posted.

Andriy_S_Intel
Employee
578 Views

In some cases `ccache` can be used.

 

Reply