On Sunday 27 Apr 2014 08:27:31 William Kenworthy wrote: > On 04/27/14 11:14, William Kenworthy wrote: > > On 04/27/14 02:33, Mick wrote: > >> On Thursday 24 Apr 2014 02:11:57 William Kenworthy wrote: > >>> I was able to get it working manually - gentoo's init scripts are out > >>> of date with bluez 5, blutoothctl is broken (or probably just poorly > >>> documented which equates to the same thing if the command doesn't > >>> work) . > >>> > >>> In bluetoothctl: > >>> power on > >>> scan on > >>> agent on > >>> default-agent > >>> pair <dev_id> > >>> trust <dev_id> > >>> exit > >>> > >>> In a shell: > >>> rfcomm bind rfcomm0 <dev_id> > >>> > >>> do serial port stuff with /dev/rfcomm0 > >>> > >>> rfcomm unbind rfcomm0 > >>> > >>> bluetoothctl connect command does not work - connects and immediately > >>> disconnects with an error > >>> gentoo's rfcomm initscript has removed the -f flag which bluez 5 does > >>> not have, but it also looks like the bind all in the 5.17 ebuild is > >>> also not supported by late bluez5 so it immediately exits and no > >>> rfcomm device is created. > >>> > >>> Ive adapted my python script to the changes now - but the pairing does > >>> not survive restarting bluetooth so I'll need an expect script to set > >>> it up each bluetooth re-init as it looks like there are no scripting > >>> hooks in bluetoothctl. > >>> > >>> BillK > >> > >> Thanks BillK, your suggestions above helped somewhat, because I was able > >> to connect with my phone, but it didn't get me far enough. I was not > >> able to connect with rfcomm to my mobile. When I ran 'pon > >> <connection_name>' pppd started, but I got errors like: > >> > >> Apr 26 18:15:12 dell_xps chat[29579]: -- write failed: Transport > >> endpoint is not connected > >> Apr 26 18:15:12 dell_xps chat[29579]: Failed > >> > >> > >> This was despite the fact that I had created manually the rfcomm0 device > >> and binded it to the bdaddr of my phone as you suggested. > >> > >> Googling for this error revealed that this is because the rfcomm code > >> has > >> > >> changed - but there is a patch which may fix things: > >> http://comments.gmane.org/gmane.linux.bluez.kernel/42303 > >> > >> I ran out of time and did not try 'rfcomm connect' instead of 'rfcomm > >> bind' to see if it makes a difference in my case. > >> > >> FYI, I'm on net-wireless/bluez-5.15 and kernel 3.12.13-gentoo. > > > > I just upgraded to 3.12.13 and it stopped working with the same error > > you have. > > > > I did see some other messages saying that certain kernel versions are > > broken but I'll now need to look into that now. > > > > BillK > > I used the patch from the reply above - worked! > > It did take a couple of goes but after restarting the bluetooth > initscript before using bluetoothctl via expect (took 3 goes before I > got a clean run from "expect" - timing might need adjusting?)
This is getting worse! O_O
I am on net-wireless/bluez-5.18 and gentoo-sources-3.12.20 without the patch.
Now I have no rfcomm service at all listed under rc-update and if I try to
start /etc/init.d/bluetooth I get:
# /etc/init.d/bluetooth restart
* ERROR: bluetooth needs service(s) rfcomm
Creating /dev/rfcomm0 with:
# rfcomm bind rfcomm0 hci0
does not change the error. Starting KDE's BlueDevil shows no adaptor found.
Indeed, hci0 is not configured. O_o
So, running:
# hciconfig hci0 up
allows me to list it:
$ hcitool dev
Devices:
hci0 90:4C:E5:FA:F2:A8
but NOT under bluetoothctl!
[bluetooth]# power on
No default controller available
[bluetooth]# show
No default controller available
[bluetooth]# list
[bluetooth]#
[bluetooth]# devices
[bluetooth]#
NOTE: using hcitool I can scan my mobile phone, but without rfcomm I can't use
it.
Hmm ... am I alone in this quest?
--
Regards,
Mick
signature.asc
Description: This is a digitally signed message part.

