From: Tobias A. <to...@xb...> - 2008-05-18 23:53:46
|
Hi I'm a developer for XBMC for linux and we use LIRC but we have a bit of trouble with standby and LIRC. We use the standard socket procedure with a nonblocking socket. The main problem for us is that we have no way of knowing if we lost connection to lirc, no IO error when we enter a standby. I suspect we might not loose connection but lirc doesn't seem to recognise us as it doesn't send anything on the socket. To fix this we reinitialize, which works. The problem is to recognise when we need to do this because lirc exhibit the same behaviour if a user have gone into a sleep-wake cycle or if the've unplugged the hw. User A no button press errno 11, and recv -1 Button press gives returns >= 0 errno = 0 -sleep- no button press errno gives 0, recv 0. button press errno gives 0, recv 0. User B (has no remote at all) errno gives 0, recv 0. I feel it's bad design to disable lirc after X failed reinitalizes (so User B doesn't go into reinitialize over and over again) mainly because hotpluggable wouldn't be possible? So what I'm asking is: Is there any small ping packet or connect packet XBMC always could send so User A never gets into trouble? sincerely Topfs2 |