Skip to contentSkip to conversation

How I can select between 2 bluetooth devices?

Bluez-devel Fernando Unzu 3 participants 6 messages May 16, 2007 – May 18, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,
I'm working in an application that scans for bluetooth devices and send some content to they...

Due to several issues, I need to separate the action scan and send between two devices...

I have the code for doing this in one bluetooth device, and I don't know very well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to use to doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the conection..., but it can be select which bluetooth device select for doing this handle?

Thank you very much and I hope somebody understand me.

Fernando

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#1 lore raw

Hi, Fernando

If i am not wrong u have 2 Dongles and u want to use one for scan and other for file send... ??

am I right ...

Quoted 36 lines · Fernando Unzu

Hello,
I'm working in an application that scans for bluetooth devices and send some
content to they...

Due to several issues, I need to separate the action scan and send between two
devices...

I have the code for doing this in one bluetooth device, and I don't know very
well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to use to
doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the conection..., but
it can be select which bluetooth device select for doing this handle?

Thank you very much and I hope somebody understand me.

Fernando

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 5 lines
Impossible
itself contain
I M Possible

Vikas

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

Hi Vikas,
Yes, this is I want to achieve.

I don't understand very well the code, but I uses OBEX_GetUserData, =

OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete, =

OBEX_TransportConnect and more like these, and in all of them I use a Handl= e, =

created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event, 0).

So I Think this is the way..., but I don't know if it is, or how to do...

in other functions I use hci_create_connection to create the handle, I thin= k.

How you can see, I don't understand good the code.

How I can separate the two dongles to doing separated functions?

Thanks a lot,
Fernando

El Jueves, 17 de Mayo de 2007 07:05, Vikas Sinha escribi=F3:

Quoted 3 lines

Hi, Fernando

If i am not wrong u have 2 Dongles and u want to use one for scan and oth=

er

Quoted 23 lines

for file send... ??

am I right ...

Quoted 18 lines · Fernando Unzu

Hello,
I'm working in an application that scans for bluetooth devices and send some
content to they...

Due to several issues, I need to separate the action scan and send between two
devices...

I have the code for doing this in one bluetooth device, and I don't know very
well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to use to
doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the conection..=

.,

Quoted 8 lines
Quoted 8 lines

but
it can be select which bluetooth device select for doing this handle?

Thank you very much and I hope somebody understand me.

Fernando

-----------------------------------------------------------------------=

--

Quoted 8 lines
Quoted 8 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

you can do this in a very simple way, just do the connect by hand (bind to a specific bluetooth device before connect) then pass the file descriptor to the OBEX library. OBEX will run in normal FD (file descriptor) mode then. For this to work you also need to do the sdp lookup yourself, but this is easy.

Collin

Quoted 9 lines · Fernando Unzu

Hi Vikas,
Yes, this is I want to achieve.
=

I don't understand very well the code, but I uses OBEX_GetUserData, =

OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete, =

OBEX_TransportConnect and more like these, and in all of them I use a Han=

dle, =

Quoted 7 lines

created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event, 0). =

So I Think this is the way..., but I don't know if it is, or how to do... =

in other functions I use hci_create_connection to create the handle, I th=

ink.

Quoted 8 lines

=

How you can see, I don't understand good the code. =

How I can separate the two dongles to doing separated functions? =

Quoted 10 lines

Thanks a lot,
Fernando
=

=

El Jueves, 17 de Mayo de 2007 07:05, Vikas Sinha escribi=F3:

Quoted 3 lines

Hi, Fernando

If i am not wrong u have 2 Dongles and u want to use one for scan and o=

ther

Quoted 7 lines
Quoted 7 lines

for file send... ??

am I right ...

Quoted 2 lines · Fernando Unzu

Hello,
I'm working in an application that scans for bluetooth devices and se=

nd

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

some
content to they...

Due to several issues, I need to separate the action scan and send between two
devices...

I have the code for doing this in one bluetooth device, and I don't k=

now

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

very
well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to =

use

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

to
doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the conection=

...,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

but
it can be select which bluetooth device select for doing this handle?

Thank you very much and I hope somebody understand me.

Fernando

---------------------------------------------------------------------=

----

Quoted 10 lines
Quoted 8 lines
Quoted 8 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

=

Quoted 9 lines

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger [email protected]
Life is hard, but unfair!

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

I think Collin said is right ,
See for scanning u need to have hci layer api while for file transfer u need OBEX.
for scanning bind device before calling scan function. hci_inquiry(iDevId, iSECOND, iMAXDEV, NULL, &inqinfo, IREQ_CACHE_FLUSH)) This DevId is device Id(file descriptor).

while for File sending u can call
handle = __obex_connect(devid, addr, timeout, &err); here again devid is FD .

so by this u can differentiate 2 dongles.

Quoted 111 lines · Collin R. Mulliner

you can do this in a very simple way, just do the connect by hand (bind to a specific bluetooth device before connect) then pass the file descriptor to the OBEX library. OBEX will run in normal FD (file descriptor) mode then. For this to work you also need to do the sdp lookup yourself, but this is easy.

Collin

Quoted 6 lines · Fernando Unzu

Hi Vikas,
Yes, this is I want to achieve.

I don't understand very well the code, but I uses OBEX_GetUserData, OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete, OBEX_TransportConnect and more like these, and in all of them I use a

Handle,

Quoted 3 lines

created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event, 0).

So I Think this is the way..., but I don't know if it is, or how to

do...

Quoted 2 lines

in other functions I use hci_create_connection to create the handle, I

think.

Quoted 13 lines

How you can see, I don't understand good the code.

How I can separate the two dongles to doing separated functions?

Thanks a lot,
Fernando

Quoted 3 lines · Vikas Sinha

Hi, Fernando

If i am not wrong u have 2 Dongles and u want to use one for scan and

other

Quoted 7 lines
Quoted 7 lines

for file send... ??

am I right ...

Quoted 2 lines · Fernando Unzu

Hello,
I'm working in an application that scans for bluetooth devices and

send

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

some
content to they...

Due to several issues, I need to separate the action scan and send between two
devices...

I have the code for doing this in one bluetooth device, and I don't

know

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

very
well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to

use

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

to
doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the

conection...,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but
it can be select which bluetooth device select for doing this

handle?

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Thank you very much and I hope somebody understand me.

Fernando

-------------------------------------------------------------------------

Quoted 10 lines
Quoted 8 lines
Quoted 8 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------------------------

Quoted 8 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger [email protected]
Life is hard, but unfair!

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Signature · 5 lines
Impossible
itself contain
I M Possible

Vikas

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

I think all you said to me will be very usefull.

Thank you very much, Colin, Vikas.

Soon I implement the new solution you propose.

Thanks a lot.

El Jueves, 17 de Mayo de 2007 12:55, Vikas Sinha escribi=F3:

Quoted 7 lines

I think Collin said is right ,
See for scanning u need to have hci layer api while for file transfer u need OBEX.
for scanning bind device before calling scan function. hci_inquiry(iDevId, iSECOND, iMAXDEV, NULL, &inqinfo, IREQ_CACHE_FLUSH)) This DevId is device Id(file descriptor).

Quoted 46 lines

while for File sending u can call
handle =3D __obex_connect(devid, addr, timeout, &err); here again devid is FD .

so by this u can differentiate 2 dongles.

Quoted 39 lines · Collin R. Mulliner

you can do this in a very simple way, just do the connect by hand (bind to a specific bluetooth device before connect) then pass the file descriptor to the OBEX library. OBEX will run in normal FD (file descriptor) mode then. For this to work you also need to do the sdp lookup yourself, but this is easy.

Collin

Quoted 6 lines · Fernando Unzu

Hi Vikas,
Yes, this is I want to achieve.

I don't understand very well the code, but I uses OBEX_GetUserData, OBEX_HandleInput, OBEX_CancelRequest, OBEX_ObjectNew, OBEX_Delete, OBEX_TransportConnect and more like these, and in all of them I use a

Handle,

Quoted 3 lines

created by OBEX_Init (OBEX_TRANS_BLUETOOTH, obex_event, 0).

So I Think this is the way..., but I don't know if it is, or how to

do...

Quoted 1 line

in other functions I use hci_create_connection to create the handle, I

think.

Quoted 11 lines

How you can see, I don't understand good the code.

How I can separate the two dongles to doing separated functions?

Thanks a lot,
Fernando

El Jueves, 17 de Mayo de 2007 07:05, Vikas Sinha escribi=F3:

Quoted 3 lines

Hi, Fernando

If i am not wrong u have 2 Dongles and u want to use one for scan a=

nd

Quoted 13 lines
Quoted 13 lines

other

Quoted 7 lines
Quoted 7 lines

for file send... ??

am I right ...

Quoted 2 lines · Fernando Unzu

Hello,
I'm working in an application that scans for bluetooth devices and

send

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

some
content to they...

Due to several issues, I need to separate the action scan and send between two
devices...

I have the code for doing this in one bluetooth device, and I don=

't

Quoted 21 lines
Quoted 21 lines

know

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

very
well how it works, but I have read it some times...

But I don't find where i can select which bluetooth device I want to

use

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

to
doing one method or other...

I have seen that "OBEX_Init" creates a handle to manage the

conection...,

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

but
it can be select which bluetooth device select for doing this

Quoted 7 lines
Quoted 7 lines

handle?

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Thank you very much and I hope somebody understand me.

Fernando

-----------------------------------------------------------------------=

--

Quoted 11 lines
Quoted 11 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-----------------------------------------------------------------------=

--

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Quoted 8 lines
Quoted 8 lines

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger [email protected]
Life is hard, but unfair!

-----------------------------------------------------------------------=

--

Quoted 8 lines
Quoted 8 lines

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel