TV Remote Control, Lirc under FreeBSD 6.1
Evgeny Solovyov
a.n.s.i at gmx.net
Sat May 27 03:40:50 PDT 2006
>> # 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 at 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 at 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' ???
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
More information about the freebsd-questions
mailing list