Hi,

I've finally found out how to do discovery only when I want to send
something. (It took a while before I found  /proc/sys/net/irda/discovery )

I use the following to make a discovery each time before I send something:

      getsockopt(self->fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &len)

and the code in irlmp.c (irlmp_discovery_request()) says:

        /* 
         * Start a single discovery operation if discovery is not already
         * running 
         */
        if (!sysctl_discovery)
                irlmp_do_discovery(nslots);

and that call works just fine, i can see it with irdadump. The problem is
that the getsockopt() returns with "Resource temporarily unavailable" even
though I can see that the discovery is performed ok. But if I loop over
the getsockopt call a few times it works eventually (after 3-4 times). 

Anyoune got a clue about this?

/tomas

_________________________________________________________
Tomas Carlsson                 <[EMAIL PROTECTED]> 




_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to