WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Bluetooth: bluez give me an error  (Read 6796 times)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Bluetooth: bluez give me an error
« on: November 06, 2011, 04:29:37 AM »
I would like to use bluetooth to connect to the Internet because it consumes less battery of my phone, radiates less, and perhaps I can even use mic/speker PC to phone calls.
I did a little research and i know blueman (and bluez), ok this packager is on repo, after power on the module in bios i am ready to go:
Code: [Select]
tc@box:~$ sudo /usr/local/etc/init.d/bluez start
stopped /usr/local/bin/dbus-daemon (pid 4240)
rm: can't remove '/var/run/dbus/pid': No such file or directory
tc@box:~$
Epic Failt  ;D
Now I refer to your brilliant minds   :P

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #1 on: November 06, 2011, 04:42:05 AM »
Ok, quick update, if I am logged in as root (without sudo) no error is committed.

Code: [Select]
tc@box:~$ sudo su
root@box:~# /usr/local/etc/init.d/bluez start
root@box:~#


Now "add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus" but i don't have dbus file in /home/tc/.X.d directory

Other problem:
-blueman don't have a menu voice, it is normal?
-blueman-applet don't run any guy and return this error:
Code: [Select]
tc@box:~$ blueman-applet
Loading configuration plugins
_________
<module> (/usr/local/lib/python2.7/site-packages/blueman/main/Config.py:20)
Skipping plugin Gconf
No module named gconf
Skipping plugin file
org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-zliYdg4NA1: Connection refused
No suitable configuration backend found, exitting
Exception AttributeError: "'File' object has no attribute 'Monitor'" in <bound method File.__del__ of <File object at 0xa2b811c (blueman+plugins+ConfigPlugin+ConfigPlugin at 0xa127400)>> ignored
_________
save (/usr/local/lib/python2.7/site-packages/blueman/plugins/config/File.py:117)
Saving config
tc@box:~$

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #2 on: November 06, 2011, 05:42:13 AM »
Ok, quick update, if I am logged in as root (without sudo) no error is committed.
That's not the reason - the first time you start bluez it will attempt to stop and restart dbus. If dbus is not running, you will see the message '/var/run/dbus/pid': No such file or directory. On second and subsequent bluez restarts, it will not restart dbus.

Quote
Now "add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus" but i don't have dbus file in /home/tc/.X.d directory
That's correct, you need to create ~/.X.d/dbus

Quote
org.freedesktop.DBus.Error.NoServer: Failed to connect to socket /tmp/dbus-zliYdg4NA1: Connection refused
I believe this happened because the xserver started without ~/.X.d/dbus as mentioned above.

BTW, I believe it's blueman-manager you need to run
« Last Edit: November 06, 2011, 05:47:35 AM by Juanito »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Bluetooth: bluez give me an error
« Reply #3 on: November 06, 2011, 06:20:02 AM »
Just a small observation, don't know if it matters. In the 3.x repository:
The info tab for blueman-2.6.tcz reads
Code: [Select]
add "dbus-launch --sh-syntax --exit-with-session" to .xsessionThe info tab for blueman-2.7.tcz reads
Code: [Select]
add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #4 on: November 06, 2011, 06:27:45 AM »
I guess when blueman-2.6 was first created we didn't have the ~/.X.d facility...

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #5 on: November 06, 2011, 07:49:54 AM »
Ok thanks juanito for reply, aftei i write second message i found this post: http://forum.tinycorelinux.net/index.php/topic,8559.msg45965.html#msg45965

After first 4 steps of A paragraph blueman start and find my phone.

Unfortunately I had not considered that my phone does not support tethering bluethoot without installing third-party app. but I have not yet found a working app, I will continue to seek.

Let me ask another just two things:
-"add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus" this part is to keep the dbus configuration after backup and restart?
-although I can not use it to connect, do you think I could use blueman to interact with speaker/mic of my PC in place of the phone during a call?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #6 on: November 06, 2011, 07:59:10 AM »
-"add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus" this part is to keep the dbus configuration after backup and restart?
since .X.d is under /home/tc, it will be automatically backed up if you have backup enabled and you haven't changed the default .filetool.lst. The 'dbus-launch" command enables dbus messaging within the xsession.

Quote
-although I can not use it to connect, do you think I could use blueman to interact with speaker/mic of my PC in place of the phone during a call?
you can certainly use blueman to pair with a bluetooth headset speaker/mic using (for example) skype on your pc if that's what you mean

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #7 on: November 06, 2011, 09:30:39 AM »
Quote
since .X.d is under /home/tc, it will be automatically backed up if you have backup enabled and you haven't changed the default .filetool.lst. The 'dbus-launch" command enables dbus messaging within the xsession.
Ok, and after backup and reboot I can run blueman without kill x?


Quote
you can certainly use blueman to pair with a bluetooth headset speaker/mic using (for example) skype on your pc if that's what you mean
but I must do the opposite, make calls with phone and interface with the speaker/mic PC (making the pc as an bluetooth headset)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #8 on: November 06, 2011, 12:36:12 PM »
Ok, and after backup and reboot I can run blueman without kill x?
It works OK for me - remember you will need to start bluez using bootlocal.sh

Quote
but I must do the opposite, make calls with phone and interface with the speaker/mic PC (making the pc as an bluetooth headset)
I've no idea how you would go about that or even if it is possible..

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Bluetooth: bluez give me an error
« Reply #9 on: November 07, 2011, 09:19:36 AM »
Hm, if the phone shows as a modem, voice calls should be possible - don't ask me how though, last I did that kind of thing was with a 56k modem in the 90s :P
The only barriers that can stop you are the ones you create yourself.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #10 on: November 08, 2011, 05:25:34 AM »
Ok now i think all connection works, summarize:

-Kill x
-$ sudo dbus-launch
-$ /usr/local/etc/init.d/bluez start
- add "dbus-launch --sh-syntax --exit-with-session" to .X.d/dbus
- startx
- start blueman-manager
- program find my phone, i select pairing and trusted

I must now create the connection and there seems to be successful because I see the three icon on the on the right and the exchange of data but I do not know what to do,
If I start playing with the program after a while it block and if I kill these does not restart.

An idea?

@Curaga, I think it's doable, but I do not think it is a matter of dialup, instead there should be as though the PC interface also acted Bluetooth Headset.
However it is not essential,that goes wrong i buy a headset :P

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #11 on: November 08, 2011, 10:12:42 AM »
Just to give color to my request :P


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #12 on: November 08, 2011, 01:26:25 PM »
-$ sudo dbus-launch
-$ /usr/local/etc/init.d/bluez start
Starting bluez will start the dbus daemon, so no need to use dbus-launch

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: Bluetooth: bluez give me an error
« Reply #13 on: November 08, 2011, 01:27:26 PM »
Just to give color to my request :P
If you start blueman from a terminal window, do you see an error message?

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: Bluetooth: bluez give me an error
« Reply #14 on: November 09, 2011, 01:54:19 AM »
Quote
Starting bluez will start the dbus daemon, so no need to use dbus-launch
At the next attempt I try,however, after "dbus-launch", the first time that I start ".../bluez start" always returns the error "rm: can not remove '/ var / run / dbus / pid': No such file or directory".
This doesn't happen the second time.
Anyway blueman start, for which I have not reported.

Quote
If you start blueman from a terminal window, do you see an error message?
I divide the output for convenience:
Start Blueman
Search
Pairing and pairing error located at the bottom of gui (I had not noticed before)
So I tried to refresh device
Click on setup ad in animated gif and Dun up to failure

This is the complete output not divide
« Last Edit: November 09, 2011, 01:57:53 AM by vinnie »