All of lore.kernel.org
 help / color / mirror / Atom feed
* Polling in rfcomm listen
@ 2009-06-17 13:28 Dominic Sacré
  0 siblings, 0 replies; only message in thread
From: Dominic Sacré @ 2009-06-17 13:28 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I'm trying to use "rfcomm listen" (or "rfcomm watch") to run a command as 
soon as a client connects. The problem is that after starting the command, 
rfcomm enters a loop which continually calls ppoll() with a timeout of 200 
nanoseconds. This causes a very high CPU load, and also a chirping noise on 
my laptop, presumably from ther CPU entering a power save mode, and 
immediately being woken up again.

Is there any reason to use such an extremely short timeout? I tried 
replacing the timeout with 2 milliseconds (that's 10000 times the original 
value...), and rfcomm works much better now. Probably even higher values 
would work.

Another issue is that occasionally, the command started by rfcomm fails to 
open /dev/rfcomm0. Apparently rfcomm starts the command before the device is 
properly created and its permissions set?


Regards,

Dominic

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-17 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 13:28 Polling in rfcomm listen Dominic Sacré

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.