HOW to make an USB/Serial Adaptor working under Linpus?

Discussion in 'Acer Aspire One' started by gerhardh, Sep 3, 2008.

  1. gerhardh

    gerhardh

    Joined:
    Aug 27, 2008
    Messages:
    8
    Likes Received:
    0
    Hello !

    I´ve got a problem when plugging in an PROFILIC USB to Serial adapter: Nothing happen and theres no TTYUSB... device.
    I tried to solve the problem at my own but as a newbie to Linux I had no chance. Here are some outputs which might help:

    Code:
    [user@localhost ~]$ lsusb
    Bus 005 Device 001: ID 0000:0000  
    Bus 004 Device 001: ID 0000:0000  
    Bus 003 Device 001: ID 0000:0000  
    Bus 002 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
    Bus 002 Device 001: ID 0000:0000  
    Bus 001 Device 002: ID 0c45:62c0 Acer Crystal Eye Webcam
    Bus 001 Device 001: ID 0000:0000
    Tail of dmesg:
    Code:
    2 del_timer sc_rfkilltimer 
    ath_stop_locked: LED OFF 2
    del_timer sc_rfkilltimer 
    Adding 1052248k swap on /dev/sda2.  Priority:-1 extents:1 across:1052248k
    usb 2-1: new full speed USB device using uhci_hcd and address 2
    usb 2-1: configuration #1 chosen from 1 choice
    [user@localhost ~]$ 
    
    [user@localhost ~]$ modprobe pl2303
    FATAL: Module pl2303 not found.
    [user@localhost ~]$ 
    I figured out that it has something to do with this pl2303 Module, I have got the pl2303.h and the pl2303.c but not the .o of it.
    I have tried to compile those modules with "make modules", "make" and "make all".....don´t know which command is right but in the end I always was missing the .o-file. For some reason it doesn´t compile.

    Maybe some of you guys could help me? Thank you in advance and

    Cheers

    Gerhard
     
    gerhardh, Sep 3, 2008
    #1
  2. gerhardh

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    From /boot/config_080627 :

    # CONFIG_USB_SERIAL_PL2303 is not set

    This is from a copy of a recovery-dvd.

    I think you must then recompile the whole kernel with this line changed to '=m'.

    But that is not really for a newcomer to Linux.

    --Japser.
     
    Japser, Sep 3, 2008
    #2
  3. gerhardh

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Japser, Sep 5, 2008
    #3
  4. gerhardh

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    There you go[attachment=0:3m2810o4]pl2303.zip[/attachment:3m2810o4]

    unzip the pl2303.ko file and copy it to /lib/modules/2.6.23.9lw/kernel/drivers/usb/, then run depmod and modprobe:

    Code:
    unzip pl2303.zip
    sudo cp pl2303.ko /lib/modules/2.6.23.9lw/kernel/drivers/usb/
    sudo depmod
    sudo modprobe pl2303
    
    The kernel compile isn't too difficult, after the first compile you can just add new modules in the menuconfig stage and type 'sudo make modules' to build the module in a few seconds (The compile will only reset if you type 'sudo make clean' and then the next compile will take 10-20mins again)

    Finding the driver in menuconfig can be tricky, yours was in Device Drivers -> USB support -> USB Serial Converter support -> USB Prolific 2303 Single Port Serial Driver
     
    sideways, Sep 5, 2008
    #4
  5. gerhardh

    was8v

    Joined:
    Sep 27, 2008
    Messages:
    5
    Likes Received:
    0
    I've done this - what do i need to do next?

    Not sure what the below means?! I really need my Prolific 2303 to work! Thanks.

     
    was8v, Sep 28, 2008
    #5
  6. gerhardh

    was8v

    Joined:
    Sep 27, 2008
    Messages:
    5
    Likes Received:
    0
    OK worked it out. At Step 6 in this guide:

    Do the bits described by sideways.

    Phew.

    Many thanks everyone for taking the time to put the above together.
     
    was8v, Sep 29, 2008
    #6
  7. gerhardh

    was8v

    Joined:
    Sep 27, 2008
    Messages:
    5
    Likes Received:
    0
    After following the intructions above recompiling the kernel and adding in the pl2303 module, my sound stopped working. Attempting to reinstall alsa messed the systme up so i recovered using the dvd.

    Now upon trying again from the fresh install i was sure a whole kernel recomiple was uneccessary.

    I found that literally ALL you have to do to get the PL2303 working is:

    Download http://frlinux.net/weblog/pl2303.ko

    Put it in:
    Code:
    /lib/modules/2.6.23.9lw/kernel/drivers/usb/serial
    Open a terminal and type:
    Code:
    depmod -a
    Plug in you PL2303 device and type in to the terminal
    Code:
    dmesg
    You should get something like
    Code:
    usb 3-1: new full speed USB device using uhci_hcd and address 2
    usb 3-1: configuration #1 chosen from 1 choice
    pl2303 3-1:1.0: pl2303 converter detected
    usb 3-1: pl2303 converter now attached to ttyUSB0
    Meaning your PL2303 can be accessed through ttyUSB0

    (From http://frl1nux.blogspot.com/2008/09/ace ... l2303.html)
     
    was8v, Sep 30, 2008
    #7
  8. gerhardh

    sideways

    Joined:
    Aug 21, 2008
    Messages:
    172
    Likes Received:
    0
    You should have read my post more carefully, you only had 3 steps to follow! :)

     
    sideways, Sep 30, 2008
    #8
  9. gerhardh

    was8v

    Joined:
    Sep 27, 2008
    Messages:
    5
    Likes Received:
    0

    lol, i see that now :oops: nevbermind, its working now (ort at least ttyUSB0 has been assigned to it, I have no way of testing).

    Now to work out how to let wine access that serial port! I want to map ttyUSB0 to wine's COM1 - I set up a symbolic link but the windows program still grumbles "COM port not accessible".

    Code:
    ln -s /dev/ttyUSB0 com1
    The windows program is VAGCOM - I'm following instructions here - http://forums.vwvortex.com/zerothread?id=2725554

    I think i'm stumbling on this bit:

    This program is a major reason I bought the AAO and I really dont want to resort to installing windows.
     
    was8v, Oct 1, 2008
    #9
  10. gerhardh

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    The command could be:

    sudo usermod -aG uucp user

    And reboot, then check with the command 'groups' or 'id'

    ( And use ls -l in case ll does not work. )
     
    Japser, Oct 1, 2008
    #10
  11. gerhardh

    champagj

    Joined:
    Aug 17, 2008
    Messages:
    32
    Likes Received:
    0
    Location:
    Toronto, Canada
    Jasper,

    Thank you for the zip files and the instructions. I was able to get it to dev/ttyUSB0 fairly easily. I still have to do a sudo chmod 777 /dev/ttyUSB0 each time I connect but I can live with that.

    I do still experience problems making a good connection to a PIC programmer via RS232. The software I used is able to see ttyUSB0 as a valid port but it seems the timing is off. When doing write - readback, the data gets corrupted (a few zero & ones are changed).

    Where can i define the speed of communication? (my software doesnt have any serial setting for speed..)

    Any suggestions?

    Thanks,

    JF
     
    champagj, Nov 2, 2008
    #11
  12. gerhardh

    Japser

    Joined:
    Aug 28, 2008
    Messages:
    267
    Likes Received:
    0
    Sorry, no ideas on these matters.

    For the permissions thing: that should be solved by adding yourself to the proper group, as described earlier in this thread.

    --Japser.
     
    Japser, Nov 2, 2008
    #12
  13. gerhardh

    dave66

    Joined:
    Oct 13, 2008
    Messages:
    3
    Likes Received:
    0
    Hi,

    I have found this thread very helpful and have managed to get my pl2303 based USB Serial cable installed and even have it "working" with a windows application under Wine. I say "Working" as the application is seeing the port as COM1 without any problem but it does not seem to be communicating with a connected device.

    Basically what I'm doing is connecting the AA1 to a small terminal that has a serial port, the windows application reads files (backup utility) from the serial port on the connected terminal. However I feel that the problem is related to the settings of COM1. I'm new to linux and working my way through things but I can seem to find out how to:

    1. Configure the port under Linpus

    2. Configure the port in Wine

    I need to set the port to 9600,n,8,1.

    Any suggestions would be very welcome.

    Thanks

    Dave
     
    dave66, Nov 20, 2008
    #13
  14. gerhardh

    polwart

    Joined:
    Jan 2, 2009
    Messages:
    4
    Likes Received:
    0
    Not sure how far people got with getting this to work in Wine. Some applications running under Wine need to see the Com ports listed in the registry to access them. To do this you need to add lines to the registry. (First Wine must be shut or your changes to the registry will not be permanent). Then edit the system.reg file which is in the ~/.wine/ folder. Add something like the following:

    [HARDWARE\\DEVICEMAP\\SERIALCOMM] 1234289483
    "\\Device\\Serial0"="COM1"

    Save the file. Your windows program should now find the Com port. (assuming you have the symbolic link, and permissions set correctly as discussed elsewhere).

    I am still having issues getting the windows program to correctly control/liase with the Com port though...
     
    polwart, Feb 14, 2009
    #14
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.