Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Alternative Computing > Linux Support
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read

Linux Support Linux - Operating Systems and Applications Support

Reply
 
Thread Tools
Old 11-21-2008, 08:23 AM   #1 (permalink)
Registered User
 
Join Date: Nov 2008
Posts: 2
OS: Linux (Linpus)


USB Serial convetor - Linpus (Fedora)

Hi All,

I'm new to TSF and also Linux, so I'm hoping some of the gurus here can help me.

As I say I'm new to Linux but working to get to grip with things. We have a new project started whereby we are porting our existing code from an Embedded system to a netbook environment, Acer Aspire One which is running Linpus Lite (Commercial Fedora). Anyhow the Aspire One does not come with serial ports and we have to have at least one serial port for our application to capture data from a weigh scale.

So I've got a USB to Serial convertor cable from Aten, it's using the PL2303 chipset. I have now successfully installed the cable and when I run dmesg I can see the device is connected and drivers are loaded "pl2303 converter now attached to ttyUSB0".

I have few issues:

1. I need a way to test that it is indeed working, so I was wondering if there is an application I can run on Linux (similar to Hyperterminal) so that I can capture the data from the scales or other serial device.

2. Within Linux, is there a method to configure the COM port. I have created a symbolic link (ln -s /dev/ttyUSB0 com1) but I've now idea how to configure the port to 9600,n,8,1.

3. I have a utility written for Windows which we use to upload data from our Embedded system and while I can get the application to execute using Wine, the serial comms is not working. Initially the application could not "see" the com port, however I found that if I created a symbolic link "ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1" that the application now sees the port and I believe tries to communicate using it. But I don't know if the communication is failing because the port is not actually working or because it's not configured correctly.

Any suggestions/guidance would be most welcome.

Thanks

David
dave66 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Sponsored Links
Old 11-22-2008, 02:44 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2007
Location: Littleton, Colorado USA
Posts: 455
OS: xp 64 sp2 Fedora Core 8 (vmware xp core 8 x32) Minix


Re: USB Serial convetor - Linpus (Fedora)

The port configuration is done through the "setserial" program. Do a "man 8 setserial". When I used to get on the Internet with a modem it worked great. I'm not sure if setserial will work with wine though. Setserial generally works with the COM ports.

I am under the belief that the current 2.6.27 (fedora 9 64) use polling to process interrupts. I'm not sure how setserial can install an interrupt driven driver. I currently have all my serial ports (and parallel) turned off in my BIOS.

Sorry I can't be of more help.
lensman3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 11-24-2008, 03:39 AM   #3 (permalink)
Registered User
 
Join Date: Nov 2008
Posts: 2
OS: Linux (Linpus)


Re: USB Serial convetor - Linpus (Fedora)

Quote:
Originally Posted by lensman3 View Post
The port configuration is done through the "setserial" program. Do a "man 8 setserial". When I used to get on the Internet with a modem it worked great. I'm not sure if setserial will work with wine though. Setserial generally works with the COM ports.

I am under the belief that the current 2.6.27 (fedora 9 64) use polling to process interrupts. I'm not sure how setserial can install an interrupt driven driver. I currently have all my serial ports (and parallel) turned off in my BIOS.

Sorry I can't be of more help.
Thanks for the reply. I have now discovered the the Acer Aspire One with Linpus does not have either setserial or getserial available. So I'll need to work out how to get them installed.
dave66 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 11-24-2008, 07:39 PM   #4 (permalink)
Registered User
 
Join Date: Oct 2007
Location: Littleton, Colorado USA
Posts: 455
OS: xp 64 sp2 Fedora Core 8 (vmware xp core 8 x32) Minix


Re: USB Serial convetor - Linpus (Fedora)

Look at the "stty" command. This can also set serials. It is hard to use (in my opinion).

Unfortunately you have to figure out the "raw" and "cooked" modes. Raw is whatever comes in from the serial port is tranfered as is. Cooked is the driver can change (cook) some of the characters before they passed out of the kernel.

stty will be found on ALL unix/Linix versions, but each will be just different enough nothing will work between hardware manufacturers.

Last edited by lensman3 : 11-24-2008 at 07:43 PM.
lensman3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 11-25-2008, 03:06 PM   #5 (permalink)
Registered User
 
Join Date: Nov 2008
Posts: 2
OS: Slackware Linux current


Re: USB Serial convetor - Linpus (Fedora)

Cutecom is pretty easy to use, but somewhat limited:
http://cutecom.sourceforge.net/

I prefer using cu, which is part of uucp. It's a little trickier to set up, but worth the simplicity in the end.
ciotog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Old 11-25-2008, 03:14 PM   #6 (permalink)
Registered User
 
Join Date: Nov 2008
Posts: 2
OS: Slackware Linux current


Re: USB Serial convetor - Linpus (Fedora)

If you do decide to go with uucp, here's an example configuration:

File /etc/uucp/port:
Code:
#
# /dev/ttyUSB0 at 9600
#
port		usbtoserial0_9600
type		direct
device		/dev/ttyUSB0
speed		9600
hardflow	false
File /etc/uucp/sys:
Code:
#
# /dev/ttyUSB0 at 9600
#
system		USB0@9600
port		usbtoserial0_9600
time		any
You would then open up a terminal emulator and run the following:
Code:
cu USB0@9600
and you're good to go. To disconnect, type "~.". For help with other commands, type "~?".

I find this much easier to use than minicom.
ciotog is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Bookmark on Thread SoupReddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -7. The time now is 07:14 AM.



Copyright 2001 - 2008, Tech Support Forum

Search Engine Friendly URLs by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82