Re: HDP, can't read data from fd which Acquire from HealthChannel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

2011/4/8 Yi Hui Fan <yihuifan@xxxxxxxxxx>:
> Dears
>
> I'd like to build a demo for HDP sink. I try to use the DBUS API provided
> by Bluez. But there is a problem with unix fd to receive data.
>
> I can get fd by calling HealthChannel.Acquire method.  following is the
> code I write to read data according the sock I got.
>
>        fd_set rfds;
>        struct timeval tv;
>        int rv;
>        char buff[1024];
>
>        FD_ZERO(&rfds);
>        FD_SET(sock, &rfds);
>        tv.tv_sec = 10;
>        tv.tv_usec = 500;
>
>        rv = select(sock+1, &rfds, NULL, NULL, &tv);
>
>        rv = recv(sock, buff, 1024, 0);
>
> rv is always return 0 when I call select method. I can't get anything.
>
> Any problem with these codes?

It seems that you don't have a valid file descriptor. How are you
getting the file descriptor? Are you using Dbus 1.4?


>
> Thanks &
> Best regards,

Regards

Jose.

>
> Yihui,Fan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux