Polling in rfcomm listen

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

 



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
--
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