* [Bluez-users] Definition of hci_conn_info_req
@ 2005-12-02 10:22 Arpit Rai
2005-12-02 10:33 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Arpit Rai @ 2005-12-02 10:22 UTC (permalink / raw)
To: bluez-users; +Cc: eng11084
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
Hi
Another basic question.The statement below is a request to establish
connection with a remote device,right?
struct hci_conn_info_req *cr;
cr = 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.
Regards
Arpit
[-- Attachment #2: Type: text/html, Size: 584 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-users] Definition of hci_conn_info_req
2005-12-02 10:22 [Bluez-users] Definition of hci_conn_info_req Arpit Rai
@ 2005-12-02 10:33 ` Marcel Holtmann
2005-12-02 10:54 ` Arpit Rai
0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2005-12-02 10:33 UTC (permalink / raw)
To: bluez-users; +Cc: eng11084
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 = 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=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Bluez-users] Definition of hci_conn_info_req
2005-12-02 10:33 ` Marcel Holtmann
@ 2005-12-02 10:54 ` Arpit Rai
2005-12-02 11:01 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Arpit Rai @ 2005-12-02 10:54 UTC (permalink / raw)
To: bluez-users
[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]
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 = 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 = ACL_LINK;
Everytime I run the executable C, I get a different value for &cr->bdaddr.
Regards
Arpit
On 12/2/05, Marcel Holtmann <marcel@holtmann.org> 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 = 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=7637&alloc_id=16865&op=click
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
[-- Attachment #2: Type: text/html, Size: 2746 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Bluez-users] Definition of hci_conn_info_req
2005-12-02 10:54 ` Arpit Rai
@ 2005-12-02 11:01 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2005-12-02 11:01 UTC (permalink / raw)
To: bluez-users
Hi Arpit,
> > no, it is not.
>
> What does hci_conn_info_req do then?Any documentation anywhere?I'm
> kinda lost with all the Bluez code.
you can get information about the current established connections.
> > 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 = 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 = ACL_LINK;
>
> Everytime I run the executable C, I get a different value for
> &cr->bdaddr.
Where does bdaddr come from?
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=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-02 11:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02 10:22 [Bluez-users] Definition of hci_conn_info_req Arpit Rai
2005-12-02 10:33 ` Marcel Holtmann
2005-12-02 10:54 ` Arpit Rai
2005-12-02 11:01 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).