Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 18 Jun 2013, 20:45
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
redirecting COM port traffic to USB?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
biggerhammer

Joined: 11 Apr 2012
Posts: 3

PostPosted: Thu 12 Apr 2012, 12:26    Post_subject:  redirecting COM port traffic to USB?
Sub_title: My laptop has no serial ports, but the program demands them. USB-serial adaptor?
 

Hello, all.
I have an old program that is used to update firmware on industrial wire-stripping machines. It connects to the machine via a serial cable.

My laptop (like most laptops made since the turn of the century) does not have serial ports.

I have a USB-serial adaptor from Cables to Go. I think that I have it working, based on instrictions I found (http://blog.mypapit.net/2008/05/how-to-use-usb-serial-port-converter-in-ubuntu.html) and translated over to Puppy.

Unfortunately, the program fails under Puppy because it goes looking for that serial port.

How can I get Puppy to basically lie to my program, and tell it that the USB is in fact where serial port signals should go? In the dusty old days of DOS I think I would be using a pipe but it's been quite a while and my memory is not the best.

The recipe:
Puppy 4.3.1
Old Lenovo T60 laptop.
Cables to Go USB-Serial adaptor.
Serial cable.
Schleuniger MegaStrip 9600 machine.

Thank you for your time and help.
Back to top
View user's profile Send_private_message 
jafadmin

Joined: 19 Mar 2009
Posts: 347

PostPosted: Thu 12 Apr 2012, 13:49    Post_subject:  

Tell us about the application you use to push the updates. How does it know which serial port to use? Can you manually set the serial port, or does it automatically search? Is this a linux app or a DOS app running with wine?

You can test whether the USB serial port is communicating with the target device by using picoterm

>picoterm /dev/ttyUSB0

If it is communicating ok with picoterm then it's just a case of geting you app to talk to the serial port.

Edited_time_total
Back to top
View user's profile Send_private_message 
biggerhammer

Joined: 11 Apr 2012
Posts: 3

PostPosted: Thu 12 Apr 2012, 13:52    Post_subject:  

The program is either late DOS or early Windows vintage. It uses COM1 and to my knowledge there is no way to tell it to use any other port. I've had it running under Wine but it only runs long enough to throw an error- that it cannot find COM1. It should work properly once I get the COM1 wrinkle ironed out.
Back to top
View user's profile Send_private_message 
jafadmin

Joined: 19 Mar 2009
Posts: 347

PostPosted: Thu 12 Apr 2012, 14:07    Post_subject:  

It's probably looking for Address: 0x3F8 Irq: 4 which is the standard com1 in DOS.

At this point I don't know how to create an alias that will satisfy your needs. Maybe someone else has the chops to help out here. Sorry.

[EDIT] Oops, spoke too soon. you can map it in your wine config file.

http://www.witch.westfalen.de/Wine-HOWTO/configsystem.html

Look down at the section on Common Sections. There is a section for serial port mappings.

That should do it for you.
Back to top
View user's profile Send_private_message 
biggerhammer

Joined: 11 Apr 2012
Posts: 3

PostPosted: Thu 12 Apr 2012, 14:24    Post_subject:  

I'll try that- thank you!
Back to top
View user's profile Send_private_message 
jafadmin

Joined: 19 Mar 2009
Posts: 347

PostPosted: Thu 12 Apr 2012, 14:38    Post_subject:  

Here's another link on how to create the com port for dos.

http://murga-linux.com/puppy/viewtopic.php?p=455453&sid=daf3d8931adb1f6760e876aacd03c60d
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 2730
Location: Kiel,Germany

PostPosted: Thu 12 Apr 2012, 15:42    Post_subject:  

I have a USB to SERIAL converter too, which runs ok with windows to get an attached three button mouse to work, but i could not make it work on Puppy . SOME TIME LATER : WORKS !

The converter is listed in dmesg or /var/log/messages as /dev/ttyUSB# with only one device node attached to it .

I think i was trying something like ln -sf ttyUSB0 /dev/mouse and cannot remember if that could create any information somewhere . SOME TIME LATER : WORKS !

When i plug it in , dmesg shows this :

[96274.967269] usb 6-1: new full speed USB device using uhci_hcd and address 4
[96275.115366] usb 6-1: New USB device found, idVendor=067b, idProduct=2303
[96275.115371] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[96275.115375] usb 6-1: Product: USB-Serial Controller
[96275.115378] usb 6-1: Manufacturer: Prolific Technology Inc.
[96275.115620] usb 6-1: configuration #1 chosen from 1 choice
[96275.208869] USB Serial support registered for pl2303
[96275.208914] pl2303 6-1:1.0: pl2303 converter detected
[96275.220672] usb 6-1: pl2303 converter now attached to ttyUSB3
[96275.220716] usbcore: registered new interface driver pl2303
[96275.220719] pl2303: Prolific PL2303 USB to serial adaptor driver

cat /proc/bus/usb/devices :

T: Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=067b ProdID=2303 Rev= 3.00
S: Manufacturer=Prolific Technology Inc.
S: Product=USB-Serial Controller
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=pl2303
E: Ad=81(I) Atr=03(Int.) MxPS= 10 Ivl=1ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms

lsmod |grep usb

usbserial 26720 4 pl2303,

shows that the driver loaded automatically

modinfo pl2303 :

vermagic: 2.6.30.9-i586-dpup005-Celeron2G SMP mod_unload 586
parm: debug:Debug enabled or not (bool)

bash-3.00# modprobe -vr pl2303
rmmod /lib/modules/2.6.30.9-i586-dpup005-Celeron2G/kernel/drivers/usb/serial/pl2303.ko.gz

[96751.780572] usbcore: deregistering interface driver pl2303
[96751.781060] pl2303 ttyUSB3: pl2303 converter now disconnected from ttyUSB3
[96751.781120] pl2303 6-1:1.0: device disconnected
[96751.781166] USB Serial deregistering driver pl2303

bash-3.00# modprobe -v pl2303 debug=1
insmod /lib/modules/2.6.30.9-i586-dpup005-Celeron2G/kernel/drivers/usb/serial/pl2303.ko.gz debug=1

[96771.790051] USB Serial support registered for pl2303
[96771.790295] pl2303 6-1:1.0: pl2303 converter detected
[96771.790305] drivers/usb/serial/pl2303.c: device type: 2
[96771.791683] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
[96771.792422] drivers/usb/serial/pl2303.c: 0x40:0x1:0x404:0x0 0
[96771.793426] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
[96771.794421] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8383:0x0 1 - 0
[96771.795418] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
[96771.796424] drivers/usb/serial/pl2303.c: 0x40:0x1:0x404:0x1 0
[96771.797489] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8484:0x0 1 - 2
[96771.798420] drivers/usb/serial/pl2303.c: 0xc0:0x1:0x8383:0x0 1 - 0
[96771.799419] drivers/usb/serial/pl2303.c: 0x40:0x1:0x0:0x1 0
[96771.800423] drivers/usb/serial/pl2303.c: 0x40:0x1:0x1:0x0 0
[96771.801833] drivers/usb/serial/pl2303.c: 0x40:0x1:0x2:0x44 0
[96771.802145] usb 6-1: pl2303 converter now attached to ttyUSB3
[96771.802189] usbcore: registered new interface driver pl2303
[96771.802192] pl2303: Prolific PL2303 USB to serial adaptor driver

bash-3.00# lsmod |grep mouse
bash-3.00# modinfo sermouse
filename: /lib/modules/2.6.30.9-i586-dpup005-Celeron2G/kernel/drivers/input/mouse/sermouse.ko.gz
license: GPL
description: Serial mouse driver
author: Vojtech Pavlik <vojtech@ucw.cz>
alias: serio:ty02pr07id*ex*
alias: serio:ty02pr06id*ex*
alias: serio:ty02pr05id*ex*
alias: serio:ty02pr04id*ex*
alias: serio:ty02pr03id*ex*
alias: serio:ty02pr02id*ex*
alias: serio:ty02pr01id*ex*
depends:
vermagic: 2.6.30.9-i586-dpup005-Celeron2G SMP mod_unload 586

bash-3.00# modprobe -v sermouse
insmod /lib/modules/2.6.30.9-i586-dpup005-Celeron2G/kernel/drivers/input/mouse/sermouse.ko.gz

[nothing new in dmesg]

So will try again with something like

UDEV_LOG=$LOGLEVEL /sbin/udevd --daemon

in /etc/rc.d/rc.sysinit , where LOGLEVEL can be something from 1-7 , with 7 being so noisy, that

-s SIZE Max size (KB) before rotate (default:200KB, 0=off)
-b N N rotated logs to keep (default:1, max=99, 0=purge)

should be adjusted to syslogd line there in rc.sysinit, too .

Newer Puppies launch syslogd and klogd from /etc/init.d/messagebus script .

SOME time later : Altered /usr/sbin/input-wizard for giving chance to link /dev/mouse to /dev/ttyUSB3 ,
restarted X and voilá serial mouse works now .::very,very,very HAPPY::.
Back to top
View user's profile Send_private_message Visit_website 
8-bit


Joined: 03 Apr 2007
Posts: 3033
Location: Oregon

PostPosted: Tue 15 May 2012, 21:43    Post_subject:  

My USB2serial device was bought used with unknown manufacturer.
Under Windows Vista and Windows 7, I tried the Prolific driver and it worked.
But under Puppy Lucid 520, although the device is seen and I told the application to use USBtty0, and the application says it made a connection, no data is getting transferred either way.

The device is listed with lsusb as Device 14 ID:067b:2303

I would really like to get the device working with my application and am at a loss of what next with puppy.
Also, the manufacturer is shown as Prolific like Karls is.

I should mention that I followed the instructions that bighammer did to set it up.
Also, the application says a connection was made to ttyUSB0, but no data is being transferred.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0603s ][ Queries: 11 (0.0041s) ][ GZIP on ]