Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 41

Thread: LPT thermometer

  1. #16
    Join Date
    Sep 2004
    Location
    Netherlands
    Posts
    14

    Source code for a kernel driver to access the parport on a wl500g

    * 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
    Attached Files Attached Files

  2. #17
    Join Date
    Sep 2004
    Location
    Netherlands
    Posts
    14

    Driver source

    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

  3. #18
    Join Date
    Sep 2004
    Location
    Netherlands
    Posts
    14

    Compile the source

    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

  4. #19

    printer port access

    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
    Attached Files Attached Files

  5. #20
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34
    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
    Last edited by MatB; 04-05-2006 at 23:51.

  6. #21

    myport, parallel port access from userspace

    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

  7. #22
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34
    Quote Originally Posted by martins
    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.
    Also the memory mapping could be wrong, since the gx has 16 megs more.
    Bad luck.

  8. #23

    USB2LPT adaptor

    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

  9. #24
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34
    Quote Originally Posted by martins
    Hi MatB,

    can you tell me the brand and model of your USB to parallel port adaptor?
    Here's what i get in the syslog:
    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".
    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.
    That would be great!
    My idea is to use libusb (which is available as package) but i could not find specs about the protocol of this device.

  10. #25

    USB to LPT from userspace

    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
    Attached Files Attached Files

  11. #26

    usb2lpt for MIPS

    Hi MatB,

    I tested usb2lpt with my Asusu WL-500g (see attached file).
    Have the toolchain installed and (re)compile with ./bulid.sh.

    Martin
    Attached Files Attached Files

  12. #27
    Quote Originally Posted by martins
    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:

    insmod: unresolved symbol _gp_disp
    insmod: unresolved symbol printf

    can anyone tell what is wrong?

  13. #28
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    34
    @martins: thanks, i'll give it a try in the next days!

  14. #29

    usb2lpt

    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

  15. #30

    moschip module

    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.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •