C# Cluster Communication Help needed

Programs / Tools / Scripts
User avatar
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

C# Cluster Communication Help needed

Post by commodorenut »

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
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: C# Cluster Communication Help needed

Post by Tazzi »

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
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

Re: C# Cluster Communication Help needed

Post by commodorenut »

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
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

Re: C# Cluster Communication Help needed

Post by commodorenut »

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
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: C# Cluster Communication Help needed

Post by Tazzi »

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
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

Re: C# Cluster Communication Help needed

Post by commodorenut »

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
Dylan
Posts: 3355
Joined: Mon Aug 02, 2010 6:35 pm
cars: VR Commodore V8

Re: C# Cluster Communication Help needed

Post by Dylan »

What model cluster and BCM? Are they not CAN based module's?
User avatar
Tazzi
Posts: 3422
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: C# Cluster Communication Help needed

Post by Tazzi »

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
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
User avatar
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

Re: C# Cluster Communication Help needed

Post by commodorenut »

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
commodorenut
Posts: 58
Joined: Sun Jan 01, 2017 7:50 pm
cars: VY Monaro 427ci SuperCharged
VK Group A LS2 671 Supercharged ( in the build )

Re: C# Cluster Communication Help needed

Post by commodorenut »

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
Post Reply