2009-08-03 18:24:04

by Andreas Volz

[permalink] [raw]
Subject: Adressbook with bluez?

Hello,

I like to read out the address book of my bluetooth phone with bluez. I
didn't find any info about this.

Is this possible?

If not, what is missing in the implementation to get it working?

regards
Andreas


2009-08-06 21:41:12

by Andreas Volz

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Am Thu, 6 Aug 2009 17:44:22 -0300 schrieb Rafael Seste:

Hello Rafael,

Yes, this is what I need!

Does someone know a lib to parse vcards? Or has anyone wrote some C++
classes for it? Only to save me some stupid double work. On the first
look the data looks easy, but if I look deeper into the vcard spec than
I get a headache... :-)

regards
Andreas

> You can find the bluez version of PBAP in the obex packet.
>
> http://www.bluez.org/obexd-015/
>
>
>
> On Thu, Aug 6, 2009 at 5:37 PM, Andreas Volz<[email protected]>
> wrote:
> > Am Thu, 06 Aug 2009 20:57:29 +0200 schrieb Per Thomas Jahr:
> >
> >> On Tue, 2009-08-04 at 07:49 +0200, Artem Makhutov wrote:
> >> > > If not, what is missing in the implementation to get it
> >> > > working?
> >> >
> >> > You need to send special AT-Commands over the rfcomm like to the
> >> > phone.
> >>
> >> I guess also the Bluetooth profiles PBAP and PAB can be used for
> >> this? Have no idea if bluez supports those profiles yet (some
> >> googling indicates that they are being worked on).
> >>
> >> See:
> >> http://en.wikipedia.org/wiki/Bluetooth_profile#Phone_Book_Access_Profile_.28PBAP.2C_PBA.29
> >
> > I found this:
> >
> > http://gitorious.org/bluez-sap/bluez-sap/commit/e5fb1b8e7c900f6d9f9aebab0f77a20dbfec3121
> >
> > Does someone know more about this. (I wrote also an E-Mail to the
> > commiter).
> >
> > regards
> > Andreas
> > --
> > To unsubscribe from this list: send the line "unsubscribe
> > linux-bluetooth" in the body of a message to
> > [email protected] More majordomo info at
> >  http://vger.kernel.org/majordomo-info.html
> >
>
>
>
> --
> Rafael S. Seste
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-bluetooth" in the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

2009-08-06 21:20:47

by Rafael Seste

[permalink] [raw]
Subject: Re: Adressbook with bluez?

On Thu, Aug 6, 2009 at 5:57 PM, Andreas Volz<[email protected]> wrote:
>
> I found some docs about Nokia (fitting for me) AT commands:
>
> http://www.activexperts.com/xmstoolkit/atcommands/nokia/
>
> I see that it's also possible to do stuff (e.g. initiate a call) that
> works also with HFP. I assume this is better to do with a defined
> protocol, not? (e.g. with HFP for Linux[1]).
>
> regards
> Andreas
>
> [1] http://nohands.sourceforge.net
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>


This python scripts returns the first five contacts from the default
phonebook using handsfree profile it works for my nokia phone.

#!/usr/bin/python
import bluetooth

sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
conn = sock.connect((<bluetooth device address>, <HF port>))

sock.send("AT+CPBR=1,5\r")
print sock.recv(1024)
print sock.recv(1024)
print sock.recv(1024)
print sock.recv(1024)
print sock.recv(1024)
print sock.recv(1024)

sock.close()


--
Rafael S. Seste

2009-08-06 20:57:26

by Andreas Volz

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Am Thu, 6 Aug 2009 12:05:46 +0200 schrieb Artem Makhutov:

> Hi,
>
> On Tue, Aug 04, 2009 at 06:32:08PM +0200, Andreas Volz wrote:
> > Am Tue, 4 Aug 2009 07:49:28 +0200 schrieb Artem Makhutov:
> >
> > > Hello,
> > >
> > > n Mon, Aug 03, 2009 at 08:24:04PM +0200, Andreas Volz wrote:
> > > > Hello,
> > > >
> > > > I like to read out the address book of my bluetooth phone with
> > > > bluez. I didn't find any info about this.
> > > >
> > > > Is this possible?
> > > >
> > > > If not, what is missing in the implementation to get it working?
> > >
> > > You need to send special AT-Commands over the rfcomm like to the
> > > phone.
> >
> > Thanks for your fast answer?
> >
> > How should I do this practically? Could I use minicom? Could I
> > simply open /dev/rfcomm0 and read and write on it?
>
> Yes, you can do it this way.
>
> > What commands should I send?
> >
> > Are there some more docs/examples about this or could you give me
> > more information?
>
> I don't know the commands, but you should be able to find them in the
> internet. Just search for AT Command Refernece.
>
> The commands are also different between the vendors. Each vendor has
> custom AT Commands.

I found some docs about Nokia (fitting for me) AT commands:

http://www.activexperts.com/xmstoolkit/atcommands/nokia/

I see that it's also possible to do stuff (e.g. initiate a call) that
works also with HFP. I assume this is better to do with a defined
protocol, not? (e.g. with HFP for Linux[1]).

regards
Andreas

[1] http://nohands.sourceforge.net


2009-08-06 20:44:22

by Rafael Seste

[permalink] [raw]
Subject: Re: Adressbook with bluez?

You can find the bluez version of PBAP in the obex packet.

http://www.bluez.org/obexd-015/



On Thu, Aug 6, 2009 at 5:37 PM, Andreas Volz<[email protected]> wrote:
> Am Thu, 06 Aug 2009 20:57:29 +0200 schrieb Per Thomas Jahr:
>
>> On Tue, 2009-08-04 at 07:49 +0200, Artem Makhutov wrote:
>> > > If not, what is missing in the implementation to get it working?
>> >
>> > You need to send special AT-Commands over the rfcomm like to the
>> > phone.
>>
>> I guess also the Bluetooth profiles PBAP and PAB can be used for this?
>> Have no idea if bluez supports those profiles yet (some googling
>> indicates that they are being worked on).
>>
>> See:
>> http://en.wikipedia.org/wiki/Bluetooth_profile#Phone_Book_Access_Profile_.28PBAP.2C_PBA.29
>
> I found this:
>
> http://gitorious.org/bluez-sap/bluez-sap/commit/e5fb1b8e7c900f6d9f9aebab0f77a20dbfec3121
>
> Does someone know more about this. (I wrote also an E-Mail to the
> commiter).
>
> regards
> Andreas
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>



--
Rafael S. Seste

2009-08-06 20:37:46

by Andreas Volz

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Am Thu, 06 Aug 2009 20:57:29 +0200 schrieb Per Thomas Jahr:

> On Tue, 2009-08-04 at 07:49 +0200, Artem Makhutov wrote:
> > > If not, what is missing in the implementation to get it working?
> >
> > You need to send special AT-Commands over the rfcomm like to the
> > phone.
>
> I guess also the Bluetooth profiles PBAP and PAB can be used for this?
> Have no idea if bluez supports those profiles yet (some googling
> indicates that they are being worked on).
>
> See:
> http://en.wikipedia.org/wiki/Bluetooth_profile#Phone_Book_Access_Profile_.28PBAP.2C_PBA.29

I found this:

http://gitorious.org/bluez-sap/bluez-sap/commit/e5fb1b8e7c900f6d9f9aebab0f77a20dbfec3121

Does someone know more about this. (I wrote also an E-Mail to the
commiter).

regards
Andreas

2009-08-06 18:57:29

by Per Thomas Jahr

[permalink] [raw]
Subject: Re: Adressbook with bluez?

On Tue, 2009-08-04 at 07:49 +0200, Artem Makhutov wrote:
> > If not, what is missing in the implementation to get it working?
>
> You need to send special AT-Commands over the rfcomm like to the phone.

I guess also the Bluetooth profiles PBAP and PAB can be used for this?
Have no idea if bluez supports those profiles yet (some googling
indicates that they are being worked on).

See:
http://en.wikipedia.org/wiki/Bluetooth_profile#Phone_Book_Access_Profile_.28PBAP.2C_PBA.29


Regards
--
Per Thomas Jahr


2009-08-06 10:05:46

by Artem Makhutov

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Hi,

On Tue, Aug 04, 2009 at 06:32:08PM +0200, Andreas Volz wrote:
> Am Tue, 4 Aug 2009 07:49:28 +0200 schrieb Artem Makhutov:
>
> > Hello,
> >
> > n Mon, Aug 03, 2009 at 08:24:04PM +0200, Andreas Volz wrote:
> > > Hello,
> > >
> > > I like to read out the address book of my bluetooth phone with
> > > bluez. I didn't find any info about this.
> > >
> > > Is this possible?
> > >
> > > If not, what is missing in the implementation to get it working?
> >
> > You need to send special AT-Commands over the rfcomm like to the
> > phone.
>
> Thanks for your fast answer?
>
> How should I do this practically? Could I use minicom? Could I simply
> open /dev/rfcomm0 and read and write on it?

Yes, you can do it this way.

> What commands should I send?
>
> Are there some more docs/examples about this or could you give me more
> information?

I don't know the commands, but you should be able to find them in the internet.
Just search for AT Command Refernece.

The commands are also different between the vendors. Each vendor has custom AT Commands.

Regards, Artem

2009-08-04 16:32:08

by Andreas Volz

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Am Tue, 4 Aug 2009 07:49:28 +0200 schrieb Artem Makhutov:

> Hello,
>
> n Mon, Aug 03, 2009 at 08:24:04PM +0200, Andreas Volz wrote:
> > Hello,
> >
> > I like to read out the address book of my bluetooth phone with
> > bluez. I didn't find any info about this.
> >
> > Is this possible?
> >
> > If not, what is missing in the implementation to get it working?
>
> You need to send special AT-Commands over the rfcomm like to the
> phone.

Thanks for your fast answer?

How should I do this practically? Could I use minicom? Could I simply
open /dev/rfcomm0 and read and write on it?

What commands should I send?

Are there some more docs/examples about this or could you give me more
information?

regards
Andreas

2009-08-04 05:49:28

by Artem Makhutov

[permalink] [raw]
Subject: Re: Adressbook with bluez?

Hello,

n Mon, Aug 03, 2009 at 08:24:04PM +0200, Andreas Volz wrote:
> Hello,
>
> I like to read out the address book of my bluetooth phone with bluez. I
> didn't find any info about this.
>
> Is this possible?
>
> If not, what is missing in the implementation to get it working?

You need to send special AT-Commands over the rfcomm like to the phone.

Regards, Artem