the problem is not really the bluez version, I think (you can simply install from aptitude) but rather the hci0 device doesn't even exist.
(and I was at a complete loss what serial/tty device to try to hciattach. and then only afterwards noticed that /lib/firmware/bcm43341.conf tells you exactly how the hci node is getting registered)
the only thing that seems to be truly necessary (assuming you install bluez etc. with apt) is the bluetooth_rfkill_event binary, which all it does is call brcm_patchram_plus binary, with all the correct parameters. e.g. for me, bluetooth_rfkill_event kicked off:
brcm_patchram_plus --use_baudrate_for_download --no2bytes --enable_fork --enable_lpm --enable_hci --baudrate 3000000 --patchram /etc/firmware/bcm43341.hcd --bd_addr xx:xx:xx:xx:xx:xx /dev/ttyMFD0
(there we go, MFD0 is the UART I was looking for...)
you could get brcm_patchram_plus from source:
sudo aptitude install libbluetooth-dev
(no install rule in the makefile, so you'd have to copy it to /usr/sbin yourself)
or, if you want the bluetooth_rfkill_event binary anyway, get them both from the latest yocto image e.g.:
sudo mount -o loop edison-image-edison.ext4 ./foo
then you can get
./foo/etc/bluetooth (if you installed bluetooth/bluez/etc. from aptitude, I'm not sure if you need this. or maybe some of the rules are necessary for LE stuff? I didn't really look through it)
anyway, at least now I have a /dev/hci0 to mess with.
also, I'm not sure why nominal rfkill event management isn't happening by default in ubilinux...
certainly things will already work by using the files from yocto image, but I think I might check out something like urfkill ? which is already in debian repos. if that works to manage rf events, then the only thing still needed is the patchram utility, which is not in the repo, but as mentioned above the source is available. this prevents having to pull files from yocto images, or individuals trying to help by redistributing binaries from the images (which Intel probably doesn't prefer)
one last note - again, the bluetooth_rfkill_event binary probably isn't needed. I was able to run directly:
sudo ./brcm_patchram_plus --use_baudrate_for_download --no2bytes --enable_lpm --enable_hci --baudrate 3000000 --patchram /lib/firmware/bcm43341.hcd /dev/ttyMFD0 &
(removed --enable_fork ... apparently not supported in the version from that google git repo? also, I left out the --bd_addr, and it seemed to figure out the MAC on its own anyway. anyway, this is definitely something that could be hooked into urfkill or even simply udev)
sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
(only necessary under certain conditions to make sure hci0 shows up. but doesn't hurt.)
stupid question: is the firmware-patch-blob-thing volatile? or if it's not required at every runtime, could use hciattach instead...
thanks for help.
I try it
I just managed to get some free time to play with my Edison (I was out of town for a while).
Bluetooth on my Ubilinux Edison is working like a charm. What you see below is a RFCOMM socket communication between the Edison and my Linux computer (Bluetooth on a 2$ usb dongle)
The Linux computer is acting as a server and the Edison as the client.
I took the demo code from there (warning, extremely simple) : Communicating with RFCOMM
To get the bluetooth Python module :
apt-get install python-bluez
I got my HC-05 module to work with the Edison.
For those who don't know what this module is : it's a Bluetooth to serial transceiver module that you can buy for 5$ on ebay. With a Windows or Linux host, you can add the module as a new "virtual serial port" and then open it with any good serial port library or serial terminal program. On the module, you have a RX and TX pins that you can connect to your mcu/device.
I followed the instructions on this site to get the module to work : Bluetooth Serial Communication with HC-05 | MyRaspberryAndMe
At the end of the tutorial, what you get is a new /dev/rfcomm0 device that you can open like any TTY device. It takes no more than 5-10 minutes to setup.
What were your steps to get this working? DId you have to install the files from the Yocto build?
To get bluetooth working or to get the HC-05 working?
All the steps are there : Re: ubilinux (Debian) now available from Emutex Labs
You will need the files that deium uploaded at the beginning of the thread
I'll be glad to help you if you run in any troubles
I was just trying to get bluetooth working, but I missed that detailed post, thanks for pointing it out! I'll give that a shot.
I follow the tuto of Daniele_Cleri in Re: ubilinux (Debian) now available from Emutex Labs
but when execute the cmd ´./configure –disable-systemd´
root@ubilinux:~/bluez-5.24# ./configure –disable-systemd configure: WARNING: you should use --build, --host, --target configure: WARNING: invalid host type: –disable-systemd checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... configure: error: newly created file is older than distributed files! Check your system clock
and if execute the next step :
root@ubilinux:~/bluez-5.24# make -j 2 make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.
However i dl the file requested_yocto_bluetooth_files.zip
Just checking, but you should confirm that you are using two dashes when specifying the parameter: --disable-systemd