I am attempting to get the driver for the Infineer DT-3500 reader to
work on Kubuntu Dapper Drake and would eventually like it to work on
OS X. I had to prototype lots of functions just to get it to
compile, and then made a bundle and placed it in /usr/lib/pcsc/drivers.
I'm confused as to why there is a kernel module, and I can't get it
to compile, which seems to be a bug in Ubuntu's headers. When I try
to compile it I get the following:
[EMAIL PROTECTED]:~/infDT3500/kernel$ make
cc -c -O3 -D__KERNEL__ -DMODULE -Wall -I/usr/src/linux/include -I/
usr/src/linux/drivers/usb DT3500.c
In file included from /usr/include/linux/sched.h:16,
from /usr/include/linux/module.h:9,
from DT3500.c:1:
/usr/include/linux/signal.h:2:2: warning: #warning "You should
include <signal.h>. This time I will do it for you."
In file included from /usr/include/linux/resource.h:4,
from /usr/include/linux/sched.h:79,
from /usr/include/linux/module.h:9,
from DT3500.c:1:
/usr/include/linux/time.h:9: error: redefinition of ‘struct timespec
’
/usr/include/linux/time.h:15: error: redefinition of ‘struct timeval
’
/usr/include/linux/time.h:20: error: redefinition of ‘struct
timezone’
/usr/include/linux/time.h:47: error: redefinition of ‘struct
itimerval’
In file included from DT3500.c:1:
/usr/include/linux/module.h:41: error: field ‘attr’ has
incomplete type
/usr/include/linux/module.h:49: error: field ‘kobj’ has
incomplete type
In file included from DT3500.c:3:
DT3500.h:13: error: syntax error before ‘devrequest’
DT3500.h:13: warning: no semicolon at end of struct or union
DT3500.h:16: error: syntax error before ‘}’ token
DT3500.c:4:26: error: linux/malloc.h: No such file or directory
DT3500.c:5:25: error: asm/uaccess.h: No such file or directory
DT3500.c:7: error: array type has incomplete element type
DT3500.c:8: warning: type defaults to ‘int’ in declaration of
‘DECLARE_WAIT_QUEUE_HEAD’
DT3500.c:8: warning: parameter names (without types) in function
declaration
DT3500.c: In function ‘DT3500_irq’:
DT3500.c:12: error: dereferencing pointer to incomplete type
DT3500.c:13: warning: implicit declaration of function ‘printk’
DT3500.c:13: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:13: error: (Each undeclared identifier is reported only once
DT3500.c:13: error: for each function it appears in.)
DT3500.c:13: error: syntax error before string constant
DT3500.c:14: error: dereferencing pointer to incomplete type
DT3500.c:15: error: dereferencing pointer to incomplete type
DT3500.c:16: error: syntax error before string constant
DT3500.c:17: error: dereferencing pointer to incomplete type
DT3500.c:17: error: dereferencing pointer to incomplete type
DT3500.c:17: error: dereferencing pointer to incomplete type
DT3500.c:18: error: dereferencing pointer to incomplete type
DT3500.c:18: error: dereferencing pointer to incomplete type
DT3500.c:20: warning: implicit declaration of function
‘wake_up_interruptible’
DT3500.c:20: error: ‘DT3500_wait_in’ undeclared (first use in
this function)
DT3500.c:11: warning: unused variable ‘minor’
DT3500.c: In function ‘DT3500_disconnect’:
DT3500.c:25: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:25: error: syntax error before string constant
DT3500.c:30: warning: implicit declaration of function ‘kfree’
DT3500.c: At top level:
DT3500.c:34: warning: ‘struct file’ declared inside parameter list
DT3500.c:34: warning: its scope is only this definition or
declaration, which is probably not what you want
DT3500.c:34: warning: ‘struct inode’ declared inside parameter list
DT3500.c: In function ‘DT3500_open’:
DT3500.c:38: warning: implicit declaration of function ‘MINOR’
DT3500.c:38: error: dereferencing pointer to incomplete type
DT3500.c:40: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:40: error: syntax error before string constant
DT3500.c:48: warning: implicit declaration of function
‘usb_alloc_urb’
DT3500.c:50: warning: implicit declaration of function
‘usb_rcvintpipe’
DT3500.c:51: warning: implicit declaration of function
‘usb_maxpacket’
DT3500.c:51: warning: implicit declaration of function ‘usb_pipeout’
DT3500.c:52: warning: implicit declaration of function ‘kmalloc’
DT3500.c:52: error: ‘GFP_KERNEL’ undeclared (first use in this
function)
DT3500.c:55: warning: implicit declaration of function ‘FILL_INT_URB
’
DT3500.c:57: warning: implicit declaration of function
‘usb_submit_urb’
DT3500.c:58: error: dereferencing pointer to incomplete type
DT3500.c:59: error: dereferencing pointer to incomplete type
DT3500.c: At top level:
DT3500.c:62: warning: ‘struct file’ declared inside parameter list
DT3500.c:62: warning: ‘struct inode’ declared inside parameter list
DT3500.c: In function ‘DT3500_close’:
DT3500.c:64: error: dereferencing pointer to incomplete type
DT3500.c:67: warning: implicit declaration of function
‘usb_unlink_urb’
DT3500.c:68: warning: implicit declaration of function ‘usb_free_urb
’
DT3500.c:73: error: dereferencing pointer to incomplete type
DT3500.c: At top level:
DT3500.c:77: warning: ‘struct file’ declared inside parameter list
DT3500.c: In function ‘DT3500_read’:
DT3500.c:79: error: dereferencing pointer to incomplete type
DT3500.c:84: warning: implicit declaration of function
‘DECLARE_WAITQUEUE’
DT3500.c:84: error: ‘wait’ undeclared (first use in this function)
DT3500.c:84: error: ‘current’ undeclared (first use in this
function)
DT3500.c:85: warning: implicit declaration of function
‘add_wait_queue’
DT3500.c:85: error: ‘DT3500_wait_in’ undeclared (first use in
this function)
DT3500.c:89: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:89: error: syntax error before string constant
DT3500.c:90: warning: implicit declaration of function ‘copy_to_user
’
DT3500.c:96: error: dereferencing pointer to incomplete type
DT3500.c:96: error: ‘O_NONBLOCK’ undeclared (first use in this
function)
DT3500.c:100: warning: implicit declaration of function
‘signal_pending’
DT3500.c:101: error: ‘ERESTARTSYS’ undeclared (first use in this
function)
DT3500.c:104: warning: implicit declaration of function ‘schedule’
DT3500.c:108: warning: implicit declaration of function
‘remove_wait_queue’
DT3500.c:83: warning: unused variable ‘flags’
DT3500.c:82: warning: unused variable ‘i’
DT3500.c: At top level:
DT3500.c:113: warning: ‘struct file’ declared inside parameter list
DT3500.c: In function ‘DT3500_write’:
DT3500.c:115: error: dereferencing pointer to incomplete type
DT3500.c:116: error: ‘GFP_KERNEL’ undeclared (first use in this
function)
DT3500.c:116: warning: initialization makes pointer from integer
without a cast
DT3500.c:123: warning: implicit declaration of function
‘copy_from_user’
DT3500.c:128: warning: implicit declaration of function
‘usb_control_msg’
DT3500.c:128: warning: implicit declaration of function
‘usb_sndctrlpipe’
DT3500.c:129: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:129: error: syntax error before string constant
DT3500.c:120: warning: unused variable ‘timeout’
DT3500.c:119: warning: unused variable ‘partial’
DT3500.c:117: warning: unused variable ‘i’
DT3500.c: At top level:
DT3500.c:144: error: variable ‘DT3500_fops’ has initializer but
incomplete type
DT3500.c:145: error: unknown field ‘open’ specified in initializer
DT3500.c:145: warning: excess elements in struct initializer
DT3500.c:145: warning: (near initialization for ‘DT3500_fops’)
DT3500.c:146: error: unknown field ‘release’ specified in
initializer
DT3500.c:146: warning: excess elements in struct initializer
DT3500.c:146: warning: (near initialization for ‘DT3500_fops’)
DT3500.c:148: error: unknown field ‘read’ specified in initializer
DT3500.c:148: warning: excess elements in struct initializer
DT3500.c:148: warning: (near initialization for ‘DT3500_fops’)
DT3500.c:149: error: unknown field ‘write’ specified in initializer
DT3500.c:150: warning: excess elements in struct initializer
DT3500.c:150: warning: (near initialization for ‘DT3500_fops’)
DT3500.c:152: warning: ‘struct usb_device_id’ declared inside
parameter list
DT3500.c: In function ‘DT3500_probe’:
DT3500.c:160: error: dereferencing pointer to incomplete type
DT3500.c:160: error: dereferencing pointer to incomplete type
DT3500.c:161: error: ‘KERN_INFO’ undeclared (first use in this
function)
DT3500.c:161: error: syntax error before string constant
DT3500.c:162: error: dereferencing pointer to incomplete type
DT3500.c:163: error: ‘KERN_ERR’ undeclared (first use in this
function)
DT3500.c:163: error: syntax error before string constant
DT3500.c:169: error: invalid application of ‘sizeof’ to
incomplete type ‘struct usb_device’
DT3500.c:169: error: ‘GFP_KERNEL’ undeclared (first use in this
function)
DT3500.c:170: error: dereferencing pointer to incomplete type
DT3500.c:171: warning: implicit declaration of function
‘usb_set_configuration’
DT3500.c:171: error: dereferencing pointer to incomplete type
DT3500.c:172: error: syntax error before string constant
DT3500.c:176: error: dereferencing pointer to incomplete type
DT3500.c:177: error: ‘struct usb_interface_descriptor’ has no
member named ‘endpoint’
DT3500.c:187: error: syntax error before string constant
DT3500.c:188: error: syntax error before string constant
DT3500.c:155: warning: unused variable ‘maxp’
DT3500.c:155: warning: unused variable ‘pipe’
DT3500.c:154: warning: unused variable ‘ret’
DT3500.c: At top level:
DT3500.c:192: error: variable ‘DT3500_usb_driver’ has initializer
but incomplete type
DT3500.c:193: warning: excess elements in struct initializer
DT3500.c:193: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:194: error: unknown field ‘probe’ specified in initializer
DT3500.c:194: warning: excess elements in struct initializer
DT3500.c:194: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:195: warning: excess elements in struct initializer
DT3500.c:195: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:196: error: extra brace group at end of initializer
DT3500.c:196: error: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:196: warning: excess elements in struct initializer
DT3500.c:196: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:197: warning: excess elements in struct initializer
DT3500.c:197: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c:199: warning: excess elements in struct initializer
DT3500.c:199: warning: (near initialization for ‘DT3500_usb_driver’)
DT3500.c: In function ‘init_module’:
DT3500.c:202: warning: implicit declaration of function
‘usb_register’
DT3500.c: In function ‘cleanup_module’:
DT3500.c:206: warning: implicit declaration of function
‘usb_deregister’
make: *** [DT3500.o] Error 1
When I plug the reader in, I get the following from pcscd:
[EMAIL PROTECTED]:/etc/reader.conf.d# pcscd -f
pcscdaemon.c:258:main() pcscd set to foreground with debug send to
stderr
pcscdaemon.c:463:main() pcsc-lite 1.2.9-beta9 daemon ready.
hotplug_libusb.c:404:HPAddHotPluggable() Adding USB device: 001:008
readerfactory.c:1097:RFInitializeReader() Attempting startup of
DT3500 Reader 00 00.
readerfactory.c:939:RFBindFunctions() Loading IFD Handler 2.0
Unable to open : No such file or directory
readerfactory.c:1132:RFInitializeReader() Open Port 200000 Failed
(usb:0802/2800:libusb:001:008)
readerfactory.c:1014:RFUnloadReader() Unloading reader driver.
readerfactory.c:250:RFAddReader() DT3500 Reader init failed.
I assume this means I need the kernel module. How do I go about
getting it to compile?
Also, when I want this to work on OS X, what will I need to do?
Obviously the linux kernel module won't be of much help there....
Thank you very much for your time.
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle