2006-08-19 16:31:21

by Jaime Alberto Silva

[permalink] [raw]
Subject: [Bluez-users] libbluetooth usage

Hi everyone!

Can someone please point me to some documentation about libbluetooth usage?

How can I use this library to establish comunication with a BT device?

I'm trying to write a program in J2ME for my Nokia 6670 that
communicates with my Linux PC via RFCOMM. If I use the rfcomm utility
like this:

# rfcomm bind 0 00:02:5B:00:A5:A5

All I have to do is write a program that opens the rfcomm0 serial port
and waits for data? How can I detect when the client connects?

How do I use the RFCOMM socket interface?


Thanks in advance for your attention and any help you can bring me.

--
Jaime Alberto Silva L I N U X .~.
The Choice /V\
of a GNU / ( ) \
Generation ^^-^^

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2006-08-20 03:07:43

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] libbluetooth usage

Hi Jaime,

> > > Can someone please point me to some documentation about libbluetooth usage?
> > >
> > > How can I use this library to establish comunication with a BT device?
> > >
> > > I'm trying to write a program in J2ME for my Nokia 6670 that
> > > communicates with my Linux PC via RFCOMM. If I use the rfcomm utility
> > > like this:
> > >
> > > # rfcomm bind 0 00:02:5B:00:A5:A5
> > >
> > > All I have to do is write a program that opens the rfcomm0 serial port
> > > and waits for data? How can I detect when the client connects?
> >
> > who is the client?
>
> The client is the phone, the PC will have an application waiting for
> connections from the phone.

then you are looking for "rfcomm listen" and not "rfcomm bind".

> > > How do I use the RFCOMM socket interface?
> >
> > The programs rctest.c and attest.c give a good example on how to use the
> > RFCOMM socket interface.
>
> Hmm, I guess those doesn't come in the Debian packages, Where can I find them?

They are part of bluez-utils source package.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-20 00:23:22

by Jaime Alberto Silva

[permalink] [raw]
Subject: Re: [Bluez-users] libbluetooth usage

Hi Marcel,

On 8/19/06, Marcel Holtmann <[email protected]> wrote:
> Hi Jaime,
>
> > Can someone please point me to some documentation about libbluetooth usage?
> >
> > How can I use this library to establish comunication with a BT device?
> >
> > I'm trying to write a program in J2ME for my Nokia 6670 that
> > communicates with my Linux PC via RFCOMM. If I use the rfcomm utility
> > like this:
> >
> > # rfcomm bind 0 00:02:5B:00:A5:A5
> >
> > All I have to do is write a program that opens the rfcomm0 serial port
> > and waits for data? How can I detect when the client connects?
>
> who is the client?

The client is the phone, the PC will have an application waiting for
connections from the phone.

>
> > How do I use the RFCOMM socket interface?
>
> The programs rctest.c and attest.c give a good example on how to use the
> RFCOMM socket interface.

Hmm, I guess those doesn't come in the Debian packages, Where can I find them?


--
Jaime Alberto Silva L I N U X .~.
The Choice /V\
of a GNU / ( ) \
Generation ^^-^^

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-08-20 01:35:32

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] libbluetooth usage

Hi Jaime,

> Can someone please point me to some documentation about libbluetooth usage?
>
> How can I use this library to establish comunication with a BT device?
>
> I'm trying to write a program in J2ME for my Nokia 6670 that
> communicates with my Linux PC via RFCOMM. If I use the rfcomm utility
> like this:
>
> # rfcomm bind 0 00:02:5B:00:A5:A5
>
> All I have to do is write a program that opens the rfcomm0 serial port
> and waits for data? How can I detect when the client connects?

who is the client?

> How do I use the RFCOMM socket interface?

The programs rctest.c and attest.c give a good example on how to use the
RFCOMM socket interface.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users