From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: Date: Mon, 2 Apr 2007 16:30:17 +0530 From: "Tushar Paturde" To: Bluez-users@lists.sourceforge.net MIME-Version: 1.0 Subject: [Bluez-users] Usage of fcntl for non blocking mode... Reply-To: BlueZ users List-Id: BlueZ users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1247211352==" Sender: bluez-users-bounces@lists.sourceforge.net Errors-To: bluez-users-bounces@lists.sourceforge.net --===============1247211352== Content-Type: multipart/alternative; boundary="----=_Part_101122_26190942.1175511617091" ------=_Part_101122_26190942.1175511617091 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_101122_26190942.1175511617091 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_101122_26190942.1175511617091-- --===============1247211352== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- 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 --===============1247211352== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users --===============1247211352==--