WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bluez & blueman seem out of order  (Read 7217 times)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
bluez & blueman seem out of order
« on: September 01, 2010, 06:38:02 AM »
I previously in tcl 2.x was able to get bluetooth up and running...now it seems broken.

To start with, after loading bluezI  can't do 'simple-agent' it says the file is not there even though I see it in the directory.

blueman does not run, complaining about missing modules eg pygtk. I see those in the deps list in Appbrowser but they do not get loaded. If I load it manually, it gets further but still spits the dummy. All these worked fine some months ago.

In short I got nowhere - too many problems.

Has this been tested before submitting to the repo?
« Last Edit: September 01, 2010, 06:42:01 AM by jur »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #1 on: September 01, 2010, 06:50:08 AM »
I use the bluez and blueman extensions regularly with tc-3.x and they work fine for me.

However, I have not updated any of the py* extensions in my /tce folder since the gradual update to python-2.7 started, perhaps this might be the cause of the problem?

I'll look into this more in the next couple of days.
« Last Edit: September 01, 2010, 07:31:07 AM by Juanito »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #2 on: September 01, 2010, 07:26:45 AM »
I gave things a go - see attached screenshot with tc-3.1 paired to a bluetooth device.

Steps to reproduce:

1. loaded blueman locally using appbrowser
2. used desktop right-click menu to bring up "services" applet and started bluetooth daemon (which will automatically start dbus daemon)
3. used blueman "search" button, selected device and then "pair" button

As regards simple-agent, (which is not required for the above) note that the python extension used to create a symlink /usr/bin/python -> /usr/local/bin/python - the version of the extension I have locally does not create the symlink.

I missed out correcting the shebang in simple-agent to read "/usr/local/bin/python", hence the error message you get. I will correct this the next time I update the bluez extension, but in the meantime you could create the symlink if your version of the python extension does not create it.

If things still do not work with your setup, maybe you could post the errors and I'll try to help.
« Last Edit: September 01, 2010, 07:28:21 AM by Juanito »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: bluez & blueman seem out of order
« Reply #3 on: September 01, 2010, 06:59:57 PM »
OK, I still got the same errors.

Code: [Select]

tc@box:~$ blueman-manager
Traceback (most recent call last):
  File "/usr/local/bin/blueman-manager", line 25, in <module>
    import gtk
ImportError: No module named gtk
tc@box:~$

I followed your steps. The first thing I got while loading blueman was a missing lib, lixft.tcz. That's OK sometimes these sort of things happen so I did that one manually. Blueman then installed OK. (I can't explain why it didn't complain about libxft last night - that baffles me. I had to download it so it wasn't even on my pc.)

Using the Services applet, OK.

Right-clicking for bluemanManager in the menu, no response. I repeated in a terminal and got the above gtk problem. Loaded pygtk manually, then:

Code: [Select]


tc@box:~$ loadapp pygtk
pycairo.tcz: OK
pygobject.tcz: OK
pygtk.tcz: OK
tc@box:~$ blueman-manager
** Message: pygobject_register_sinkfunc is deprecated (GtkWindow)
** Message: pygobject_register_sinkfunc is deprecated (GtkInvisible)
** Message: pygobject_register_sinkfunc is deprecated (GtkObject)
Loading configuration plugins
_________
<module> (/usr/local/lib/python2.6/site-packages/blueman/main/Config.py:20)
Skipping plugin Gconf
No module named gconf
Using file config backend
_________
on_bluez_name_owner_changed (/usr/local/bin/blueman-manager:104)
org.bluez owner changed to  :1.0
Using file config backend
ERROR:dbus.proxies:Introspect error on org.blueman.Applet:/: dbus.exceptions.DBu.ception: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/local/bin/blueman-applet exited with status 1
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/site-packages/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/local/bin/blueman-manager", line 132, in on_bluez_name_owner_changed
    if not self.Applet.GetBluetoothStatus():
  File "/usr/local/lib/python2.6/site-packages/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/local/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/local/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBu.ception: org.freedesktop.DBus.Error.Spawn.ChildExited: Process /usr/local/bin/blueman-applet exited with status 1

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: bluez & blueman seem out of order
« Reply #4 on: September 01, 2010, 08:14:33 PM »
I have a script that runs after every boot that checks for updates, and automatically downloads if any are available.

I also just did a .dep update. That didn't make a difference.

I checked, on loading blueman, pygtk-2.7 is loaded but it still complains about it. So it seems like a dep problem to start with. Or perhaps bluemans needs to be comiled against py2.7? I wouldn't know, my knowledge is too limited and I haven't followed the python upgrade issue.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: bluez & blueman seem out of order
« Reply #5 on: September 01, 2010, 09:26:43 PM »
i think you have both python and python-2.7 installed
in this case if python-2.7 is installed after python, python2.7 overwrites the python executable from python 2.6
Code: [Select]
sudo ln -sf /usr/local/bin/python2.6 /usr/local/bin/python

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: bluez & blueman seem out of order
« Reply #6 on: September 01, 2010, 11:17:26 PM »
I am not sure at all what to do... I do indeed have python and python2.7 in /optional, just not sure how to proceed. Do I need to rename anything?

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: bluez & blueman seem out of order
« Reply #7 on: September 01, 2010, 11:21:03 PM »
i think you have both python and python-2.7 installed
in this case if python-2.7 is installed after python, python2.7 overwrites the python executable from python 2.6
Code: [Select]
sudo ln -sf /usr/local/bin/python2.6 /usr/local/bin/python

Code: [Select]

tc@box:~$ loadapp blueman
tcl_tk.tcz: OK
python-2.7.tcz: OK
pycairo-2.7.tcz: OK
libffi.tcz: OK
pygobject-2.7.tcz: OK
pygtk-2.7.tcz: OK
notify-python.tcz: OK
python.tcz: OK
dbus-python.tcz: OK
bluetooth-2.6.33.3-tinycore.tcz: OK
libusb.tcz: OK
bluez.tcz: OK
blueman.tcz: OK
tc@box:~$

Looks like python got loaded after python-2.7.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #8 on: September 01, 2010, 11:24:43 PM »
I think you'll need pycairo.tcz instead of pycairo-2.7.tcz, pygobject.tcz instead of pygobject-2.7.tcz, etc

This would be because blueman is working with files in "/usr/local/lib/python2.6/site-packages", rather than "/usr/local/lib/python2.7/site-packages"
« Last Edit: September 01, 2010, 11:29:14 PM by Juanito »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: bluez & blueman seem out of order
« Reply #9 on: September 02, 2010, 12:55:14 AM »
So that boils down to the dep files, as that list I posted is what tce-load -i blueman results in.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #10 on: September 02, 2010, 01:12:40 AM »
The culprit looks to be notify-python.tcz.dep, which reads:
Code: [Select]
libnotify.tcz
pygtk-2.7.tcz

As I had understood the python-2.7 migration plan, if an extension was going to use python-2.7 it should be named notify-python-2.7.tcz - but maybe I'm mistaken...

Maybe you could modify notify-python.tcz.dep to call pygtk.tcz in your local copy and see if this fixes things.

Edit: I just realised that the suggestion above would require using notify-python from the tc-2.x repo...

@Jason - I believe it would make sense to rename notify-python.tcz -> notify-python-2.7.tcz in the 3.x repo and copy notify-python.tcz from the 2.x repo to the 3.x repo, but I'll wait for your comfirmation
« Last Edit: September 02, 2010, 01:30:49 AM by Juanito »

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: bluez & blueman seem out of order
« Reply #11 on: September 02, 2010, 04:34:44 AM »
if you have a build script you can build blueman with python 2.7 too ;D

also i believe currently extensions dependent on notify-python 2.7 is a lot more than notify-python 2.6, maybe only blueman ? if so there is no need to rename notify-python to notify-python-2.7 instead you can copy tc 2.x notify-python to tc 3.x with the name notify-python-2.6
« Last Edit: September 02, 2010, 04:42:19 AM by Arslan S. »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #12 on: September 02, 2010, 05:17:10 AM »
In fact I have the following extensions in the queue to be re-built against python-2.7:
Code: [Select]
avahi.tcz
blueman.tcz
hplip.tcz
libgsf-gnome.tcz
libproxy.tcz
pil.tcz
pyserial.tcz
python_coherence.tcz
python_setuptools.tcz

..but the point is that I'd understood we were going to label all extensions built against python-2.7 with "-2.7" until all were done and then change everything from python-2.6 to python-2.7 at the same time, i.e. at that point:

1. Rename all python-2.6 extensions from "" -> "-2.6" -i.e. pygtk -> pygtk-2.6
2. Rename all python-2.7 extensions from "-2.7" to "" -i.e. pygtk-2.7 -> pygtk

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: bluez & blueman seem out of order
« Reply #13 on: September 02, 2010, 05:44:07 AM »
hmm i didn't know this. i have already updated my existing python extensions without python version or renamed later removing python version during update process gnome 2.28.x to 2.30.x
« Last Edit: September 02, 2010, 05:45:51 AM by Arslan S. »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14851
Re: bluez & blueman seem out of order
« Reply #14 on: September 03, 2010, 08:31:58 AM »
I renamed notify-python -> notify-python-2.7 and restored the python-2.6 version of notify-python.

@Arslan S: If you let me know which of your updated extensions need renaming "-2.7", I'll try to fix things.

@jur: a fresh download of blueman should now work.