Click to See Complete Forum and Search --> : Bluetooth OMG
acid45
08-23-2007, 03:22 AM
Okay. I have this working. I just can't find a tool, that will install, so I can do file transfers. From what I can tell, kdebluetooth should do the trick nicely. But after reading many many posts, mostly regarding the Motorola RAZR and the tool that most people use for that being moto4lin. I am thinking that maybe, very slight maybe, I may need a tool specific for my phone, or maybe just my brand. Another thing I think might be going on, but I would doubt very much, is that for some reason I don't have my D-BUS/QT3 bindings...
Form what I can tell, by looking at the packages that are installed on my failed attempt to upgrade to slackware 12 disk(mounted as /dead) and what is installed on my slackware 11 disk, upgrading to slackware 12 might be an option...
So after that long winded introduction, this is what I have done. ( my specs are at the bottom )
First, I went to FutureShop and bought a USB bluetooth dongle , without checking if it's supported by Linux. I figured, Linux has excellent hardware support and it should be supported. I get home, with a model number in hand and find out it it supported. Great! $30 well spent.
So then it was the hunt for how to get my pictures to my computer. This is where I found the two main posts I've been following. Next will be hacking apart my legal MP3s and making them into ring tones I didn't pay 4x the price of the full song to get it from Telus.
BTW Shouldn't that be illegal, only allowing you to use files that have been signed by them to be used as ring tones. Like, anti-trust or non-competing or something. To get a ring tone to work from an MP3 I legally paid for. I have to download one of the songs they offer for free and modify my MP3 header with their MP3 header. Good ol' hex =D
Anyway, no more side tracking. I found a .tgz package that I was able to use installpkg to install but it wouldn't run and I couldn't find out why. So I went and downloaded the source, and found out why the other package wouldn't seem to install. When I tried ./configure on kdebluetooth, I kept getting a message:
configure: error: You need D-BUS/Qt3 bindings
When I googled this message I kept finding the same article published by different people or a variation of it.
One is
http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/Bluetooth_in_Slackware_HOWTO
The other is
http://wiki.kde.org/tiki-index.php?page=DBUS+for+KDE+3.x
I seem to have d-bus working, I just can't get kdebluetooth installed.
hciconfig hci0 works.
If I run hcitool cc MAC of my phone it sits for a few seconds and then goes to prompt. Then if I type hcitool lq i get a link quality of 255. Which is where I get annoyed with my phone. It's bluetooth connection keeps timing out after 60 seconds. I think it's the phone though. It's bluetooth discovery mode is only 60 seconds. I can turn off discovery or turn it on for 60 seconds, no way to just turn on bluetooth discovery, probably a battery drainer. I don't know why it would disconnect after about a minute unless I keep doing hcitool lq MAC.
Anyway...
I'm stuck, I don't know what to do other than try the upgrade. I can't find anything that seems to be for LG phones, or the chocolate phone. I did see something in my KDE menu that was for mobile phones but it disappeared after I tried to run it once.
Slackware 11.0 ( 12 is out but I'm afraid to upgrade as it didn't work out last time & I'm in a bit of a shuffle right now )
2.6.18 kernel ( I'm ready to upgrade but I'm waiting till I have a solid week of nothing to do before I take the plunge, backup everything, and upgrade, with install disks in hand just in case. And then get everything back to the way I want it... *sigh* )
qt 3.3.8
kde 3.5.4
d-bus 1.0.2 ( configured with --enable-qt & --with-qt-dir )
bluetooth is compiled as a module(BlueZ from what I can tell). This could be a problem but it doesn't seem to stop me from connecting to the phone.
LG Chocolate Phone
You're probably thinking, 'why doesn't this guy just buy Windows'.
stumbles
08-23-2007, 07:21 AM
I have the Razr V3m and from some googling about, AFAIK if you got it from Verizon its a severly crippled POS. You can forget about obexftp, they (Verizon) disabled that. From what I can tell, you might get dund working.... if you use its USB port.
I have run into the same problem with the 60 second timeout on bluetooth.... its annoying as hell and there is no way to change that.
I have tried to get the bluetooth thing working on PCLinuxOS and a source based distro (Lunar-Linux) with no luck. Oh kdebluetooth will see that mac, rfcomm channel and all that stuff but still no worky worky.
As for the qt3-dbus bindings, you might want to try;
I could not get the bindings from freedesktop to work. The problem was theirs would prepend qtdbus to each header and qt/kde could not find the headers. No amount of fiddling with filenames and such would work. The link above though did work for me so YMMV.
And finally, even using the lastest bluez-utils and libs were of no help.
The only thing left I have not tried is flashing the firmware and convert the thing from V3m to V3c.
acid45
08-23-2007, 12:24 PM
Thanks I'll give that a shot. I thought the QT/dbus message bindings were just a config option during install for one or the other, I assumed dbus.
bwkaz
08-23-2007, 06:30 PM
I thought the QT/dbus message bindings were just a config option during install for one or the other, Ah. No, they're a set of bindings between Qt and dbus, so that Qt programs (including the various bits of KDE) can talk to your system's dbus daemon, and through it to other processes running around on your machine. (Like HAL, for instance.)
That's why it's a "binding": it's code to make the various pieces talk to each other. :)
acid45
09-01-2007, 01:32 PM
Thanks bwkaz.
I finally found some time to give it another shot, 2 jobs sucks. Anyway. I got openobex installed kdebluetooth installed, so those binding you pointed me to seemed to work. But KDEBlueTooth keeps crashing. It says something about connection to dbus refused. I posted the log but there are dozens of 'undefined mimetype/servicetype warnings. I just put the last one to make the log shorter. From what I can tell it's a bug in kdebluetooth.
kbuildsycoca: WARNING: 'Office/kexi.desktop' specifies undefined mimetype/servicetype 'application/x-kexiproject-sqlite'
kdebluetooth: dbus_bus_get() failed....
kdebluetooth: Failed to connect to socket /usr/var/run/dbus/system_bus_socket: Connection refused
kdebluetooth: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: /org/bluez interface: org.bluez.Manager conn: (nil)
process 10473: arguments to dbus_connection_add_filter() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 4954.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
KCrash: Application 'kbluetooth' crashing...
DCOP aborting call from 'anonymous-10472' to 'kdebluetooth'
ERROR: Communication problem with kdebluetooth, it probably crashed.
root@roxbox:/home/wayne/download/kdebluetooth-1.0-beta3# KWrited - Listening on Device /dev/pts/3
sh: iceauth: command not found
There was a patch I didn't apply because it was for openobex 1.2 onto the kdebluetooth source. I will try to modify the patch since it was for beta 1 and im using beta 3 and I'm going to see if that makes a difference
I tried applying the patch and it said it couldnt find the code hunks to modify. I'm guessing the changes were made from beta1 to beta3. I'm going to go through the patch and see if I can figure out what it was trying to change and see if I can manually change anything that needs changing.
bwkaz
09-02-2007, 12:59 PM
I am going to guess here that if you fix the initial problem, everything else might start working. (Or at least, most of these errors will go away. You may run into something else though. ;))
kbuildsycoca: WARNING: 'Office/kexi.desktop' specifies undefined mimetype/servicetype 'application/x-kexiproject-sqlite' I don't think this part matters much, as it appears to be at least mostly unrelated to the d-bus setup. It looks like there's a .desktop file somewhere (IIRC, .desktop files in KDE are like shortcuts in windows) that's causing some grief when this kbuildsycoca program (whatever it is) runs. But I believe kbuildsycoca is something that's mostly internal to KDE. I think the real problem is here:
kdebluetooth: dbus_bus_get() failed....
kdebluetooth: Failed to connect to socket /usr/var/run/dbus/system_bus_socket: Connection refused Looks like nobody has a socket open (and waiting for connections) at the path /usr/var/run/dbus/system_bus_socket. I am pretty sure that d-bus clients use a Unix-domain socket (aka a named socket, referred to by a path) to communicate with the d-bus daemon. The daemon will create this socket when it starts up.
So I'd check to see whether that path exists; I suspect it does not. If you have a system_bus_socket file in /var/run/dbus/ instead of /usr/var/run/dbus, then you probably just have to add a flag to the ./configure script for the qt3-dbus bindings package, to make it look in /var/run instead of /usr/var/run. I'd guess that the option would be --localstatedir (since the default for that is usually ${prefix}/var in autoconf, you would use --localstatedir=/var), but check to see if there's any other option you can use that's more specific. Because setting --localstatedir may change a bunch of other things too.
If you don't have a system_bus_socket file in /var/run either, then I'm guessing that you're not starting the d-bus daemon in your boot scripts. Not sure how to fix that, but hopefully looking around a bit will shed some light. :) Once you get the d-bus daemon to start, double-check the socket path again; I suspect the /usr/var/* path isn't going to be right, and you'll probably still have to recompile qt3-dbus.
But that should (hopefully) get you past this error. :)
acid45
09-03-2007, 12:44 PM
/usr/var/run/dbus/system_bus_socket does exist.
/var/run/dbus/system_bus_socket does not. What would make me thing that it's not an issue with the named pipe missing is that it's refused a connection as opposed to some message like 'unable to locate file' I'm going to do some digging about d-bus not running...
Something I just noticed. After it crashes, a minute or two later it says listening on device /dev/pts/2 and only /dev/pts/0 and /dev/pts/1 exist.
Hmmm, I tried kmobiletools instead and I get the same error as with kbluetooth. Seems like it's something you've mentioned I will give that a try.
kmobiletools: dbus_bus_get() failed....
kmobiletools: Failed to connect to socket /usr/var/run/dbus/system_bus_socket: Connection refused
kmobiletools: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: /org/bluez interface: org.bluez.Manager conn: (nil)
process 9813: arguments to dbus_connection_add_filter() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 4954.
On second thought it seems like you were saying that the /usr/var dbus socket file was missing, which it was not. It seems like something else but I don't know I'm going to google around to see if anyone is getting my exact issue, and hope for a solution :p
bwkaz
09-03-2007, 06:05 PM
/usr/var/run/dbus/system_bus_socket does exist. *boggle*
Well, apparently d-bus is the first program I've ever heard of that actually uses /usr/var. Every single other program that I've used uses plain old /var. Wow. ;)
What would make me thing that it's not an issue with the named pipe missing FYI: It's a socket, not a pipe. Pipes can only pass data in one direction; sockets can pass data in both directions. :)
is that it's refused a connection as opposed to some message like 'unable to locate file' I'm going to do some digging about d-bus not running... Well, I'm not sure what error the connect(2) syscall gives you if you try to connect a PF_UNIX socket to an address whose file doesn't exist. It may give you ENOENT ("file not found"), but I doubt it. I'd think it'd be more likely to give you either a timeout or a connection refused, just like the PF_INET sockets will do if the remote IP doesn't exist or nobody's listening on the target port. :)
With PF_INET sockets, a "connection refused" message means that nobody's listening on the target port (on the target machine, of course). For PF_UNIX, that may mean that d-bus isn't running, or that it's closed its socket, or it may mean that the socket's just plain not there.
Anyway, you've checked, and the socket is there. So that's not it; the problem is likely that d-bus isn't listening on it for whatever reason (maybe it's not running).
Before you fire up whichever KDE program you're testing with, what does netstat -anp say? First it'll list IP sockets, and then it'll list Unix-domain sockets; look in the bottom part of its output. Most sockets in that section should have a "Path"; this is the name that you connect to, and it's also the location of the socket file. If nothing shows the /usr/var/run/* file in netstat's output, then try removing the file and restarting your system's dbus daemon. I believe that a socket will outlast the program that's using it unless it's actually closed (though I don't know for sure), so it's possible that the socket is there but nobody's home. Restarting dbus should (hopefully) make it realize that it needs to recreate the socket, and then also listen on it.
acid45
09-08-2007, 02:26 AM
netstat -anp returns no dbus sockets open.
I was right, no socket file = no file or dir message.
kdebluetooth: Failed to connect to socket /usr/var/run/dbus/system_bus_socket: No such file or directory
I'm working on getting dbus running, I hope I don't have to reboot :p
03:34:08 up 111 days, 23:07, 1 user, load average: 1.15, 1.24, 1.36
I got it running dbus-daemon --system returned:
kbuildsycoca running...
kdebluetooth: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: /org/bluez interface: org.bluez.Manager conn: 0x80d8598
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Manager method: DefaultAdapter
kdebluetooth: libkbluetooth: getString(DefaultAdapter): The name org.bluez was not provided by any .service files
kdebluetooth: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: interface: org.bluez.Adapter conn: 0x80d8598
kdebluetooth: Adding match failed: org.freedesktop.DBus.Error.MatchRuleInvalid: Path '' is invalid
kdebluetooth:
kdebluetooth: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: /org/bluez interface: org.bluez.Security conn: 0x80d8598
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Security method: RegisterDefaultPasskeyAgent
kdebluetooth: libkbluetooth: setString(RegisterDefaultPasskeyAgent): The name org.bluez was not provided by any .service files
kdebluetooth: [KBluetooth::DBusSignal::DBusSignal(const QString&, const QString&, const QString&, DBusConnection*)] : org.bluez path: /org/bluez interface: org.bluez.Security conn: 0x80d8598
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Security method: RegisterDefaultAuthorizationAgent
kdebluetooth: libkbluetooth: setString(RegisterDefaultAuthorizationAgent): The name org.bluez was not provided by any .service files
kdebluetooth: geschafft
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Manager method: ListAdapters
kdebluetooth: libkbluetooth: getStringList(): The name org.bluez was not provided by any .service files
kdebluetooth: [QValueList<QString> KBluetooth::Manager::listAdapters()] 0
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Manager method: ListAdapters
kdebluetooth: libkbluetooth: getStringList(): The name org.bluez was not provided by any .service files
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Manager method: ListAdapters
kdebluetooth: libkbluetooth: getStringList(): The name org.bluez was not provided by any .service files
kdebluetooth: [QValueList<QString> KBluetooth::Manager::listAdapters()] 0
kdebluetooth: [DBusMessage* KBluetooth::DBusSignal::newMessage(const QString&)] : org.bluez path: /org/bluez mInterfacE: org.bluez.Manager method: ListAdapters
kdebluetooth: libkbluetooth: getStringList(): The name org.bluez was not provided by any .service files
# KWrited - Listening on Device /dev/pts/3
It seems to be running now... for some reason I thought it would be a gui. Ah well, more to learn :)
I'm going to try BitPim, it supports my phone and I know where to look for errors if this doesn't work.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.