Linux and USB to Serial Adapters

Let your stereophile run loose! Talk gear, media, and other electronics that makes music for your ears.

Moderators: Bookworm, starkruzr, MrFireDragon, PrettyPrincess, Wapsi

Post Reply
User avatar
TazManiac
Posts: 3290
Joined: Fri Nov 29, 2013 6:53 pm

Linux and USB to Serial Adapters

Post by TazManiac » Sat Feb 09, 2019 10:40 pm

OK, I'm dropping this in the Audio forum on'a'count'a a lot of the spark-heads I know frequent it, so, please bear with me...

Any way, I'm looking to either buy a prefabricated USB to 12pin ODB1 cable OR hack one together for the shear fun of cobbling & the cheapskate in me always gets a vote.

What I'm wondering is: Does any one have experience w/ something like:

"6pin FTDI FT232RL USB to Serial adapter module USB TO TTL RS232 Arduino Cable"

The key parts of that long description being the 'FTDI', 'USB to Serial', and really-
whether it'll work with Linux, driver(s) wise.

I'm looking around everywhere, but I thought I'd ask here too...

'tanks.

User avatar
Bookworm
Posts: 539
Joined: Sun Jul 29, 2012 11:59 pm
Location: Houston, TX
Contact:

Re: Linux and USB to Serial Adapters

Post by Bookworm » Sat Feb 09, 2019 11:38 pm

So, you're wanting a Arduino serial connection?

Well, there's this.

https://www.instructables.com/id/How-to ... e-serial-/ (USB to USB)

There are also a lot of USB to serial cables already - RS232.

It _sounds_ like you want to connect your Arduino to the ODB interface on your car, however. I'm not sure what benefit you'd get from that, as there are a number of active display scanners available already.

http://arduinodev.com/hardware/obd-kit/
https://forum.arduino.cc/index.php?topic=95037.0
and
https://www.instructables.com/id/Hack-a ... BD2-Scann/

Does that help?
I'll get a life when it's proven and substantiated to be better than what I'm currently experiencing.

User avatar
TazManiac
Posts: 3290
Joined: Fri Nov 29, 2013 6:53 pm

Re: Linux and USB to Serial Adapters

Post by TazManiac » Sun Feb 10, 2019 1:07 am

I'm going to pursue those links you posted, and there _is_ already a pre-fabricated product (USB - ODB1/12 pin).
http://www.reddevilriver.com/aldl.html

But the objective is multifold:

- ODB1 on a 1993 GMC w/ Throttle Body Injection, O2 Sensor, and Cat. Converter, etc.
I can get real time data from the onboard sensors, including logging over time.

- Buy the turn-key cable VS fab one up myself for personal satisfaction, potentially saving a few bucks, if any.

- The Linux I'm using is less Raspberry Pi and more Laptop w/ Linux OS.
Although, I think I do have one or two of those little thing-a-ma-bobs around, but that would be for later.

This is for a 8 cylinder pick-em-up that's clocking over 480k miles and counting.
It's still in decent shape but it's getting to be a larger portion Art vs Science going forward.

btw- This type of application won't work with ODBII Devices, let alone the only slighter later 16 pin ODBI type setups.
I've had to stall on this until tomorrow...

User avatar
Dave
Posts: 6849
Joined: Tue Jul 31, 2012 5:58 pm
Location: Mountain View, CA, USA

Re: Linux and USB to Serial Adapters

Post by Dave » Sun Feb 10, 2019 1:24 am

TazManiac wrote:
Sat Feb 09, 2019 10:40 pm
What I'm wondering is: Does any one have experience w/ something like:

"6pin FTDI FT232RL USB to Serial adapter module USB TO TTL RS232 Arduino Cable"

The key parts of that long description being the 'FTDI', 'USB to Serial', and really-
whether it'll work with Linux, driver(s) wise.
The FTDI serial chipsets are very well supported by Linux. I use them regularly. The chips and adapters and cables, if genuine, usually work very well. They're pretty much the kings of the USB-to-serial world, quality-wise.

It's the "genuine" part you have to watch out for. A high percentage of USB serial adapters/cables out there in the market use unauthorized counterfeit "clones" of the adapter chips. These sometimes don't work reliably, and in some cases the genuine-manufactuer drivers will recognize that the chips are counterfeit and will refuse to work with them.

FTDI got into hot water a few years ago by releasing a Windows driver update which would deliberately "brick" counterfeit chips... they revoked this driver, but I understand they sent out another which detects counterfeits and causes them to transmit an unwanted 'Warning, counterfeit FTDI adapter" periodically, I can't blame 'em for being honked off at people who counterfeit their hardware and thus misappropriate their brand name and IP and market, but they did manage to hurt a bunch of customers who had quite innocently purchased counterfeit cables.

Both Digi-Key and Mouser are both authorized FTDI distributors, and you can assume that any FTDI cable or adapter you buy through them is genuine. eBay vendors, not so much (as in, you can usually trust them as far as you can spit a bassoon).

Some companies (e.g. RT Systems) OEM the FTDI chips, and then reprogram their USB vendor-and-part-ID fields to be unique - the normal FTDI drivers won't recognize them, only the drivers which RT Systems provides with the cables (and the radio-programming software which expects to use them). The Linux FTDI driver has a neat feature which lets you add vendor/product-ID pairs at runtime, so it can be made to work with such rebranded FTDI devices.

Some of the USB-to-serial adapters have selection jumpers, which let you select whether you want 5 volts or 3.3 on the serial side. This is a nice feature... using a 3.3-volt cable with a 5-volt Arduino (or similar) may not work, and using a 5-volt cable with a 3.3-volt chip/board may release expensive smoke.
Last edited by Dave on Sun Feb 10, 2019 2:46 pm, edited 1 time in total.

User avatar
TazManiac
Posts: 3290
Joined: Fri Nov 29, 2013 6:53 pm

Re: Linux and USB to Serial Adapters

Post by TazManiac » Sun Feb 10, 2019 2:00 pm

Thx for the hands-on 'sperience Dave.

I'm going to ask the seller of the turn-key cable if he can ID the parts inside, although the thing comes w/ a software CD- you'd think they'd make sure Windows systems would have problem free drivers included. Cause, you know, Online Vendors are super-reliable and totally knowledgeable about the products they sell...

And yeah, I'd just found out about the Counterfeit Detection dust-up, kind of like the past trouble w/ Inkjet Manufacturers downloading a Driver/App 'upgrade' that detected non-OEM and/or refilled ink cartridges...

I'll prob pull the trigger on some thing this week or the next, keeping you guys in the loop...

User avatar
Dave
Posts: 6849
Joined: Tue Jul 31, 2012 5:58 pm
Location: Mountain View, CA, USA

Re: Linux and USB to Serial Adapters

Post by Dave » Sun Feb 10, 2019 3:03 pm

The sorts of chips you're likely to find in a simple USB-to-serial cable, these days, are either FTDI, the Prolific pl2303 series, the SiLabs 210x series, or the Winchiphead CH341.

The Prolific is probably the commonest, and is very widely counterfeit. It's so commonly faked that Prolific actually "orphaned" the older versions of the series... it won't work with their Windows 10 driver, I understand. They say that they haven't manufactured this version in years and will not support it moving forwards... so even legitimate owners of legitimate older devices are cut off.

The Linux drivers for the pl2303 still support the old versions.

I found a generic "clear blue" serial cable with a pl2303 to be somewhat flaky under load... it would just stop transmitting. I suspect it was a counterfeit.

The SiLabs chips are becoming a more popular choice in recent years. I've played with them and the Linux drivers a bit. They work reasonably well as simple receive/transmit devices. The ones I used would not work well as real modem interface... the Linux driver doesn't support asynchronous status change notification (e.g. loss of carrier detect) and when I fixed this I found that the chips don't do a good job of it either. So, maybe OK for things like an ODB or Arduino interface, but not for a full-time featured serial port.

The CH341 is the new kid on the block... a Chinese design that is found in a lot of recent Chinese-built products, including some Arduino clones. As it's a relatively recent design it's probably the one for which you're most likely to have to install a Windows driver. Recent Linux kernels have a driver available. I've done only limited compatibility testing with these.

User avatar
Bookworm
Posts: 539
Joined: Sun Jul 29, 2012 11:59 pm
Location: Houston, TX
Contact:

Re: Linux and USB to Serial Adapters

Post by Bookworm » Sun Feb 10, 2019 10:31 pm

Almost everything I've used in the last 10 years has used a Winchiphead 341 (it's not that new of a bugger)

Frankly, I'd get a prebuilt, if at all possible, and avoid the fiddling around.

As for Linux vs Raspberry/Arduino - they're all Linux. In fact, Raspberry has a full PC desktop implementation.
I'll get a life when it's proven and substantiated to be better than what I'm currently experiencing.

User avatar
TazManiac
Posts: 3290
Joined: Fri Nov 29, 2013 6:53 pm

Re: Linux and USB to Serial Adapters

Post by TazManiac » Sun Feb 10, 2019 11:00 pm

Bookworm wrote:
Sun Feb 10, 2019 10:31 pm
Almost everything I've used in the last 10 years has used a Winchiphead 341 (it's not that new of a bugger)

Frankly, I'd get a prebuilt, if at all possible, and avoid the fiddling around.

As for Linux vs Raspberry/Arduino - they're all Linux. In fact, Raspberry has a full PC desktop implementation.
Well, in defense of even having the two choices- I like the fiddling around. That's just me.

Still, I'm defaulting to the pre- built if for no other reason than it's going into somebody else's tool-kit, so to speak. I'm the guy in this truck in the co-pilot, navigator, chief-bottle-washer seat.

Better to have it be 'off the shelf' in these cases.

Still, despite it being 'same-same' in terms of Raspberry vc PC, I'm going w/ the real-time aspect of monitoring on a decent screen while treading over the same 200 mile trip this truck undergoes. Quite literally over Hill & Dale.

If I craft something to permanently install in the truck, I'll lean towards data capture w/ the micro stuff.

User avatar
Bookworm
Posts: 539
Joined: Sun Jul 29, 2012 11:59 pm
Location: Houston, TX
Contact:

Re: Linux and USB to Serial Adapters

Post by Bookworm » Tue Feb 12, 2019 12:31 am

Understood. You can also go for a micro PC with a 7" display. That way you can mount just the display, and put the PC somewhere on the floor.

They're not really 'same same', just that there's a Raspberry distribution for x86 processors. Raspberry and Arduino are ARM.
I'll get a life when it's proven and substantiated to be better than what I'm currently experiencing.

Post Reply