Pages: [1] 2
Author Topic: Modify Cable with Proper FT232  (Read 12685 times)
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« on: April 20, 2020, 08:48:54 AM »

I've been on a quest for a proper cable. Current world events have delayed shipping and made many unavailable... My ebay cable just came, and I popped it open to find a CH340 chip as half expected. It appears this is a no go?

But, I think there is hope. If I essentially bypass this chip, and hook up a FT232, I should be good to go right? I have multiple ft232 breakout boards I use for micro controller stuff all the time, and multiple arduinos, which function just fine as such as well.

From what I can tell, all these cables are doing is level shifting the 12V signal down to 5 (or something), then a standard serial to usb chip (Ft232 or clones), so I see no reason why this shouldn't work.
Logged
d3irb
Full Member
***

Karma: +134/-1
Offline Offline

Posts: 195


« Reply #1 on: April 20, 2020, 09:36:32 AM »

I've been on a quest for a proper cable. Current world events have delayed shipping and made many unavailable... My ebay cable just came, and I popped it open to find a CH340 chip as half expected. It appears this is a no go?

But, I think there is hope. If I essentially bypass this chip, and hook up a FT232, I should be good to go right? I have multiple ft232 breakout boards I use for micro controller stuff all the time, and multiple arduinos, which function just fine as such as well.

From what I can tell, all these cables are doing is level shifting the 12V signal down to 5 (or something), then a standard serial to usb chip (Ft232 or clones), so I see no reason why this shouldn't work.

A quick Google found this horrifying modification that supposedly worked, you might as well try: https://www.drive2.ru/l/460338581588673272/ .

I'm shocked nobody has given the people what they wanted and replaced the ~50 lines of FTDI specific code in NefMoto with some generic serial code. That's another approach.
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #2 on: April 20, 2020, 09:44:19 AM »

At that point you're almost better off building your own cable
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #3 on: April 20, 2020, 09:50:54 AM »

I actually did that before i got this one... Had an elm327 interface that was obviously not going to work as is. I built up a basic level switch circuit, pulled the conector off that cable, and wired it up. VCDS Lite actually detected it fine, but it wouldn't communicate with the car. Nefmoto would not even show that ft232 in the decvice list though. is it looking for something specific? I don't understand why it wouldn't list any serial com port that windows makes from the driver... Some basic inspection showed me levels weren't quite right (I was working with transistors and resistors I literally found on my floor under a work bench, so not surprising... The right way is to use opto-isolators anyway, so I didn't go any further, and ordered this cable to try.

Modifying this is a lot easier than building a whole new one. all I have to do to make it functional is cut the traces for the rx and tx out of the ch340 and solder on my own from a proper ftdi device... That should work fine right?
Logged
Blazius
Hero Member
*****

Karma: +89/-40
Offline Offline

Posts: 1282



« Reply #4 on: April 20, 2020, 09:53:29 AM »

Yes , either nefmoto rewrite with generic serial code instead of using ftdi dlls but honestly just get a FTDI cable , they are like 5-10 bucks. BTW ch340 still works with me7logger which is not hardcoded to use ftdi ids and stuff.
Logged
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #5 on: April 20, 2020, 10:01:17 AM »

Yes , either nefmoto rewrite with generic serial code instead of using ftdi dlls but honestly just get a FTDI cable , they are like 5-10 bucks. BTW ch340 still works with me7logger which is not hardcoded to use ftdi ids and stuff.

If you know any working cables, please let me know... Everything I could find that actually had a picture of a ft232 chip, or at least had something in the name designating it was real was either out of stock or had a delivery date a month out... I checked links in the known working cables thread, all were dead.
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #6 on: April 20, 2020, 10:04:39 AM »

It is using the ftdi dll for two reasons (not my code, this is my assumption)
1) the ftdi serial abstraction is nicer to use than basic uart calls.
2) the old payware version relied on the id reported by ftdi chips
« Last Edit: April 20, 2020, 11:11:29 AM by nyet » Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #7 on: April 20, 2020, 10:25:40 AM »

It is using the fdti dll for two reasons (not my code, this is my assumption)
1) the fdti serial abstraction is nicer to use than basic uart calls.
2) the old payware version relied on the id reported by fdti chips

All makes sense. Just to make sure I am understanding this right: Nefmoto uses the FTDI DLL directly for communicating with the device, it does not simply make serial calls over the established virtual com port?

I'm going to try to find a legit cable. I wish ebay ads didn't all suck. I messaged 2 sellers asking what chip was in it (specifically if it was an ft232 or ch340), and neither had any clue what I was talking about... Going to see if I can get something diy'ed together with what I have around now while I wait another week+ for a freaking serial cable that actually works. Ugh.

In the meantime, anyone have a suggestion of a a similar ecu file to my 2000 A4 1.8TQM (ATW)? Preferably one with definitions, so I an start getting a feel for things in tunerpro, etc at least? I understand there is not a full xdf available for this ecu, so I'd like to start familiarizing myself. Something similar that has had definitions made would be helpful in learning how the process works. I'm no stranger to hex editors and such, but I've never played with any of the tuning software, and there certainly looks to be a bit of a learning curve.
Logged
d3irb
Full Member
***

Karma: +134/-1
Offline Offline

Posts: 195


« Reply #8 on: April 20, 2020, 10:34:33 AM »

All makes sense. Just to make sure I am understanding this right: Nefmoto uses the FTDI DLL directly for communicating with the device, it does not simply make serial calls over the established virtual com port?

Correct, it uses FTDI D2XX rather than the VCP. It uses the simple Read and Write primitives, nothing complex. If I had to guess this was probably an effort to make using COM port loggers harder when it was closed source. Again, there's nothing FTDI-specific (now that the EEPROM/serial check is gone) that would prevent it from being pulled out.
Logged
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #9 on: April 20, 2020, 10:55:39 AM »

A quick Google found this horrifying modification that supposedly worked, you might as well try: https://www.drive2.ru/l/460338581588673272/ .

I'm shocked nobody has given the people what they wanted and replaced the ~50 lines of FTDI specific code in NefMoto with some generic serial code. That's another approach.

Can't read russian and google translate did an, uhhh, subpar job with that page, but that looks like basically what I'm talking about. Maybe with a little less hot glue.

Here's a high res picture of my cable for reference. There are 2 ICs. The LM339 Comparator, which is being used as the level shifter, An ok method, but my inclination would be to use opto isolators for added safety, maybe some of the nicer cables do? Then the CH340 chip. wiring in an ft232 should be just as simple as that page looked, and I promise I'l make it at least a little bit cleaner...



On the subject of modifying software, I suspect as noted below that there is a reason the FTDI specific code is used. Doesn't mean it's impossible to fix, but honestly, with as sketchy as CH340s are, I'm not sure I'd want to. I've had all kinds of problems with them before, mostly on off brand arduinos that often use them as a cheap ftdi replacement as well. I should take a look at the code none the less. Not a C# expert though, Most of my programming has been low level C and such, though I used to work in C++ and java a lot more
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #10 on: April 20, 2020, 11:12:52 AM »

On the subject of modifying software, I suspect as noted below that there is a reason the FTDI specific code is used. Doesn't mean it's impossible to fix, but honestly, with as sketchy as CH340s are, I'm not sure I'd want to. I've had all kinds of problems with them before, mostly on off brand arduinos that often use them as a cheap ftdi replacement as well. I should take a look at the code none the less. Not a C# expert though, Most of my programming has been low level C and such, though I used to work in C++ and java a lot more

I really really would appreciate this
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
Blazius
Hero Member
*****

Karma: +89/-40
Offline Offline

Posts: 1282



« Reply #11 on: April 21, 2020, 01:13:28 PM »

Can't read russian and google translate did an, uhhh, subpar job with that page, but that looks like basically what I'm talking about. Maybe with a little less hot glue.

Here's a high res picture of my cable for reference. There are 2 ICs. The LM339 Comparator, which is being used as the level shifter, An ok method, but my inclination would be to use opto isolators for added safety, maybe some of the nicer cables do? Then the CH340 chip. wiring in an ft232 should be just as simple as that page looked, and I promise I'l make it at least a little bit cleaner...



On the subject of modifying software, I suspect as noted below that there is a reason the FTDI specific code is used. Doesn't mean it's impossible to fix, but honestly, with as sketchy as CH340s are, I'm not sure I'd want to. I've had all kinds of problems with them before, mostly on off brand arduinos that often use them as a cheap ftdi replacement as well. I should take a look at the code none the less. Not a C# expert though, Most of my programming has been low level C and such, though I used to work in C++ and java a lot more

Indeed it uses a lm339 comparator and ch340 , the version which does not need external clock atleast in my case, I uploaded pics of the PCB before if interested:

Logged
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #12 on: April 21, 2020, 02:26:10 PM »

Simple as these boards are, I'm going to draw up a schematic to build one myself, see what parts cost on digikey. If it's not too much more, could easily make a nice high quality cable and avoid sketchy ebay junk.
Logged
BlackT
Hero Member
*****

Karma: +79/-40
Offline Offline

Posts: 1425



« Reply #13 on: April 21, 2020, 02:39:34 PM »

I actually did that before i got this one... Had an elm327 interface that was obviously not going to work as is. I built up a basic level switch circuit, pulled the conector off that cable, and wired it up. VCDS Lite actually detected it fine, but it wouldn't communicate with the car. Nefmoto would not even show that ft232 in the decvice list though. is it looking for something specific? I don't understand why it wouldn't list any serial com port that windows makes from the driver... Some basic inspection showed me levels weren't quite right (I was working with transistors and resistors I literally found on my floor under a work bench, so not surprising... The right way is to use opto-isolators anyway, so I didn't go any further, and ordered this cable to try.

Modifying this is a lot easier than building a whole new one. all I have to do to make it functional is cut the traces for the rx and tx out of the ch340 and solder on my own from a proper ftdi device... That should work fine right?
Yes that is going to work.
Here you have some more pics and info
https://adamforbes92.github.io/FISCuntrol/

Logged
CrashKrazz
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10


« Reply #14 on: April 21, 2020, 03:12:56 PM »

Yes that is going to work.
Here you have some more pics and info
https://adamforbes92.github.io/FISCuntrol/



Very cool project. This thread has gotten gears turning. Like I said, designing my own adapter right now. This is not a challenging project. That page actually helps a lot, been sitting here drawing my own version of the overlaid schematic they have...

I am designing mine to use opto isolators instead of a comparator level shifter. That seems better from my experience. Will design to be built on a simple solder grid prototype board, may work on a layout to have a pcb printed later. Debating between spec-ing a pre built ft232 breakout board (~$12 on sparkfun), or building the chip into the board. Problem there is the ft232 is only available in a smd package. not too small to solder with an iron if you're decent, but would mean some kind of extra breakout to build on a standard perf board.

Will update as this progresses, might stat a new thread dedicated to that for clarity.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.032 seconds with 18 queries. (Pretty URLs adds 0.001s, 0q)