Bluetooth & D-Bus, January 08

Core libraries and systems
Message
Author
User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#46 Post by Chewi »

Ah well. I wouldn't have thought DBus was slow, all it does is pass messages around. Maybe it needs some optimising.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#47 Post by Aitch »

He He

I would have thought your Libretto to be the perfect testbox for that :wink:

Even beats my IBM 560 @ 223mhz/64mb ram, but makes up for the 'speed' by having no native floppy or CD - & wifi & bluetooth is just greedy :lol:

well done!

Aitch

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#48 Post by Chewi »

Thanks!

Did a search for "dbus slow" out of interest and got this. It was a while ago though.
Most of the time in FOSS, people try to make the theory work before improving. That's why DBus is still unoptimised and really slow. It's slower than ORBit2/Bonobo !!
I also found this PDF, which does a benchmark. It says DBus is probably slower because it uses text rather than pointers. I knew that but like the author, I didn't expect it to be THAT much slower.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

tommy
Posts: 133
Joined: Tue 04 Oct 2005, 20:21
Location: Italy

Bluetooth in Puppy 4.00

#49 Post by tommy »

Hi everybody, I just want to write about my bluetooth experience in Puppy 4.00. Well, I don't need bluetooth at all, but I have an unused TRENDnet bluetooth usb dongle and I wanted to play with it to see the capabilities of tempestuous packages...
I installed the Dbus, the BlueZ, the Obex dotpet packages I found in page 1 of this thread, I edited the passkey in /etc/bluetooth/hcid.conf (and I found security user was already there instead of security auto), I modprobed all the necessary modules. Then I registered on my phone my bluetooth dongle ( this is the moment where your phone asks you the passkey you wrote in hcid.conf file).
Then I mounted the phone in /mnt/bluetooth with obexfs : this gave me this message:
shell-init: error retrieving current directory: getcwd: cannot access parent directory: No such file or device.

However I could browse my phone directories with Rox and transfer files from the phone to my PuppyPC. I tried to transfer a jpg file from my Pc to my Phone, and Rox gave me an error about something not implemented - failed. The file was successfully transferred to the phone, though!

So what can I say? Bluetooth file transfer in Puppy 4.00 was for me quite easy, and I'm not an expert linux user. But the transfer speed is very slow, I think it's about 10 kB/sec. (will there be a Rutilt-like app (or should I say Pwireless-like?) to see the signal strenght and max speed of bluetooth connections?).

Well, if you need to copy your pictures / videos from the phone to your PC and vice-versa, tempestuous' tutorial and Dotpet packages can help you a lot. Good work! :wink:

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

Re: Bluetooth in Puppy 4.00

#50 Post by John Doe »

tommy wrote:But the transfer speed is very slow, I think it's about 10 kB/sec.
perhaps the difference between 1.x vs 2.x?

great report, thanks for sharing.

paulski
Posts: 130
Joined: Fri 06 Oct 2006, 15:30
Location: Cologne, Germany &/or Perth, Australia

Script toolbox for 2 Nokia phones on bluetooth

#51 Post by paulski »

Thanks to the excellent work done in this thread I created a few scripts with an xdialog as a kind of script tool box allowing me to connect two different Nokia phone models (6230i and 7310) over a USB bluetooth device. Its still developmental but it may provide a start for others to make more intelligent scripts or at least a few ideas.
It should make the process a little easier for beginners.

So far it allows:
1- Basic USB HCI startup, Dbus and password agent
2- Scan for phones (hcitool scan)
3- Obex connections for the two phones with auto Rox filer opening
4- rfcomm ports for the phones allowing contacts, sms, calendar data to be used by either xgnokii or wammu with auto copying of the configuration scripts for these phones
5 Disconnect scripts for the phones

Unfortunately to get it up and running you need to modify details (phone model numbers and MAC addresses in filenames and scripts).

Have a look - try it, modify it break it- whatever.
If someone can find out how to parse MAC addresses from hcitool scan to other scripts and functions then it could easily be much more powerful.

EDIT: Found a way to parse it.!!
Now have a simplified Xdialog script (the toolbox4 nokia ....2a version) that autodetects the MAC of only one phone and allows you to connect it rfcomm or Obex.
No support for wammu or gammu in this one.
Should get some starters off the ground. May even work for a few non Nokia bluetooth phones.

For specific Nokia with Puppy issues see this thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=35321

Try to keep this bluetooth thread strictly bluetooth.
Attachments
toolbox4nokia-bluetooth-2a.tar.gz
(1.42 KiB) Downloaded 914 times
toolbox4nokia-bluetooth.tar.gz
(3.85 KiB) Downloaded 877 times
Last edited by paulski on Sat 15 Nov 2008, 16:46, edited 1 time in total.

Boneo
Posts: 44
Joined: Thu 06 Jul 2006, 23:48
Location: UK

#52 Post by Boneo »

I've just surprised myself and got my Microsoft 5000v1.0 bluetooth mouse working with my Acer Aspire One netbook, This is really a big step forward because I don't like the track pad. It's working well but unfortunately I suspect my mouse wont work after a reboot but at least this is a start.

Thanks to tempestuous (again) I followed most of things in his first post, There's no passkey with my mouse so in etc/bluetooth/hcid.conf file the default passkey is changed from "BlueZ" to being empty "" and so also in the entry passkey-agent --default &
I didn't need a channel number.
Moving on to advice from Caneri (thanks) I used hcitool scan whilst pressing the scan button on the mouse thus finding the MAC followed then by hidd -connect hardware address. I did earlier download the DBus packages but I'm not sure if these were necessary.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#53 Post by tempestuous »

Boneo wrote:I did earlier download the DBus packages but I'm not sure if these were necessary.
Unless there's something special about a bluetooth mouse, then D-Bus is absolutely essential. Without it the Bluetooth Host Controller Interface daemon (hcid) will fail to start.

Boneo
Posts: 44
Joined: Thu 06 Jul 2006, 23:48
Location: UK

MS Bluetooth Mouse 5000v1.0 working on an Acer Aspire One

#54 Post by Boneo »

Thanks folks, I've got my mouse working at bootup on my AA0 after getting eth0 and ath0 configured I moved onto bluetooth. I downloaded the 5 D-bus related packages from page one of this thread.

http://www.murga-linux.com/puppy/viewtopic.php?t=25009

I got an error message which I interpreted as needing to install libxcb-1.0 I did but I'm not sure if this was necessary.

In /etc/rc.d/rc.local the first two lines at the beginning are for the AA0's wifi LEDs. Here's the whole file contents. The MAC address is for my mouse which I discovered by following the earlier instructions.

W#this file called from rc.sysinit
#you can edit this file
#When firewall is installed, will append lines to this file...
modprobe evdev
sysctl -w dev.wifi0.ledpin=3
sysctl -w dev.wifi0.softled=1

rm -f /var/run/dbus/*
dbus-uuidgen --ensure
dbus-daemon --system
modprobe bluetooth
modprobe l2cap
modprobe rfcomm
modprobe hci-usb
hcid
sdpd
hciconfig hci0 class 0x3e0100
hcitool inq
passkey --default &
hcitool scan
hidd --connect "00:1B:D8:93:98:BD"

Hope this helps others.

Edit: For some reason sometimes the mouse isn't found at bootup and I'm having to run again in the console-
hidd --connect "00:1B:D8:93:98:BD"

Perhaps when the mouse is switched on is important.

2nd Edit: In the Startup directory I also created a file with the line
hidd --connect "00:1B:D8:93:98:BD"
This seems to increase the chance of connecting to the mouse. Typically at bootup I find there's a pause where it seems to me looking for the mouse then I press the scan button under the mouse.

testato
Posts: 1
Joined: Sun 23 Nov 2008, 20:02

#55 Post by testato »

Thanks for your work.
i have 2 problem:

- i found the phone end retrive the correctly the mac address but not found any service.

- If i try search puppy from the phone i not found the pc

ecke
Posts: 4
Joined: Wed 14 Jan 2009, 09:39

#56 Post by ecke »

Hello,

i had started the packages from tempestuous, but there i have the problem, that i get a message that the programm is installed, but there are many failure's.
So my question is, is it normal, that at the end of the installation the package-installer write so many failure's ???

Sorry, for my bad english!

Edwin

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#57 Post by Chewi »

I've just found out about an alternative bluetooth stack called Affix. I gather that it's a worthy alternative to Bluez though I haven't been able to find a single piece of information about why it was written or what makes it better than Bluez. I haven't tried it myself but I suspect it doesn't require HAL/DBus. Maybe it's worth a look?
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#58 Post by Aitch »

Hi Chewi

It seems to me that Bluez is currently well supported, whereas Affix documentation, at least, is 2001 Nokia copyright

There may be circumstances where affix can connect devices which fail with Bluez - like you, untested [good find, btw]

I don't know if Béèm ever got his bluetooth problem sorted, it was a while ago......?

Aitch :)

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#59 Post by Chewi »

Hmm I hadn't noticed that it hasn't been update since 2005. Oh well.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

User avatar
gary101
Posts: 555
Joined: Sun 08 Oct 2006, 09:51
Location: Boston, Lincs. UK

#60 Post by gary101 »

Hi

I am just taking my first steps into bluetooth, the ultimate aim for me is being able to use a bluetooth headset with skype.

I have installed all the pets I need from this thread apart from one that gives an error message about expanding into its own directory in .packages.

The problem pet is Bluetooth-alsa-sbc+plugz.pet and I am running 4.12

I have downloaded several times in case of a corrupt download and cleaned up .packages on each failed install.

When downloaded the file is named with a % instead of a + and I have renamed before install with no success.

I am wondering if this problem is just with 4.12. can anyone give me any pointers to getting this package installed?

All the best

Gary

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#61 Post by Chewi »

plugz is considered obsolete now. All you need now is Bluez 3.16 and ALSA. See this wiki page. I've successfully done it this way on Gentoo but if you're walking around and it starts losing signal, things can get a bit flakey. I'm waiting for PulseAudio to finish adding its bluetooth support, though that wouldn't be appropriate for Puppy.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

User avatar
gary101
Posts: 555
Joined: Sun 08 Oct 2006, 09:51
Location: Boston, Lincs. UK

#62 Post by gary101 »

Thanks for your reply Chewi

I was having a look at the page you linked as it looked simpler than some of the other ways I have seen.

However the reason I was asking about the Bluetooth-alsa-sbc+plugz.pet is that I thought it would provide /.asoundrc as I don't have this file to modify.

The bluez libs firmware and utils I have installed are all 3.24 so I presume these are OK

" 1, Make sure the audio service is installed
2, modify your ~/.asoundrc to contain...."

I am also presuming that I need to install the "audio service", is there a pet for this?

Cheers
Gary

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#63 Post by Chewi »

The .asoundrc file isn't usually needed so it doesn't usually exist. Just create an empty file with that stuff in it. The system-wide version is located at /etc/asound.conf.

The audio service is part of Bluez and is probably enabled by default.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

Antilles
Posts: 17
Joined: Wed 07 Jan 2009, 11:26

#64 Post by Antilles »

Hi,

I'm trying to pair an Intemp Bluetooth speaker with my 4.12 puppy and having some trouble.

I've performed the steps in the first post (installing Bluez, modprobe, etc) and all went well.

Using hcitool scan and info find my speaker. When I use sdptool I get information back but nothing mentions a channel.

Now when I use hcitool cc to connect that completes but does not output anything and using hcitool conn shows nothing.

It looks like I'm failing to create a pairing with my speakers. Can anyone suggest what I should look for to get this to work.

One thing to note is the speaker instructions say that they only support A2DP profiles. How do I make sure that the connection is an A2DP connection as that might be the problem.

Can anyone provide any suggestions?

Thanks

User avatar
Chewi
Posts: 30
Joined: Sun 17 Aug 2008, 13:37
Location: Perth, Scotland

#65 Post by Chewi »

Just so people know, I'm vaguely thinking about updating these packages to Bluez 4.

It doesn't need any extra dependencies but the C version of the command line passkey agent isn't fully working right now. In fact, the version in the official tree doesn't work at all. There is a Python version that works but Puppy doesn't include Python.

Other userspace tools such as hidd have also disappeared in favour of applets that interact with D-Bus directly. The available applets aren't suitable for Puppy and someone would probably have to write a new one, similar to the other configuration tools it has. This probably isn't as difficult as it sounds.
Running Puppy 4.00 on a [i]Toshiba Libretto 70CT[/i]. That's a [b]Pentium 120MMX[/b], [b]32MB RAM[/b] machine the size of a [b]VHS cassette[/b]! It works like a charm. I even have [b]wireless[/b] (WPA) and [b]Bluetooth[/b]. :D

Post Reply