From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: From: "Albert Huang" To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] Selection of Local module.... In-Reply-To: <000901c65da5$7f680bb0$0300a8c0@akira> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5927_32623859.1144793415323" References: <049f01c65cb0$0d478bf0$0300a8c0@akira> <000c01c65ccf$d8af7180$0300a8c0@akira> <000901c65da5$7f680bb0$0300a8c0@akira> Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Tue, 11 Apr 2006 18:10:15 -0400 ------=_Part_5927_32623859.1144793415323 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Sir Graham, Good to hear. yes, it can be 0. -albert On 4/11/06, Sir Graham (Terra) wrote: > > Hi Albert. > > WORKS! > > However... In the Local address.... the port variable I think is not > important... can be to 0? Or must I make put special port? > > Best Regards, > Sir Graham. > > ----- Original Message ----- > *From:* Albert Huang > *To:* bluez-devel@lists.sourceforge.net > *Sent:* Tuesday, April 11, 2006 9:29 PM > *Subject:* Re: [Bluez-devel] Selection of Local module.... > > Hi Sir Graham, > > This works when you make a server conexion.... but... When you create a= client function works also the bind function? > > > > Feel free to try it out before you believe me. > > Regards, > Albert > ------=_Part_5927_32623859.1144793415323 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Sir Graham,

Good to hear.  yes, it can be 0.

-albert<= br>
On 4/11/06, Sir Graham (Terra) <s= ir__graham@terra.es > wrote:
Hi Albert.
 
WORKS!
 
However... In the Local address.... th= e port=20 variable I think is not important... can be to 0?   =20 Or     must I make put special port?
 
Best Regards,
Sir Graham.
----- Original Message -----
Sent: Tuesday, April 11, 2006 9:29= =20 PM
Subject: Re: [Bluez-devel] Selecti= on of=20 Local module....

Hi Sir Graham,

This works when you make a server = conexion....=20 but... When you create a cl= ient function=20 works also the bind function?

Feel free to try it out before you believe=20 me.

Regards,
Albert

------=_Part_5927_32623859.1144793415323-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <000901c65da5$7f680bb0$0300a8c0@akira> From: "Sir Graham (Terra)" To: References: <049f01c65cb0$0d478bf0$0300a8c0@akira> <000c01c65ccf$d8af7180$0300a8c0@akira> Subject: Re: [Bluez-devel] Selection of Local module.... MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0006_01C65DB6.39925440" Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Tue, 11 Apr 2006 22:21:05 +0200 This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C65DB6.39925440 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Albert. WORKS! However... In the Local address.... the port variable I think is not = important... can be to 0? Or must I make put special port? Best Regards, Sir Graham. ----- Original Message -----=20 From: Albert Huang=20 To: bluez-devel@lists.sourceforge.net=20 Sent: Tuesday, April 11, 2006 9:29 PM Subject: Re: [Bluez-devel] Selection of Local module.... Hi Sir Graham, This works when you make a server conexion.... but... When you = create a client function works also the bind function? Feel free to try it out before you believe me. Regards, Albert ------=_NextPart_000_0006_01C65DB6.39925440 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Albert.
 
WORKS!
 
However... In the Local address.... the = port=20 variable I think is not important... can be to 0?    = Or     must I make put special = port?
 
Best Regards,
Sir Graham.
----- Original Message -----
From:=20 Albert=20 Huang
To: bluez-devel@lists.sourc= eforge.net=20
Sent: Tuesday, April 11, 2006 = 9:29=20 PM
Subject: Re: [Bluez-devel] = Selection of=20 Local module....

Hi Sir Graham,

This works when you make a server = conexion....=20 but... When you create a = client function=20 works also the bind function?

Feel free to try it out before you believe=20 = me.

Regards,
Albert
------=_NextPart_000_0006_01C65DB6.39925440-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: From: "Albert Huang" To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] Selection of Local module.... In-Reply-To: <000c01c65ccf$d8af7180$0300a8c0@akira> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5028_12544642.1144783746417" References: <049f01c65cb0$0d478bf0$0300a8c0@akira> <000c01c65ccf$d8af7180$0300a8c0@akira> Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Tue, 11 Apr 2006 15:29:06 -0400 ------=_Part_5028_12544642.1144783746417 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Sir Graham, This works when you make a server conexion.... but... When you create aclient function works also the bind function? > Feel free to try it out before you believe me. Regards, Albert ------=_Part_5028_12544642.1144783746417 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Sir Graham,

This works when you make a server conexion....=20 but... When you create a client= function=20 works also the bind function?

Feel = free to try it out before you believe me.

Regards,
Albert
------=_Part_5028_12544642.1144783746417-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <000c01c65ccf$d8af7180$0300a8c0@akira> From: "Sir Graham (Terra)" To: References: <049f01c65cb0$0d478bf0$0300a8c0@akira> Subject: Re: [Bluez-devel] Selection of Local module.... MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0009_01C65CE0.92412390" Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 10 Apr 2006 20:51:42 +0200 This is a multi-part message in MIME format. ------=_NextPart_000_0009_01C65CE0.92412390 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Thanks for you answer.... This works when you make a server conexion.... but... When you create a = client function works also the bind function?=20 you see the function attachment to my first message. If I put a bind = call in this function (client connect funcion) can i select the local = bluetooth device?=20 Regards, Sir Graham. ----- Original Message -----=20 From: Albert Huang=20 To: bluez-devel@lists.sourceforge.net=20 Sent: Monday, April 10, 2006 7:37 PM Subject: Re: [Bluez-devel] Selection of Local module.... bind() to the address and channel of the local adapter you want to use = before the call to connect() -albert On 4/10/06, Sir Graham (Terra) < sir__graham@terra.es> wrote: Hi, I need to use two bluetooth devices in the same computer with BlueZ. How can I select (with socket) the device local that I like make a = conexion? If I make a simple conexion... Can I select what of my local modules = (HCI0 or HCI1) makes this conexion? #include #include #include #include #include int main(int argc, char **argv) { struct sockaddr_rc addr =3D { 0 }; int s, status; char dest[18] =3D "01:23:45:67:89:AB"; // allocate a socket s =3D socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); // set the connection parameters (who to connect to) addr.rc_family =3D AF_BLUETOOTH; addr.rc_channel =3D (uint8_t) 1; str2ba( dest, &addr.rc_bdaddr ); // connect to server status =3D connect(s, (struct sockaddr *)&addr, sizeof(addr)); // send a message if( status =3D=3D 0 ) { status =3D write(s, "hello!", 6); } if( status < 0 ) perror("uh oh"); close(s); return 0; } Can I select what of my local modules (HCI0 or HCI1) makes this = conexion? =20 Where can I select (in the example) what local module use? = =BF=BF=BF??? Regards, Sir Graham. ------=_NextPart_000_0009_01C65CE0.92412390 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
Thanks for you answer....
 
This works when you make a server = conexion....=20 but... When you create a client = function=20 works also the bind function?
 
you see the function attachment to my = first=20 message. If I put a bind call in this function (client = connect=20 funcion) can i select the local bluetooth = device? 
 
Regards,
Sir Graham.
 
 
----- Original Message -----
From:=20 Albert = Huang=20
To: bluez-devel@lists.sourc= eforge.net=20
Sent: Monday, April 10, 2006 = 7:37=20 PM
Subject: Re: [Bluez-devel] = Selection of=20 Local module....

bind() to the address and channel of the local adapter = you want=20 to use before the call to connect()

-albert

On 4/10/06, Sir Graham=20 (Terra) <=20 sir__graham@terra.es> wrote:
Hi,
 
I need to use two bluetooth = devices in=20 the same computer with BlueZ.
 
How  can I select = (with socket)=20 the device local that I like make a = conexion?
 
 
If I make a simple = conexion... Can I=20 select what of my local modules (HCI0 or HCI1) makes this=20 conexion?
 
 
#include = <stdio.h>
#include=20 <unistd.h>
#include <sys/socket.h>
#include=20 <bluetooth/bluetooth.h>
#include=20 <bluetooth/rfcomm.h>

int main(int argc, char=20 **argv)
{
    struct sockaddr_rc addr =3D { 0=20 };
    int s, status;
    char = dest[18]=20 =3D "01:23:45:67:89:AB";

    // allocate a=20 socket
    s =3D socket(AF_BLUETOOTH, SOCK_STREAM, = BTPROTO_RFCOMM);

    // set the connection = parameters=20 (who to connect to)
    addr.rc_family =3D=20 AF_BLUETOOTH;
    addr.rc_channel =3D (uint8_t)=20 1;
    str2ba( dest, &addr.rc_bdaddr=20 );

    // connect to = server
   =20 status =3D connect(s, (struct sockaddr *)&addr,=20 sizeof(addr));

    // send a=20 message
    if( status =3D=3D 0 )=20 {
        status =3D write(s, = "hello!",=20 6);
    }

    if( status = < 0 )=20 perror("uh oh");

    = close(s);
   =20 return 0;
}
 
Can I select what of my = local modules=20 (HCI0 or HCI1) makes this conexion? 
 
Where can I select = (in the=20 example) what local module use?  = =BF=BF=BF???
 
Regards,
Sir=20 Graham.
 

 
 

------=_NextPart_000_0009_01C65CE0.92412390-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: From: "Albert Huang" To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] Selection of Local module.... In-Reply-To: <049f01c65cb0$0d478bf0$0300a8c0@akira> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3380_11677985.1144690677709" References: <049f01c65cb0$0d478bf0$0300a8c0@akira> Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 10 Apr 2006 13:37:57 -0400 ------=_Part_3380_11677985.1144690677709 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline bind() to the address and channel of the local adapter you want to use before the call to connect() -albert On 4/10/06, Sir Graham (Terra) wrote: > > *Hi,* > ** > *I need to use two bluetooth devices in the same computer with BlueZ.* > ** > *How can I select (with socket) the device local that I like make a > conexion?* > > > *If I make a simple conexion... Can I select what of my local modules > (HCI0 or HCI1) makes this conexion?* > > > #include > #include > #include > #include > #include > > int main(int argc, char **argv) > { > struct sockaddr_rc addr =3D { 0 }; > int s, status; > char dest[18] =3D "01:23:45:67:89:AB"; > > // allocate a socket > s =3D socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); > > // set the connection parameters (who to connect to) > addr.rc_family =3D AF_BLUETOOTH; > addr.rc_channel =3D (uint8_t) 1; > str2ba( dest, &addr.rc_bdaddr ); > > // connect to server > status =3D connect(s, (struct sockaddr *)&addr, sizeof(addr)); > > // send a message > if( status =3D=3D 0 ) { > status =3D write(s, "hello!", 6); > } > > if( status < 0 ) perror("uh oh"); > > close(s); > return 0; > } > > *Can I select what of my local modules (HCI0 or HCI1) makes this > conexion? * > > *Where can I select (in the example) what local module use? =BF=BF=BF???= * > ** > *Regards,* > *Sir Graham.* > ** > > > > ------=_Part_3380_11677985.1144690677709 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline bind() to the address and channel of the local adapter you want to use befo= re the call to connect()

-albert

On 4/10/06, Sir Graham (Terra) <<= a href=3D"mailto:sir__graham@terra.es"> sir__graham@terra.es> wrote:
Hi,
 
I need to use two bluetooth de= vices in the=20 same computer with BlueZ.
 
How  can I select (with s= ocket) the=20 device local that I like make a conexion?
 
 
If I make a simple conexion...= Can I select=20 what of my local modules (HCI0 or HCI1) makes this=20 conexion?
 
 
#include <stdio.h>
#inc= lude=20 <unistd.h>
#include <sys/socket.h>
#include=20 <bluetooth/bluetooth.h>
#include <bluetooth/rfcomm.h>
int=20 main(int argc, char **argv)
{
    struct sockaddr_rc a= ddr =3D=20 { 0 };
    int s, status;
    char dest= [18]=20 =3D "01:23:45:67:89:AB";

    // allocate a= =20 socket
    s =3D socket(AF_BLUETOOTH, SOCK_STREAM,=20 BTPROTO_RFCOMM);

    // set the connection parameters= (who=20 to connect to)
    addr.rc_family =3D=20 AF_BLUETOOTH;
    addr.rc_channel =3D (uint8_t)=20 1;
    str2ba( dest, &addr.rc_bdaddr=20 );

    // connect to server
    sta= tus =3D=20 connect(s, (struct sockaddr *)&addr,=20 sizeof(addr));

    // send a message
  &= nbsp;=20 if( status =3D=3D 0 ) {
        statu= s =3D=20 write(s, "hello!", 6);
    }

  = ;  if(=20 status < 0 ) perror("uh oh");

   =20 close(s);
    return 0;
}
 
Can I select what of my local = modules (HCI0=20 or HCI1) makes this conexion? 
 
Where can I select (in t= he example)=20 what local module use?  =BF=BF=BF???
&= nbsp;
Regards,=
Sir=20 Graham.
 

 
 

------=_Part_3380_11677985.1144690677709-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <049f01c65cb0$0d478bf0$0300a8c0@akira> From: "Sir Graham (Terra)" To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0490_01C65CC0.A0E81B80" Subject: [Bluez-devel] Selection of Local module.... Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 10 Apr 2006 17:03:02 +0200 This is a multi-part message in MIME format. ------=_NextPart_000_0490_01C65CC0.A0E81B80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I need to use two bluetooth devices in the same computer with BlueZ. How can I select (with socket) the device local that I like make a = conexion? If I make a simple conexion... Can I select what of my local modules = (HCI0 or HCI1) makes this conexion? #include #include #include #include #include int main(int argc, char **argv) { struct sockaddr_rc addr =3D { 0 }; int s, status; char dest[18] =3D "01:23:45:67:89:AB"; // allocate a socket s =3D socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM); // set the connection parameters (who to connect to) addr.rc_family =3D AF_BLUETOOTH; addr.rc_channel =3D (uint8_t) 1; str2ba( dest, &addr.rc_bdaddr ); // connect to server status =3D connect(s, (struct sockaddr *)&addr, sizeof(addr)); // send a message if( status =3D=3D 0 ) { status =3D write(s, "hello!", 6); } if( status < 0 ) perror("uh oh"); close(s); return 0; } Can I select what of my local modules (HCI0 or HCI1) makes this = conexion? =20 Where can I select (in the example) what local module use? =BF=BF=BF??? Regards, Sir Graham. ------=_NextPart_000_0490_01C65CC0.A0E81B80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I need to use two bluetooth = devices in the=20 same computer with BlueZ.
 
How  can I select (with = socket) the=20 device local that I like make a conexion?
 
 
If I make a simple conexion... = Can I select=20 what of my local modules (HCI0 or HCI1) makes this=20 conexion?
 
 
#include = <stdio.h>
#include=20 <unistd.h>
#include <sys/socket.h>
#include=20 <bluetooth/bluetooth.h>
#include = <bluetooth/rfcomm.h>

int=20 main(int argc, char **argv)
{
    struct = sockaddr_rc addr =3D=20 { 0 };
    int s, status;
    char = dest[18]=20 =3D "01:23:45:67:89:AB";

    // allocate a=20 socket
    s =3D socket(AF_BLUETOOTH, SOCK_STREAM,=20 BTPROTO_RFCOMM);

    // set the connection = parameters (who=20 to connect to)
    addr.rc_family =3D=20 AF_BLUETOOTH;
    addr.rc_channel =3D (uint8_t)=20 1;
    str2ba( dest, &addr.rc_bdaddr=20 );

    // connect to server
    = status =3D=20 connect(s, (struct sockaddr *)&addr,=20 sizeof(addr));

    // send a = message
   =20 if( status =3D=3D 0 ) {
        = status =3D=20 write(s, "hello!", 6);
    }

    = if(=20 status < 0 ) perror("uh oh");

   =20 close(s);
    return 0;
}
 
Can I select what of my local = modules (HCI0=20 or HCI1) makes this conexion? 
 
Where can I select (in = the example)=20 what local module use?  =BF=BF=BF???
 
Regards,
Sir=20 Graham.
 

 
 
------=_NextPart_000_0490_01C65CC0.A0E81B80-- ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel