* parport_fs.c, module to give access to a memory region like the gpio device
* Author : Florian Schneider, very hacked up version
* Example, No support, worked on the 1.7.5 oleg release
* Put this in drivers/parport add to the Makefile to compile
Printable View
* parport_fs.c, module to give access to a memory region like the gpio device
* Author : Florian Schneider, very hacked up version
* Example, No support, worked on the 1.7.5 oleg release
* Put this in drivers/parport add to the Makefile to compile
All,
Readed the source code again, i putted some very specific code which i needed, you might want to modify
xgpio_init() and xgpio_write()
I used it to control a stepper.
I don't know if it compiles under the current source releases. (Haven't created the latest build env yet)
Regards
Zolf
Didn't get a working environment yet,
But to compile the module do the following
Install the ASUS GPL 1927 tar gz
Go to the src/linux/linux/drivers/parport directory
copy parport_fs.c into it
Modify the Makefile
add a line
obj-$(CONFIG_PARPORT_FS) += parport_fs.o
modify the line
parport-objs := share.o ...........
into
parport-objs := parport_fs.o
Enable parport Module support in the kernel
Haven't tested it but it seems to compile
Hello,
with this example code you can directly access the printer port pins.
You must have the toolchan installed to compile.
Compile with ./build.sh
If someone knows how to avoid static linking, please let me know.
Martin
Hi Martins,
I compiled successfully myport but oleg_fn() fails, it quits with "User defined signal 1". I'm running 1.9.2.7-7c.
I assume you're using the parport_fs mentioned above. Did you compile it for this firmware version? Any modification?
Will it run with an USB to parallel adapter?
Thanks,
MatB
Hi MatB;
the last time i testet "myport" was with oleg's firmware 1.9.2.7-6c.
I had no problems then.
I didnt make any modifications tho oleg's firmware.
I just copied the bin file to my USB stick and started from there:
cd /tmp/harddisk/myport
./myport
I have already udatet to oleg's latest fw (1.9.2.7-6c), but not tested "myport" again.
I will do that on weekend an report the results here.
Did you also test the "myport" binary that i compiled (from the tar file)?
Martin
Sure i did. I think the problem is that i'm using an external USB to parallel adaptor, since i have the gx version without parallel port.Quote:
Originally Posted by martins
Also the memory mapping could be wrong, since the gx has 16 megs more.
Bad luck.
Hi MatB,
can you tell me the brand and model of your USB to parallel port adaptor?
Some time ago i wrote a software that talks to the "iowarrior" (USB I/O-chip from codemercs) from userspace. This sw reads/writes the portpins and writes to the LCD display connected to the iowarrior.
I used FIFO's do do the communication: shell->application->USB(iowarrior)->LCD.
Perhaps i can do the same for an USB2LPT adaptor.
Kind regards,
Martin
Here's what i get in the syslog:Quote:
Originally Posted by martins
May 5 18:20:09 kernel: printer.c: usblp0: USB Bidirectional printer dev 6 if 0 alt 0 proto 2 vid 0x4348 pid 0x5584
May 5 18:20:09 kernel: printer.c: usblp0 Device ID string [0]=''
I bought this cheap USB to parallel on ebay for 10 euros, the box says "WahTeng WT-001".
That would be great!Quote:
Some time ago i wrote a software that talks to the "iowarrior" (USB I/O-chip from codemercs) from userspace. This sw reads/writes the portpins and writes to the LCD display connected to the iowarrior.
I used FIFO's do do the communication: shell->application->USB(iowarrior)->LCD.
Perhaps i can do the same for an USB2LPT adaptor.
My idea is to use libusb (which is available as package) but i could not find specs about the protocol of this device.
Hi MatB,
I bought myself an USB to RS232/LPT adaptor.
It has the MOSCHIP MSC7715 inside (one RS232 and one LPT interface).
With the example code usb2lpt you can access the portpins from userspace.
Open the poject with kdevelop or compile with make from command line.
To compile for MIPS (WL-500) take a look at the Makefile and (un)comment the related defines.
I had no time to test on Asus so far, but it should work.
Consult the PDF dokument from MOSCHIP to adopt the sourcecode to your USB interface.
Kind regards,
Martin
Hi MatB,
I tested usb2lpt with my Asusu WL-500g (see attached file).
Have the toolchain installed and (re)compile with ./bulid.sh.
Martin
I uploaded mcs7715.o and issued command: insmod mcs7715 and got:Quote:
Originally Posted by martins
insmod: unresolved symbol _gp_disp
insmod: unresolved symbol printf
can anyone tell what is wrong?:confused:
@martins: thanks, i'll give it a try in the next days!
Hi MoD,
"mcs7715.o" is not a kernel module! It is just the objekt file of "mcs7715.c".
Therefore you can't insmod "mcs7715.o".
The intetion of usb2lpt was to access a usb device from userpace (via usbdevfs) without the need of a special usb device driver.
Just copy usb2lpt (the executable) to your usb stick and start it from there:
cd /tmp/harddisk
./usb2lpt
Kind regards,
Martin
Could anyone help me with how to compile a moscip module? There is a driver source:
http://www.moschip.com/data/products...ux_7715.tar.gz
I would like to use LPT port to connect a printer. I guess it would be usefull for this community.