From owner-freebsd-questions@FreeBSD.ORG Sat May 27 10:40:43 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2289C16A679 for ; Sat, 27 May 2006 10:40:43 +0000 (UTC) (envelope-from a.n.s.i@gmx.net) Received: from mail.gmx.net (mail.gmx.de [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id 54B5943D46 for ; Sat, 27 May 2006 10:40:42 +0000 (GMT) (envelope-from a.n.s.i@gmx.net) Received: (qmail invoked by alias); 27 May 2006 10:40:40 -0000 Received: from p5087A74C.dip0.t-ipconnect.de (EHLO [192.168.0.16]) [80.135.167.76] by mail.gmx.net (mp007) with SMTP; 27 May 2006 12:40:40 +0200 X-Authenticated: #30170983 Message-ID: <4478499B.4030905@gmx.net> Date: Sat, 27 May 2006 12:44:11 +0000 From: Evgeny Solovyov User-Agent: Thunderbird 1.5.0.2 (X11/20060526) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <44778F35.3050006@gmx.net> <44777B6C.9000800@u.washington.edu> <44779D56.6080003@gmx.net> <44779ED6.8030807@gmx.net> <4477899A.7090504@u.washington.edu> In-Reply-To: <4477899A.7090504@u.washington.edu> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: TV Remote Control, Lirc under FreeBSD 6.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2006 10:40:50 -0000 >> # ls -l /dev/ttyd0 >> crw------- 1 root wheel 0, 53 May 26 23:20 /dev/ttyd0 >> # > Are you sure you're accessing that as root? Try adding world read > permissions (and maybe world write permissions if the read permissions > don't solve your problem) for the device because maybe lirc is being run > by a secondary daemon user. Yes, I'm sure. Ok, i change permissions # devfs rule apply path ttyd0 mode 0666 # ls -l /dev/ttyd0* crw-rw-rw- 1 root wheel 0, 53 May 27 12:25 /dev/ttyd0 crw------- 1 root wheel 0, 54 May 27 11:30 /dev/ttyd0.init crw------- 1 root wheel 0, 55 May 27 11:30 /dev/ttyd0.lock # # irrecord -d /dev/ttyd0 /tmp/lirc.conf irrecord - application for recording IR-codes for usage with lirc Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de) irrecord: could not open /dev/ttyd0 irrecord: irman_init(): No such file or directory irrecord: could not init hardware (lircd running ? --> close it, check permissions) # # # ps axu|grep lirc rc root 4556 0.0 0.0 1476 604 p1 R+ 12:42PM 0:00.00 grep lirc # # truss irrecord -d /dev/ttyd0 /tmp/lirc.conf mmap(0x0,3608,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) = 671576064 (0x28077000) munmap(0x28077000,0xe18) = 0 (0x0) __sysctl(0xbfbfead8,0x2,0x28073998,0xbfbfead4,0x0,0x0) = 0 (0x0) mmap(0x0,32768,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0) = 671576064 (0x28077000) issetugid() = 0 (0x0) open("/etc/libmap.conf",0x0,0666) = 3 (0x3) fstat(3,0xbfbfe1f0) = 0 (0x0) read(0x3,0x2807b000,0x1000) = 3661 (0xe4d) read(0x3,0x2807b000,0x1000) = 0 (0x0) close(3) = 0 (0x0) open("/var/run/ld-elf.so.hints",0x0,00) = 3 (0x3) read(0x3,0xbfbfeaa0,0x80) = 128 (0x80) lseek(3,0x80,SEEK_SET) = 128 (0x80) read(0x3,0x2807e000,0x6c) = 108 (0x6c) close(3) = 0 (0x0) mmap(0x0,36864,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0) = 671608832 (0x2807f000) access("/lib/libc.so.6",0) = 0 (0x0) open("/lib/libc.so.6",0x0,00) = 3 (0x3) fstat(3,0xbfbfeae0) = 0 (0x0) read(0x3,0x280728e0,0x1000) = 4096 (0x1000) mmap(0x0,884736,(0x5)PROT_READ|PROT_EXEC,(0x20002)MAP_NOCORE|MAP_PRIVATE,3,0x0) = 671645696 (0x28088000) mprotect(0x28147000,4096,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0) mprotect(0x28147000,4096,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0) mmap(0x28148000,20480,(0x3)PROT_READ|PROT_WRITE,(0x12)MAP_FIXED|MAP_PRIVATE,3,0xc0000) = 672432128 (0x28148000) mmap(0x2814d000,77824,(0x3)PROT_READ|PROT_WRITE,(0x1012)MAP_ANON|MAP_FIXED|MAP_PRIVATE,-1,0x0) = 672452608 (0x2814d000) close(3) = 0 (0x0) sysarch(0xa,0xbfbfeb50) = 0 (0x0) mmap(0x0,736,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) = 672530432 (0x28160000) munmap(0x28160000,0x2e0) = 0 (0x0) mprotect(0x28088000,786432,(0x7)PROT_READ|PROT_WRITE|PROT_EXEC) = 0 (0x0) mmap(0x0,22208,(0x3)PROT_READ|PROT_WRITE,(0x1000)MAP_ANON,-1,0x0) = 672530432 (0x28160000) munmap(0x28160000,0x56c0) = 0 (0x0) mprotect(0x28088000,786432,(0x5)PROT_READ|PROT_EXEC) = 0 (0x0) sigprocmask(0x1,0x28072820,0xbfbfeb20) = 0 (0x0) sigprocmask(0x3,0x28072830,0x0) = 0 (0x0) open("/tmp/lirc.conf",0x0,0666) = 3 (0x3) fstat(3,0xbfbfe5e0) = 0 (0x0) readlink("/etc/malloc.conf",0xbfbfe600,63) ERR#2 'No such file or directory' issetugid() = 0 (0x0) mmap(0x0,4096,(0x3)PROT_READ|PROT_WRITE,(0x1002)MAP_ANON|MAP_PRIVATE,-1,0x0) = 672530432 (0x28160000) break(0x8057000) = 0 (0x0) break(0x8058000) = 0 (0x0) read(0x3,0x8057000,0x1000) = 2406 (0x966) break(0x8059000) = 0 (0x0) break(0x805a000) = 0 (0x0) break(0x805b000) = 0 (0x0) break(0x805c000) = 0 (0x0) read(0x3,0x8057000,0x1000) = 0 (0x0) close(3) = 0 (0x0) open("/tmp/lirc.conf.conf",0x601,0666) = 3 (0x3) fstat(1,0xbfbfea90) = 0 (0x0) ioctl(1,TIOCGETA,0xbfbfead0) = 0 (0x0) write(1,0x8057000,1) = 1 (0x1) irrecord - application for recording IR-codes for usage with lirc write(1,0x8057000,67) = 67 (0x43) write(1,0x8057000,1) = 1 (0x1) Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de) write(1,0x8057000,63) = 63 (0x3f) write(1,0x8057000,1) = 1 (0x1) getpid() = 4460 (0x116c) open("/var/spool/lock/LCK..ttyd0",0xa01,0644) = 4 (0x4) write(4,0xbfbfdf90,11) = 11 (0xb) close(4) = 0 (0x0) readlink("/dev/ttyd0",0xbfbfe3b0,1024) ERR#22 'Invalid argument' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ open("/dev/ttyd0",0x8006,00) = 4 (0x4) ioctl(4,TIOCGETA,0xbfbfeb70) = 0 (0x0) ioctl(4,TIOCGETA,0x8055560) = 0 (0x0) fcntl(4,F_GETFL,0x0) = 6 (0x6) ioctl(4,TIOCFLUSH,0xbfbfeba0) = 0 (0x0) ioctl(4,TIOCSETA,0x80555a0) = 0 (0x0) fcntl(4,F_SETFL,0x6) = 0 (0x0) select(0,{},{},{},{0 50000}) = 0 (0x0) select(5,{4},0x0,0x0,{0 50000}) = 0 (0x0) write(4,0xbfbfebc7,1) = 1 (0x1) select(0,{},{},{},{0 500}) = 0 (0x0) write(4,0xbfbfebc7,1) = 1 (0x1) select(5,{4},0x0,0x0,{2 0}) = 0 (0x0) gettimeofday({1148732716 769881},0x0) = 0 (0x0) access("/etc/localtime",4) ERR#2 'No such file or directory' issetugid() = 0 (0x0) open("/usr/share/zoneinfo/UTC",0x0,05005132410) ERR#2 'No such file or directory' issetugid() = 0 (0x0) open("/usr/share/zoneinfo/posixrules",0x0,05001710400) = 5 (0x5) fstat(5,0xbfbfea20) = 0 (0x0) read(0x5,0xbfbfc700,0x1f08) = 1267 (0x4f3) close(5) = 0 (0x0) irrecord: write(2,0xbfbfe5c0,10) = 10 (0xa) could not open /dev/ttyd0write(2,0xbfbfe5e0,25) = 25 (0x19) write(2,0x2814b333,1) = 1 (0x1) gettimeofday({1148732716 770989},0x0) = 0 (0x0) irrecord: write(2,0xbfbfe5a0,10) = 10 (0xa) irman_init(): No such file or directorywrite(2,0xbfbfe5c0,39) = 39 (0x27) write(2,0x2814b333,1) = 1 (0x1) unlink("/var/spool/lock/LCK..ttyd0") = 0 (0x0) irrecord: could not init hardware (lircd running ? --> close it, check permissions) write(2,0xbfbfe600,84) = 84 (0x54) close(3) = 0 (0x0) unlink("/tmp/lirc.conf.conf") = 0 (0x0) ioctl(4,TIOCSETAW,0x8055560) = 0 (0x0) fcntl(4,F_SETFL,0x6) = 0 (0x0) close(4) = 0 (0x0) exit(0x1) process exit, rval = 256 # # Is a Problem here readlink("/dev/ttyd0",0xbfbfe3b0,1024) ERR#22 'Invalid argument' ??? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^