[SOLVED] How Hard To Convert RedHat To Mint For USB-RS232?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

[SOLVED] How Hard To Convert RedHat To Mint For USB-RS232?

Postby Webtest on Sat Jan 19, 2013 8:01 am

Esteemed Forum Participants and Lurkers:
========================================

EDIT: Support for USB-RS-232 adapters is built in for most Linux kernels.

What a frustration ...
. . . Support for WinXP == Support for WinXP --> TRUE!
. . . Support for Linux == Support for Linux --> Mostly FALSE! <--- UNLESS YOU KNOW WHAT YOU ARE DOING!

I bought a StarTech.com USB to RS232 Serial Adapter (ICUSB232PRO) so that I can use my IBM laptop to program and perhaps develop some data capture software for a Sharp XE-A401 cash register that belongs to Project Share - a local charitable food bank and social support organization. The StarTech ad claims support for Windows, Mac, and Linux! There is a Win-XP application by Sharp for the register that works fine but is very limited in capabilities. I was hoping to fine tune the data capture capabilities, and perhaps even move them to an Arduino Mega or a Raspberry Pi.

When the adapter arrived and I loaded the software CD, I discovered that the Linux "Support" (sic) consisted of Make files and Source files for RedHat 7.3, 8, and 9 ... the latest from March of 2004. I did try the Makefile for RedHat 9, but as I expected, it fell flat on it's face. I tried to attach the Makefile and the driver code. When I plug in the adapter nothing happens.
Code: Select all
mint mkdriver # make inst
gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -I/usr/src/linux-2.4/drivers/usb/serial   -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -Wno-unused  -DMODULE -c pl2303.c
pl2303.c:33:26: fatal error: linux/config.h: No such file or directory
compilation terminated.
make: *** [pl2303.o] Error 1

My problems is: What is the magnitude of the challenge to convert a very old (Pre-Ubuntu!) driver (evidently) based on the RedHat version of the 2.4 kernel (somewhere between Debian "potato" and "woody") to a Mint driver??? I am a decent hacker in several languages, but have never compiled anything for Linux yet. Am I facing an 80 hour or an 800 (or more?) hour task?

I have looked at the code, and just the list of 'include' files is daunting. The directory structure is different than Mint ... some of the files do not exist on my Mint LiveCD ... and there are 82 copies of 'config.h' files scattered about in the 14.1 LiveCD file system. Holy grief ... where would I even start?

Driver zip file (Win, Mac, & Linux) (How do I attach just 2 of the Linux files?)

I would certainly appreciate any comments, suggestions, and assistance in determining the approach to solving this problem.
Blessings in abundance, all the best, & ENJOY!
Art in Carlisle PA USA
HP dx2400 Core 2 Duo 4 GB - Mint 8 Helena Gnome <LinuxMint-8.iso 27-Nov-2009 19:11 688M on LOCKED Kanguru USB drives and SD flash cards> - Also Mint 10 Julia Gnome LiveDVD, Mint 13 Maya Mate 32-bit LiveUSB, Mint 15 Olivia Mate 32-bit LiveUSB
Webtest
Level 3
Level 3
 
Posts: 168
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA

Linux Mint is funded by ads and donations.
 

Re: [SOLVED] How Hard To Convert RedHat To Mint For USB-RS23

Postby Webtest on Sun Feb 10, 2013 8:31 pm

Esteemed Forum Participants & Lurkers:

I was able to contact Greg Kroah-Hartman, the author of the driver mentioned above, and he assured me that the USB-Serial driver is already built into most kernels, so nothing is required except to plug the Serial Adapter into the USB port. However, the problem is that there is absolutely no indication that anything happens, and how can a novice be expected to find a 'tty' device hidden among the 98 other 'tty' devices that are already in the system? I did learn that an easy way to determine what gets loaded is the following:
Code: Select all
mint@mint ~ $ dmesg | grep ttyUSB
[  909.806100] usb 1-4.4: >pl2303 converter now attached to ttyUSB0
Immediately after you plug in the adapter, the 11 or so lines at the end of 'dmesg' show the discovery, identification, loading, and attachment of the adapter. Once you find the device ID (ttyUSB0), it can be used with 'minicom -s' (direct serial port connection) or whatever serial port application you intend to use.
HP dx2400 Core 2 Duo 4 GB - Mint 8 Helena Gnome <LinuxMint-8.iso 27-Nov-2009 19:11 688M on LOCKED Kanguru USB drives and SD flash cards> - Also Mint 10 Julia Gnome LiveDVD, Mint 13 Maya Mate 32-bit LiveUSB, Mint 15 Olivia Mate 32-bit LiveUSB
Webtest
Level 3
Level 3
 
Posts: 168
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA


Return to Newbie Questions

Who is online

Users browsing this forum: Google [Bot] and 34 guests