Return-Path: Message-ID: <94e407f00512020254pb83407ds7fec44efaaca1385@mail.gmail.com> From: Arpit Rai To: bluez-users@lists.sourceforge.net Subject: Re: [Bluez-users] Definition of hci_conn_info_req In-Reply-To: <1133519615.11226.13.camel@blade> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22161_26308529.1133520856381" References: <94e407f00512020222g42375059h491249e313cea536@mail.gmail.com> <1133519615.11226.13.camel@blade> Sender: bluez-users-admin@lists.sourceforge.net Errors-To: bluez-users-admin@lists.sourceforge.net Reply-To: bluez-users@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ users List-Post: List-Help: List-Subscribe: , List-Archive: Date: Fri, 2 Dec 2005 18:54:16 +0800 ------=_Part_22161_26308529.1133520856381 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Marcel > no, it is not. What does hci_conn_info_req do then?Any documentation anywhere?I'm kinda lost with all the Bluez code. > Depends on how you convert the address. Use ba2str(). Yes I'm using ba2str to convert.My question is, should &cr->bdaddr contain the address of the remote bluetooth device? char add[18]; struct hci_conn_info_req *cr; cr =3D malloc(sizeof(*cr) + sizeof(struct hci_conn_info)); bacpy( &cr->bdaddr, &bdaddr ); ba2str( &bdaddr, add); printf("Bluetooth address-remote device: %s \n", add); cr->type =3D ACL_LINK; Everytime I run the executable C, I get a different value for &cr->bdaddr. Regards Arpit On 12/2/05, Marcel Holtmann wrote: > > Hi Arpit, > > > Another basic question.The statement below is a request to establish > > connection with a remote device,right? > > no, it is not. > > > struct hci_conn_info_req *cr; > > cr =3D malloc(sizeof(*cr) + sizeof(struct hci_conn_info)); > > > > Now,is &cr->bdaddr supposed to be the remote device bluetooth address? > > > > When I convert this value to string and output it, it doesn't give me > > the correct value for the remote bluetooth device. It returns > > 08:04:9A:AC:00:00. Doesn't make sense to me. > > Depends on how you convert the address. Use ba2str(). > > Regards > > Marcel > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Bluez-users mailing list > Bluez-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-users > ------=_Part_22161_26308529.1133520856381 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Marcel

> no, it is not.

What does hci_conn_info_req do then?Any documentation anywhere?I'm kinda lo= st with all the Bluez code.

> Depends on how you convert the address. Use ba2str().

Yes I'm using ba2str to convert.My question is, should &cr->bdaddr c= ontain the address of the remote bluetooth device?

    char add[18];
    struct hci_conn_info_req *cr;  
    cr =3D malloc(sizeof(*cr) + sizeof(struct hci_conn_info)= );
    bacpy( &cr->bdaddr, &bdaddr );
    ba2str( &bdaddr, add);
    printf("Bluetooth address-remote device: %s \n"= ;, add);
    cr->type =3D ACL_LINK;

Everytime I run the executable C, I get a different value for &cr->b= daddr.

Regards
Arpit

On 12/2/05, Marcel Holtmann <marcel@holtmann.org> wrote:
Hi Arpit,

> Another basic question.The statement below is a reque= st to establish
> connection with a remote device,right?

no, i= t is not.

> struct hci_conn_info_req *cr;
> cr =3D malloc(s= izeof(*cr) + sizeof(struct hci_conn_info));
>
> Now,is &cr->bdaddr supposed to be the remote device= bluetooth address?
>
> When I convert this value to string and= output it, it doesn't give me
> the correct value for the remote blu= etooth device. It returns
> 08:04:9A:AC:00:00. Doesn't make sense to me.

Depends on how= you convert the address. Use ba2str().

Regards

Marcel



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log file= s
for problems?  Stop!  Download the new AJAX search= engine that makes
searching your log files as easy as surfing the =  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3D= click
_______________________________________________
Bluez-users= mailing list
Bluez-users@lists.= sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

------=_Part_22161_26308529.1133520856381-- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users