Trouble getting direct access to parallel port
Hi.
I'm fairly new to linux and am trying to get direct access to my parallel port. I am using a program called Avrdude that downloads compiled programs to microcontrollers over a special cable. The hardware works -- I have successfully used a Windows port of Avrdude.
I am running Mandrake 10 on a Sony VAIO PCG-FR130 laptop.
I have tried various things to no avail. I seem to be not using the parallel port correctly. I have tried it with various /dev/ devices, but I really don't know which, if any, are actually configured for my parallel port. [I did check BIOS. The parallel port is enabled in ECP mode, Base I/O addr is 378 (hex?), using IRQ 7 and DMA 3. I could change it from 'Enabled' to 'Auto', but I don't think that would help.]
It seems the simplest way to show whats going on is to show several invocations of the program and the error messages it generates:
$ avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex
avrdude: can't open device "/dev/parport0": No such file or directory
avrdude: failed to open parallel port "/dev/parport0"
OK, I will tell it to try /dev/lp0 with the -P flag:
$ avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/lp0
avrdude: can't open device "/dev/lp0": Permission denied
avrdude: failed to open parallel port "/dev/lp0"
Permission denied sounds promising. So, I become the superuser and try again...
# avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/lp0
avrdude: can't claim device "/dev/lp0": Invalid argument
Don't know what to make of that. I'll try a couple of other devices, just to be sure.
# avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/printers/0
avrdude: can't claim device "/dev/printers/0": Invalid argument
[I think /dev/lp0 is a link to /dev/printers/0.]
# avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/lp1
avrdude: can't open device "/dev/lp1": No such file or directory
avrdude: failed to open parallel port "/dev/lp1"
Just for good measure, I'll try /dev/printers/0 as myself.
$ avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/printers/0
avrdude: can't open device "/dev/printers/0": Permission denied
avrdude: failed to open parallel port "/dev/printers/0"
$ avrdude -p atmega8 -c sp12 -U flash:w:LEDs.hex -P /dev/parport0
avrdude: can't open device "/dev/parport0": No such file or directory
avrdude: failed to open parallel port "/dev/parport0"
Well, I don't know what else to try. Any help would be appreciated.
Thanks,
Armagon