You are not logged in.
Pages: 1
Hello,
I have some weird problems with bluetooth on my laptop.
First of all, after porting Blueman to bluez 5, it stopped recognizing my BT controller. So I have to use console to connect to my BT keyboard.
First problem:
1) I have paired my keyboard with laptop. Now, every time I turn on laptop, I have to:
bluetoothctl
even rfkill bluetooth shows that BT is unblocked, I have to:
power on
otherwise I get:
Failed to connect: org.bluez.Error.NotReady
then I have to manually connect to MAC address of keyboard:
connect 20:73:AB:55:63:F8
then I get
connect 20:73:AB:55:63:F8
Attempting to connect to 20:73:AB:55:63:F8
Connection successful
[CHG] Device 20:73:AB:55:63:F8 Connected: yes
[CHG] Device 20:73:AB:55:63:F8 Modalias: bluetooth:v04E8p7021d011B
[CHG] Device 20:73:AB:55:63:F8 Modalias: bluetooth:v04E8p7021d011B
but keyboard still doesn't work, I have to disconnect it first:
[bluetooth]# disconnect 20:73:AB:55:63:F8
Attempting to disconnect from 20:73:AB:55:63:F8
Successful disconnected
[CHG] Device 20:73:AB:55:63:F8 Connected: no
and then connect it again:
connect 20:73:AB:55:63:F8
Attempting to connect to 20:73:AB:55:63:F8
Connection successful
[CHG] Device 20:73:AB:55:63:F8 Connected: yes
[CHG] Device 20:73:AB:55:63:F8 Modalias: bluetooth:v04E8p7021d011B
[CHG] Device 20:73:AB:55:63:F8 Modalias: bluetooth:v04E8p7021d011B
and finally it works... Why the hell?
2) When I don't use keyboard for a longer period (about 10 minutes), for example when I scroll over some long page using mouse, keyboard gets disconnected and bluetoothd get into "I take 100% CPU, so your fans go wild" state.
systemctl status bluetooth.service
doesn't tell me anything
3) Where is any documentation for bluez?! How to write a simple script for connect, disconnect and reconnect one specific device?
$ pacman -Qs bluez
local/bluez 5.11-1
Daemons for the bluetooth protocol stack
local/bluez-utils 5.11-1
Development and debugging utilities for the bluetooth protocol stack
Thank you
Last edited by Kotrfa (2013-11-27 22:46:14)
Offline
I can provide very little help, but you do have my sympathy. I gave up on Bluez when it dropped direct ALSA support in version 5, but I was investigating a highly intermittent bug in version 4 between Bluez and moc.
What I tried was killing the Bluez daemon, then starting it from the command line with the "-dn" flags (I think... my memory sucks) while running that under the "script" command. This turned on the gobs of debug messages without forking into a daemon and would also send the messages to a file (because they rolled off the screen quickly).
But then it gets very ugly real fast, because the next step was going into the source code to following the message droppings. That's because the answer to the first part of your question number 3 is that what little documentation the Bluez folks had, they deleted awhile back. So the only documentation is the source itself, which is twisted worse than a pretzel.
The only other (bad) advice I have would be to see if you can get the Bluez developers involved. Perhaps others have a better idea.
Offline
I don't know if one of my previous posts might help - I had to work quite hard to get my BT mouse working with bluez (5) but the notes on that are at https://bbs.archlinux.org/viewtopic.php … 7#p1336907
Although those notes are for a BT mouse it may be very similar for a BT keyboard that you have.
I also included some udev rule that was needed to make it all work automatically after reboot.
Last edited by mcloaked (2013-11-28 17:08:51)
Mike C
Offline
Don't know if it's the issue, but what I miss in your commands is 'trust' after you connected your keyboard,, trust the device,
Offline
Don't know if it's the issue, but what I miss in your commands is 'trust' after you connected your keyboard,, trust the device,
In my case it is a mouse but yes adding the trust command for your keyboard is worth trying.
Mike C
Offline
To trust the device helped in direction that I don't have to connect it twice. Thanks.
Other problems are still there ->
--no informations about bluetoothd.service, even I added "-nd". I runned it separatly in terminal, but it is just a mess.
$ systemctl status bluetooth.service
bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Thu 2013-11-28 20:41:16 CET; 23min ago
Docs: man:bluetoothd(8)
Main PID: 514 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─514 /usr/lib/bluetooth/bluetoothd -dn
-- I have to "power on" inside bluetoothctl first, even the hci0 is unblocked
-- Autoconnection after boot would be great, but now it is inconceivable
-- IRC channels #bluez and #bluez-users are really lonely place and I can't find the right way how to use the mailing lists. How it is possible, that there is NO DOCUMENTATION? Why it is not possible to easily script as it was using hciconfig and hcitools? Are there any reasons?By the way: Bluez must be one of the best kept secrets in Linux
Offline
I noticed that you ran
$ systemctl status bluetooth,service
as user and not as root. Try "su -" to login as root first then once logged in as root try the command again. By the way you should not need to add the suffix .service and simply doing
systemctl status bluetooth
as root should be sufficient.
In my case the two give different results as follows:
[mike@lapmike3 ~]$ systemctl status bluetooth.service
bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Thu 2013-11-28 18:05:05 GMT; 2h 40min ago
Docs: man:bluetoothd(8)
Main PID: 268 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─268 /usr/lib/bluetooth/bluetoothd
[mike@lapmike3 ~]$ sudo systemctl status bluetooth.service
bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Thu 2013-11-28 18:05:05 GMT; 2h 40min ago
Docs: man:bluetoothd(8)
Main PID: 268 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─268 /usr/lib/bluetooth/bluetoothd
Nov 28 18:05:01 lapmike3 systemd[1]: Starting Bluetooth service...
Nov 28 18:05:01 lapmike3 bluetoothd[268]: Bluetooth daemon 5.11
Nov 28 18:05:05 lapmike3 systemd[1]: Started Bluetooth service.
Nov 28 18:05:05 lapmike3 bluetoothd[268]: Starting SDP server
Nov 28 18:05:05 lapmike3 bluetoothd[268]: Bluetooth management interface 1.3 initialized
Nov 28 18:05:55 lapmike3 bluetoothd[268]: Endpoint registered: sender=:1.33 path=/MediaEndpoint/A2DPSource
Nov 28 18:05:55 lapmike3 bluetoothd[268]: Endpoint registered: sender=:1.33 path=/MediaEndpoint/A2DPSink
Last edited by mcloaked (2013-11-28 20:54:04)
Mike C
Offline
Did you try the suggestion in my link to the old thread where I posted where I suggested to add a udev rule to get bluetooth started at boot?:
[mike@lapmike3 ~]$ cat /etc/udev/rules.d/10-local.rules
# Set bluetooth power up
ACTION=="add", KERNEL=="hci0", RUN+="/usr/bin/hciconfig hci0 up"
Mike C
Offline
Interesting!
Yes - using sudo status *** shows me different output with logs. And I tried that and now it works - I don't have to use "power on" anymore.
So now I'd like to create a script for connecting the device. But when I try:
hciconfig cc 20:73:AB:55:xx:xx
I get:
Can't create connection: Operation not permitted
and when I try it as a sudo:
Can't create connection: Input/output error
I'd like to added to my .xinitrc or .profile, but first I must be able to do it as a normal user.
Offline
Hello,
I have the same- bluetooth is unusable since upgrade to 5th version. I checked opensuse forums and they have the same issue. It looks like we will have to wait until someone fixes it. Or go for USB keyboard and mouse
Pity that suddenly you have to deal with breakage and no cure for that ...
Piotr.
Offline
Interesting!
Yes - using sudo status *** shows me different output with logs. And I tried that and now it works - I don't have to use "power on" anymore.So now I'd like to create a script for connecting the device. But when I try:
hciconfig cc 20:73:AB:55:xx:xx
I get:
Can't create connection: Operation not permitted
and when I try it as a sudo:
Can't create connection: Input/output error
I'd like to added to my .xinitrc or .profile, but first I must be able to do it as a normal user.
Did you try the udev rule?
Last edited by mcloaked (2013-11-28 21:33:13)
Mike C
Offline
Yes. Without success.
Offline
I wasn't able to get Bluez(5) running satisfactory after almost a week of on and off again tweaking. Bluez4 is still in the repos and offers a much better alternative.
If something isn't broke...
... why upgrade?
Offline
Pages: 1