Hi,
I'm getting some problem while using Bluez hci function calls. The pseudo
code is as under:
...
devId = hci_devid(addr);
sock = hci_open_dev(devId);
...
fcntl(sock, F_SETFL, O_NONBLOCK); /** whats the problem ??? */
...
hci_read_local_name(sock, size, name, 0)
....
If I comment call to fcntl() , I get correct name of device by using
hci_read_local_name() function.
But if the call is made to fcntl(), subsequent calls of hci_* function
does not work properly. In fact hci_read_local_name() returns null name.
Any idea what is the problem with usage of fcntl() this way ?
Regards,
Tushar Paturde
Hi Tushar,
> Actually this code is part of bluetooth implementation of jsr82 in
> phonme project.
> Does making non-blocking HCI socket helps in any way for function
> calls such as hci_send_cmd ?. Or is there any other advantage ?
no. It makes no difference. The HCI socket has specific semantics
anyway.
Regards
Marcel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Actually this code is part of bluetooth implementation of jsr82 in phonme
project.
Does making non-blocking HCI socket helps in any way for function calls such
as hci_send_cmd ?. Or is there any other advantage ?
Regards,
Tushar
On 4/2/07, Marcel Holtmann <[email protected]> wrote:
>
> Hi Tushar,
>
> I never tried to have a non-blocking HCI socket. And I have no idea why
> you actually need it. It is better to use the D-Bus API anyway.
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
--
Tushar Paturde
Hi Tushar,
> I'm getting some problem while using Bluez hci function calls. The
> pseudo code is as under:
>
> ...
> devId = hci_devid(addr);
> sock = hci_open_dev(devId);
> ...
> fcntl(sock, F_SETFL, O_NONBLOCK); /** whats the problem ??? */
> ...
> hci_read_local_name(sock, size, name, 0)
> ....
>
>
> If I comment call to fcntl() , I get correct name of device by using
> hci_read_local_name() function.
> But if the call is made to fcntl(), subsequent calls of hci_*
> function does not work properly. In fact hci_read_local_name()
> returns null name.
> Any idea what is the problem with usage of fcntl() this way ?
I never tried to have a non-blocking HCI socket. And I have no idea why
you actually need it. It is better to use the D-Bus API anyway.
Regards
Marcel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users