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

Joined
Aug 27, 2008
Messages
8
Reaction score
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
 
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.
 
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 said:
There you go[attachment=0:23yqimgs]pl2303.zip[/attachment:23yqimgs]

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

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.

sideways said:
The kernel compile isn't too.............. USB Prolific 2303 Single Port Serial Driver
 
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)
 
You should have read my post more carefully, you only had 3 steps to follow! :)

sideways said:
There you go[attachment=0:22f5ayjk]pl2303.zip[/attachment:22f5ayjk]

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
 
sideways said:
You should have read my post more carefully, you only had 3 steps to follow! :)


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:

2) That the user you are running the software on has read and write access to your COM port (usually /dev/ttyS0 for COM1). You can try:

sudo chmod 777 /dev/ttyS0 as a quick test, but the correct way would be:
joako@joako-english:~> ll /dev/ttyS0

You will get an output such as:

crw-rw---- 1 root uucp 4, 64 2006-05-02 02:45 /dev/ttyS0

Root is the USER that "owns" the port, "uucp" is the GROUP that "owns" the port, you need to use the admin utillity in your distro (on SuSE it is YaST2) to add that group to your user, otherwise you would have to chmod the port each time you reboot.

This program is a major reason I bought the AAO and I really dont want to resort to installing windows.
 
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. )
 
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
 
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.
 
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
 
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...
 
Back
Top