Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HELP! They're messing up my bluetooth :-(
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Sun Jun 20, 2010 9:16 pm    Post subject: HELP! They're messing up my bluetooth :-( Reply with quote

After literally weeks of fiddling because there are no *AUTHORITATIVE* docs, I finally got my Microsoft bluetooth mouse to work "fairly" well with my Gentoo laptop. Now the developers are fiddling with bluetooth again. PLEASE do not release any software, especially bluetooth, with old outdated inacurate and incomplete documentation. It is just as much a bug to have a program that no one can get to work because the docs are wrong as it is to release a program that just plain doesn't work!

Now the developers are changing the way bluetooth works, and at least one poster:

http://forums.gentoo.org/viewtopic-t-830747-highlight-bluez.html

Has pointed out that the docs are still a peice of fecal matter. DON'T DO IT !!!

Until someone other than just the developer can a configure bluetooth device solely by reading the docs, its not ready for prime time. I normally do not gripe about free stuff, but the bluetooth support documentation is about the worst thing I have ever had to deal with in the Linux world.

If there is an up to date comprehensive and comprehensible set of docs on bluez-4, then fine, but apparently as of June 3, 2010, it was still as bad as it was last February when I originally configured my bluetooth mouse.

I at least now have something I can live with, even if it is not great. I do not want to break the mouse for the laptop I depend upon to earn my living just because someone "improved" the code without improving the documentation.

It ain't ready for prime time until there is a correct man page to go with it, and the Gentoo powers that be should keep it masked as experimental until such docs are available and have been tested for a suitable length of time.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Mon Jun 21, 2010 2:28 am    Post subject: Reply with quote

Yes, <rant>
I second this... bluetooth is really buggy.

The 3.x series documentation simply does not apply to the 4.x bluez.

I think there's two Gnome bluetooth managers, gnome-bluetooth and blueman. I think I have both installed but blueman seems to work better. Blueman is also masked, where gnome-bluetooth seems not. Pairing is the biggest problem as well as being able to actually see devices in the pairing tools.

Curious what other people used?

I'm not sure how/if there's documentation on how to pair devices via command line anymore with the 4.x series. I struggled through *finally* getting bluez-4 rfcomm/GPRS working with my phone... I was wondering why I got it working on my 3.x system faster (at least get rfcomm working) but my 3.x system is a server (my portable/laptops that actually could use wireless net are 4.x -- the reason why 3.x was easier to get working is because most documentation out there is for 3.x). Surprisingly Networkmanager was less of a problem than getting /dev/rfcomm0 to actually work.

I feel everyone's pain on getting bluetooth working, and even worse, this is not Gentoo specific. My Ubuntu install seemed to work even more poorly than Gentoo.
</rant>
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1687

PostPosted: Mon Jun 21, 2010 11:12 am    Post subject: Reply with quote

A few months back I tried to get gnome-bluetooth to work, and the general
impression seemed to be that it didn't, so I cleared it out and switched to
blueman. Blueman seems to more-or-less work, but I've only used it for
pairing with a laptop, not for the mouse/keyboard/phone stuff it's meant for.

I understand that the architecture of the Bluetooth stack is pretty much
a nightmare, so getting it working smoothly may well take some time.
Still, user-level documentation would certainly be a nice idea.

Will
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2129
Location: Finland

PostPosted: Mon Jun 21, 2010 11:21 am    Post subject: Reply with quote

Yes, documentation for bluetooth is obsolete in Gentoo now[1]. It's all for bluez 2.x and bluez 3.x which doesn't apply anymore to bluez 4.x.

[1] http://bugs.gentoo.org/show_bug.cgi?id=286826

There's really not much to say except: Patches are accepted. This is open source, everyone is free to contribute! :-)
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2550
Location: In the city of dreaming spires

PostPosted: Mon Jun 21, 2010 11:36 am    Post subject: Reply with quote

Problem here is partly that there's not really any meaningful documentation upstream at bluez.org either...
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2129
Location: Finland

PostPosted: Mon Jun 21, 2010 11:40 am    Post subject: Reply with quote

Voltago wrote:
Problem here is partly that there's not really any meaningful documentation upstream at bluez.org either...


yep :(
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1283
Location: Ashford, Kent

PostPosted: Mon Jun 21, 2010 12:07 pm    Post subject: Reply with quote

So write some!
_________________
http://gentoo-wiki.com :: http://lug.org.uk :: http://www.linux.org/groups/ :: User Blogs
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Mon Jun 21, 2010 1:32 pm    Post subject: Reply with quote

Main problem being, I don't feel like I understand how pairing works now (or actually, ever). There's some interface that doesn't seem to make sense, plus the fact some things that should work...don't.

The only way I finally got pairing working is to use net-wireless/blueman as well, which doesn't necessarily help KDE users and doesn't explain why gnome-bluetooth doesn't work... plus the fact that it's ~x86.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Mon Jun 21, 2010 1:35 pm    Post subject: Reply with quote

In order to write meaningful documentation, one must first know how it works. The problem is that no one seems to know how it works but the developers, and they are having far too much fun writing code to be bothered writing documentation. Without any docs, how can anyone else understand it well enough to write docs to teach it to another?

Yes <sigh>, I know: "Use the source, Luke, use the source." :?

But it just seems like a shame to have to reverse engineer a component of Linux as though it were a chunk of malware that slipped past your firewall and antivirus... :evil:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Mon Jun 21, 2010 1:47 pm    Post subject: Reply with quote

So given that my *OLD* bluetooth setup "kind of" works with my mouse, and I don't want to break it, how do I tell portage and emerge *NOT* to try to install the new one, and *NOT* to bellyache about the old one? :twisted:

I have stopped in the middle of a "routine" update because of this bluetooth issue. I would like to finish updating my system without messing up my bluetooth mouse. :)
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Scorpion265
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2005
Posts: 129
Location: Kansas City, MO

PostPosted: Tue Jul 20, 2010 7:08 pm    Post subject: Reply with quote

Sorry to bring up an old thread...

Moriah, we have the same mouse, the microsoft bluetooth 5000 or whatever it is. I couldn't get it working either! I ended up installing blueman, searched for it, and was able to pair with it. After that I had to right click and add it to the input service. I've had no problems after that. I hope this helps!
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Tue Jul 20, 2010 7:51 pm    Post subject: Reply with quote

Is the best known method now to use blueman in gnome with BlueZ-4?
Maybe should move blueman from ~x86 to stable if enough people are having success with it?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Tue Jul 20, 2010 8:35 pm    Post subject: Reply with quote

Not everybody uses gnome. I certainly do not. A bluetooth mouse should work with GPM at the boot console. You should not need anything in the way of a graphical environment at all. If a wired mouse works there, then so should a bluetooth mouse. A bluetooth mouse is a replacement for a wired mouse, not just a gnome toy.

Blueman is not a complete solution. :evil:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Tue Jul 20, 2010 11:07 pm    Post subject: Reply with quote

Unfortunately it seems to be the only thing that works with pairing in BlueZ-4.6...
I have yet to see any other piece of software properly pair for BlueZ-4. Something just doesn't seem right, here...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2289
Location: Canada

PostPosted: Wed Jul 21, 2010 2:28 am    Post subject: Reply with quote

I paired my phone by hand once with bluez-4.something, and it is still getting paired automatically since.

On the other note, since bluez is D-BUS based, I found very useful dev-util/d-feet while debugging bluez setup. You can see which variables have been successfully set, which were not, which interfaces bluez think are available, etc.
Back to top
View user's profile Send private message
Moriah
Veteran
Veteran


Joined: 27 Mar 2004
Posts: 1907
Location: Kentucky

PostPosted: Wed Jul 21, 2010 3:03 am    Post subject: Reply with quote

It would seem to me that if blueman works, then we ought to be able to look at *HOW* it works and figure out how to manually do the same thing. After all, doesn't the configuration consist of writing to configuration files? What does it write to what files? Answer that, and you know how to configure bluetooth manually. :idea:
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2289
Location: Canada

PostPosted: Wed Jul 21, 2010 3:24 am    Post subject: Reply with quote

Moriah wrote:
It would seem to me that if blueman works, then we ought to be able to look at *HOW* it works and figure out how to manually do the same thing. After all, doesn't the configuration consist of writing to configuration files? What does it write to what files? Answer that, and you know how to configure bluetooth manually. :idea:


Not exactly it seems, bluez makes some discoveries and stores variables in D-BUS and so does, probably, blueman.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Wed Jul 21, 2010 1:21 pm    Post subject: Reply with quote

Appears some people were successful hand-pairing devices in BlueZ-4, could that be shared to the community? :D

I was looking in some directory and found some files that seemed to be related to pairing but couldn't figure out the file format or the "key" it used, it's most certainly not the PIN but some hash, probably of the selected PIN and the bdaddr... but past that I have no clue...

This too and the fact all my bluetooth adaptors for computers have nonunique addresses... which makes me wary of auto-pairing too. *sigh*

Need to get some unique bdaddr devices...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2289
Location: Canada

PostPosted: Thu Jul 22, 2010 6:35 am    Post subject: Reply with quote

eccerr0r wrote:
Appears some people were successful hand-pairing devices in BlueZ-4, could that be shared to the community? :D

I was looking in some directory and found some files that seemed to be related to pairing but couldn't figure out the file format or the "key" it used, it's most certainly not the PIN but some hash, probably of the selected PIN and the bdaddr... but past that I have no clue...

This too and the fact all my bluetooth adaptors for computers have nonunique addresses... which makes me wary of auto-pairing too. *sigh*

Need to get some unique bdaddr devices...


Does command-line procedure in http://en.gentoo-wiki.com/wiki/Bluetooth_mouse work for you ?
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3946
Location: USA

PostPosted: Thu Jul 22, 2010 3:31 pm    Post subject: Reply with quote

Ahh...that might do the trick...will need to try it when I get the chance.

Probably will have to upgrade the bluez-3 on my server to bluez-4 soon as it's been deprecated...

Thanks!
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Uli Sing
Apprentice
Apprentice


Joined: 03 May 2010
Posts: 190
Location: MUC

PostPosted: Mon Jul 26, 2010 7:51 am    Post subject: Reply with quote

dmpogo wrote:
Does command-line procedure in http://en.gentoo-wiki.com/wiki/Bluetooth_mouse work for you ?


At least it works for me (Keysonic ACK-340BT). Thank you!

What's not working is the bluetooth init script using baselayout-2.

Did I make any mistake or is it a case for this?

Attaching an usb keyboard to start /etc/init.d/bluetooth kills my inner joy. :(


---Edit---
Upgrade to net-wireless/bluez-4.69 is working now.
I'm happy. :D
Back to top
View user's profile Send private message
mapr
n00b
n00b


Joined: 05 Dec 2002
Posts: 22
Location: Germany

PostPosted: Tue Dec 04, 2012 10:11 am    Post subject: Reply with quote

I cannot help it, but bluetooth with linux is a mess.

I am running Bluez 4.99

http://en.gentoo-wiki.com/wiki/Bluetooth_mouse worked for my mouse - no problem so far. After that I spend hours (many) to get my keyboard Keysonic ACK-595BT to work the same way - to no avail.


The pin gets exchanged but then it gets stuck:

... simple-agent hci0 00:18:00:00:D0:88
RequestPinCode (/org/bluez/1644/hci0/dev_00_18_00_00_D0_88)
Enter PIN Code: 123456
Release exit: False <- this is my debug printf
Creating device failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

and the connection keeps pending:

< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 41
< ACL data: handle 41 flags 0x00 dlen 10
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:18:00:00:D0:88
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
bdaddr 00:18:00:00:D0:88 key 3F57B91B007ABEA1A12A849F3A164B4C
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 00:18:00:00:D0:88
> ACL data: handle 41 flags 0x02 dlen 16
Extended feature mask 0x0007
Flow control mode
Retransmission mode
Bi-directional QoS
< ACL data: handle 41 flags 0x00 dlen 12
> HCI Event: Number of Completed Packets (0x13) plen 5
handle 41 packets 1
> HCI Event: Auth Complete (0x06) plen 3
status 0x00 handle 41
> ACL data: handle 41 flags 0x02 dlen 16
Connection pending - Authorization pending
> ACL data: handle 41 flags 0x02 dlen 16
Connection successful
< ACL data: handle 41 flags 0x00 dlen 12


This is what /var/log/messages says:

dbus[1631]: [system] Rejected send message, 1 matched rules; type="method_return", sender=":1.31" (uid=0 pid=3009 comm="/usr/bin/python2 /usr/bin/simple-agent hci0 00:18:") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.0" (uid=0 pid=1644 comm="/usr/sbin/bluetoothd --udev ")

My policies at /etc/dbus-1/system.d/bluetooth.conf are:

<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
<allow send_interface="org.bluez.HandsfreeAgent"/>
<allow send_interface="org.bluez.MediaEndpoint"/>
<allow send_interface="org.bluez.MediaPlayer"/>
<allow send_interface="org.bluez.Watcher"/>
<allow send_interface="org.bluez.ThermometerWatcher"/>

<allow send_type="method_call"/>
<allow send_type="method_return"/>
</policy>

I am fiddling around with the allowance for the send_types, but it always runs into the rejected message type as can be seen in the syslog.

I assume it has to do with the unset interface (see syslog), since I have (not surprisingly) no rule for this interface

interface="(unset)" member="(unset)" error name="(unset)"


May be this is something for the bluez list?

Thanks in advance
Mario
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum