C# Cluster Communication Help needed

Programs / Tools / Scripts
User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

C# Cluster Communication Help needed

Postby commodorenut » Thu Nov 09, 2017 3:10 pm

Ok Guys

I got bored and started to learn C# Programming

I have got cluster and PCM connected and im receiving BCM Chatter, but data is all scrambled.

Need help with a few things

1. For data to read correctly?
2. how to read VIN?
3. How to read Part Number?


PS. Im using a decent ALDL cable and all connects fine with the OSE Enhanced Flash Tool V151.



Image

User avatar
Posts: 2424
Joined: Thu May 17, 2012 8:53 pm
Location: WA

Re: C# Cluster Communication Help needed

Postby Tazzi » Thu Nov 09, 2017 3:20 pm

So, Im guessing your trying to pull the VIN from the... PCM?? Since theres no VIN in the cluster.
As for communication, how are you handing the information being received by the ALDL Cable? Are you processing the received bytes to find a valid ALDL frame before attempting to write information to the car?
Your Local Aussie Reverse Engineer
Site:www.envyouscustoms.com
Mob:+61406 140 726
Image

User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

Re: C# Cluster Communication Help needed

Postby commodorenut » Thu Nov 09, 2017 4:03 pm

Please ignore my ignorance when it comes to programming, This is my first attempt and what you see i put together in 1 week of learning...

First off im trying to get the BCM chatter to display properly, Once thats done i can move to other area's.

All im doing to reading the port, dont know my next step

User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

Re: C# Cluster Communication Help needed

Postby commodorenut » Thu Nov 09, 2017 4:13 pm

This is the code that displays aldl data from serial port

private void sport_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
DateTime dt = DateTime.Now;
String dtn = dt.ToShortTimeString();

txtReceive.AppendText("["+dtn+"] "+"Received: "+sport.ReadExisting()+"\n");
}

User avatar
Posts: 2424
Joined: Thu May 17, 2012 8:53 pm
Location: WA

Re: C# Cluster Communication Help needed

Postby Tazzi » Thu Nov 09, 2017 5:02 pm

Sorry, I get a bit ahead of myself sometimes!
Right, first off you need to understand the ALDL protocol before you can start understanding how to process it. As the ALDL cable is just displaying raw bytes from the ALDL line. its not processing it into nice full ALDL frames, you need to do that with the software side of things otherwise it looks like a bunch of gibberish.

Also, your processing the received data to the richtext box as "ASCII", you want to display it as HEX to start seeing more legible raw data.

Its all a learning game. Id recommend watching (Alot) of youtube tutorials starting from basics through to more advanced abilities. Sadly enough, alot of my university courses actually referred to good youtube tutorials explaining new concepts and coding practises... really makes me wonder what the hell people are paying uni for these days... :lol:
Your Local Aussie Reverse Engineer
Site:www.envyouscustoms.com
Mob:+61406 140 726
Image

User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

Re: C# Cluster Communication Help needed

Postby commodorenut » Mon Nov 13, 2017 2:39 pm

Hi Tazzi,

Quick question for you...

What data format would i be receiving from the ALDL cable when reading BCM / Cluster ?

because im trying everything to convert output to Hex and keep getting errors like

System.FormatException: 'Input string was not in a correct format.'

Your help would be greatly appreciated

Posts: 3218
Joined: Mon Aug 02, 2010 6:35 pm

Re: C# Cluster Communication Help needed

Postby Dylan » Mon Nov 13, 2017 2:56 pm

What model cluster and BCM? Are they not CAN based module's?

User avatar
Posts: 2424
Joined: Thu May 17, 2012 8:53 pm
Location: WA

Re: C# Cluster Communication Help needed

Postby Tazzi » Mon Nov 13, 2017 3:35 pm

Everything pre-VE is ALDL based for all body modules :)

Everything received from the ALDL cable will be in byte format. How you display those received bytes depends on how your reading out through the comport and processing to screen.

Once the byte/s are read and placed into a buffer, can then display them as hex.. or ascii.. ect.
Your Local Aussie Reverse Engineer
Site:www.envyouscustoms.com
Mob:+61406 140 726
Image

User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

Re: C# Cluster Communication Help needed

Postby commodorenut » Tue Nov 14, 2017 12:23 pm

I seem to be getting the hang of the C# programming...lol

Not bad considering that 2 weeks ago i didnt even know anything about C#

Ok now im reading data from the ALDL cable in as you can see

Image

User avatar
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm

Re: C# Cluster Communication Help needed

Postby commodorenut » Tue Nov 14, 2017 3:57 pm

I have a question now..

when sending data to serial port to a cluster

how does it have to be set out

F2, 57, 4, 0, B3

or

F2 57 4 0 B3

or

F2 57 04 00 B3

Next

Return to Tools

Who is online

Users browsing this forum: No registered users and 4 guests