[Chugalug] Debugging Bluetooth info

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Chugalug] Debugging Bluetooth info

Dan Lyke
I've got me this snazzy Asus ZenBook, which I mostly love. I got the
audio volume issue worked out. The BlueTooth mouse even works, but...

My Samson Expedition Escape speaker, and my cheapie direct from China
remote volume control both don't work with Bluetooth.

The former throws some weird protocol error, the latter won't go
through pairing.

I'm using Blueman on Xubuntu, and my impression of that and the whole
Bluetooth stack is that it's kinda where WiFi support on Linux was 20
years ago. Blueman doesn't seem to give me device names, just hardware
addresses, when I search for devices. The whole thing is klunky.

So: If one were going to try to figure out Bluetooth issues on Linux,
where would one go? Are there command-line tools I can be using to see
missing specs?
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Debugging Bluetooth info

DaWorm
Some good general troubleshooting tips here.  Not sure if they'll help with your exact issues, but should give you some idea of the command line tools you can use that are part of the bluez package.

Jeff.

On Tue, Apr 10, 2018 at 7:47 PM, Dan Lyke <[hidden email]> wrote:
I've got me this snazzy Asus ZenBook, which I mostly love. I got the
audio volume issue worked out. The BlueTooth mouse even works, but...

My Samson Expedition Escape speaker, and my cheapie direct from China
remote volume control both don't work with Bluetooth.

The former throws some weird protocol error, the latter won't go
through pairing.

I'm using Blueman on Xubuntu, and my impression of that and the whole
Bluetooth stack is that it's kinda where WiFi support on Linux was 20
years ago. Blueman doesn't seem to give me device names, just hardware
addresses, when I search for devices. The whole thing is klunky.

So: If one were going to try to figure out Bluetooth issues on Linux,
where would one go? Are there command-line tools I can be using to see
missing specs?
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug


_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Debugging Bluetooth info

Dan Lyke
On Wed, 11 Apr 2018 08:49:06 -0400
DaWorm <[hidden email]> wrote:
> Some good general troubleshooting tips here
> <https://wiki.archlinux.org/index.php/bluetooth#Configuration_with_a_graphical_front-end>.
> Not sure if they'll help with your exact issues, but should give you
> some idea of the command line tools you can use that are part of the
> bluez package.

Thanks. That's the kind of stuff I'm interested in. I don't want to
have to understand the whole darned stack, but piecing together the
command-line tools is probably gonna be necessary.

(The worst part is that I've reworked this Qt app to, theoretically, be
able to do all the Bluetooth remote control things, if I can just get
the system to pair with the device...)
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Debugging Bluetooth info

DaWorm
Which libs are you using?  

I'm working on some proof of concept type code, just raw command line stuff, direct to dbus, although apparently glib and gdbus are more appropriate.  I don't have any experience with glib though and haven't been able to wrap my head around it.  I also am stuck with plain C, since I couldn't program hello world in python or anything like it, and most of the good demos are not in plain C.  

If you're on QT, I'd guess glib isn't what you'd be using, though, as that's rooted in the GTK world.

Supposedly, you should be able to do all of the scanning and pairing directly from your app, not worrying about what blueman or any other bluetooth manager is running.  That's the route I'm going to go down as soon as I figure out glib.  I really need it for the callback functions, because I don't want to continuously poll dbus in my app.  The bluez source contains the full code for the command line utility that I should be able to use to base my code on, but it is a kitchen sink app and it's hard for me to back it down to the simple level of just the functions I'm looking at, which is limited to BLE scan, pair, connect, and communicate.  I don't need audio, networking, standard BT, or any of that, so it is taking me quite a while to move forward on it.  Plus my normal job only gives me a few hours a week to look at it.

And if you understood what I'm talking about, a) you probably already know more about it than I do, and b) I'm sorry.

Jeff.


On Wed, Apr 11, 2018 at 11:00 AM, Dan Lyke <[hidden email]> wrote:
On Wed, 11 Apr 2018 08:49:06 -0400
DaWorm <[hidden email]> wrote:
> Some good general troubleshooting tips here
> <https://wiki.archlinux.org/index.php/bluetooth#Configuration_with_a_graphical_front-end>.
> Not sure if they'll help with your exact issues, but should give you
> some idea of the command line tools you can use that are part of the
> bluez package.

Thanks. That's the kind of stuff I'm interested in. I don't want to
have to understand the whole darned stack, but piecing together the
command-line tools is probably gonna be necessary.

(The worst part is that I've reworked this Qt app to, theoretically, be
able to do all the Bluetooth remote control things, if I can just get
the system to pair with the device...)
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug


_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug
Reply | Threaded
Open this post in threaded view
|

Re: [Chugalug] Debugging Bluetooth info

Dan Lyke
On Wed, 11 Apr 2018 11:46:07 -0400
DaWorm <[hidden email]> wrote:
> Which libs are you using?

Just changing a bunch of misuse of a global event filter and abuse of
QKeySequence with QShortcut and legitimate use of QKeySequence (this is
for http://squaredesk.net/ )

Qt seems to send most of the Bluetooth HID commands as QKeySequence
mappable events, but we'd been abusing QKeySequence by using individual
components for multiple hotkeys to the same option (eg: if you wanted
"+" and "a" to be "Increase Volume" you'd click on the QKeySequence
input, hit "+" and "a", but because we were using a global event filter
we treated those as separate keys rather than a hotkey sequence).

This broke the Bluetooth HID: People could set the action to the
multi-character "Volume Up" command that came from the remote, but we
broke it down into things we couldn't decipher.

(If you're really interested in playing with a very niche music player
written in Qt and C++, I'll happily walk you through the details of
compiling it on Linux, the Github branch is "hotkeys" at
https://github.com/mpogue2/SquareDesk/ the particular issue is
https://github.com/mpogue2/SquareDesk/issues/246 )

> If you're on QT, I'd guess glib isn't what you'd be using, though, as
> that's rooted in the GTK world.

Yeah, Qt is abstracting the Bluetooth into higher level events.

> And if you understood what I'm talking about, a) you probably already
> know more about it than I do, and b) I'm sorry.

Not yet, but I can feel it coming...

Dan
_______________________________________________
Chugalug mailing list
[hidden email]
http://chugalug.org/cgi-bin/mailman/listinfo/chugalug