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

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Webtest
Level 4
Level 4
Posts: 375
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA

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

Post by Webtest »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
BOAT - a hole in the water that you pour money into
LINUX - a hole in your life that you pour TIME into

HP dx2400 Core 2 Duo 8 GB. Mint 13/15/17.x/18.x Mate <on LOCKED SD cards, and Kanguru USB drives> No Hard Drive / No SSD
User avatar
Webtest
Level 4
Level 4
Posts: 375
Joined: Sun Feb 21, 2010 4:45 pm
Location: Carlisle, Pennsylvania, USA

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

Post by Webtest »

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.
BOAT - a hole in the water that you pour money into
LINUX - a hole in your life that you pour TIME into

HP dx2400 Core 2 Duo 8 GB. Mint 13/15/17.x/18.x Mate <on LOCKED SD cards, and Kanguru USB drives> No Hard Drive / No SSD
Locked

Return to “Beginner Questions”