Software On ELM Street - OBD2 Software Development

Programs / Tools / Scripts
User avatar
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

delcowizzid wrote:desktop PC no luck its had usb issues so may not be your fault and laptop sadly doesnt have .net v4
Ill see if I cant drop the required net framework.

But it worked on a "elm emulator" and also a couple trial diagnostic OBD2 software's (was sending back false replies). God damn.. wonder if someone has one on gumtree I can pick up today haha.
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
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

Re: ELM327 Software Development

Post by delcowizzid »

haha dont stress on my behalf LOL but you keep posting ill keep testing :D
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

haha yeah, its just frustrating when things "should" work, but dont because of a silly mistake!

The serialport settings im current using are:

Code: Select all

 SerialPort1.BaudRate = ComboBoxBaudRate.SelectedItem
        SerialPort1.PortName = ComboBoxCom.SelectedItem
        SerialPort1.DataBits = 8
        SerialPort1.Handshake = IO.Ports.Handshake.None
        SerialPort1.NewLine = vbCr
        SerialPort1.Parity = IO.Ports.Parity.None
        SerialPort1.StopBits = IO.Ports.StopBits.One
        SerialPort1.ReadTimeout = 1000
which Im fairly certain are the settings I want since they were working.

And the elm327 code reader im using is:

Code: Select all

 Public Function DetectElmDeviceGetResponse(SentFrame As String)
        Dim ReceivedFrame As String = ""
        Dim Counts2Exit As Integer = 0
        Do 'do until exited
            Try
                'if there is something there.. read it!
                ReceivedFrame = SerialPort1.ReadLine 'Read Message!
                If ReceivedFrame <> SentFrame Then 'check if received frame matches sent.. ignore if so
                    If ReceivedFrame.Contains("SEARCHING...") Then 'ignore.. move onto next
                        'ignore this
                    ElseIf ReceivedFrame.Contains("NO DATA") Then 'ELm says no response.. fail! Shouldnt happen since gtting Elm info!
                        Return "Failed"
                    Else
                        Return ReceivedFrame 'hopefully out response
                    End If
                End If
            Catch ex As TimeoutException 'if nothings available, timout after 1 second.
                Counts2Exit += 1
                If Counts2Exit = 5 Then 'fail after timeout 4times
                    SetRichTextBox_ThreadSafe("Timed Out!", RichTextBoxReceive)
                    Return "Failed"
                Else
                    SetRichTextBox_ThreadSafe("Timed out.. Searching again.." & Counts2Exit, RichTextBoxReceive)
                End If
            End Try
        Loop
    End Function
Attached is another version, added another connection button on the right, try setting the comport/baud and click the "connect" on the right. That one will display everything that shows up over serialport, will display byte by byte.. so if the elm actually responds.. it will definitely show up there.. else theres something wrong! The elm will display "?" if it doesnt understand the command of the command is unfinished.

Unfortunately couldn't change the framework requirements.
Last edited by Tazzi on Tue Jul 21, 2015 9:34 am, edited 1 time in total.
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
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

Done some snooping on what other "working" applications have been doing.. have developed my self a "fake elm" device lol.

Received if the software requesting.. and sent is our false reply:

Code: Select all

Received: ?
Sent: ELM327 v1.5
Received: ATZ
Sent: ELM327 v1.5
Received: ATE0
Sent: OK
Received: ATL0
Sent: OK
Received: ATRV
Sent: 12.3V
Received: ATSP 2
Sent: OK
Received: 01 00
Sent: 41 00 BE 1F B8 10
Received: ATH1
Sent: OK
Received: 01 00
Sent: 68 F1 10 41 00 BE 1F B8 10
Received: ATSH 68 6A F1
Sent: OK
Received: 09 02
Received: 09 02
Received: 09 02
Received: 09 02
Received: 01 00
Sent: 68 F1 10 41 00 BE 1F B8 10
Received: AT@1
Received: AT@1
Received: AT@1
Received: AT@1
Received: 01 00
Sent: 68 F1 10 41 00 BE 1F B8 10
Received: 01 00
Sent: 68 F1 10 41 00 BE 1F B8 10
Received: 01 00
So if I can do all this.. the simply detect elm should definitely work! lol
Will need to put a check in for ">", that might be the problem.
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
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

Re: ELM327 Software Development

Post by delcowizzid »

i get a crash when using that 2nd connect button on right winxp lol
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

delcowizzid wrote:i get a crash when using that 2nd connect button on right winxp lol
Lol, have you set the comport and Baud? Dont click connect below those, only the connect to the right.

I havent put much error handling in to it. Iff you click the connect button bellow the comport and baud, then itll probably crash if you click the one on the right too haha.
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
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

Well, works correctly if I mimic a elm or use one of the various emulators online which are specifically made for software development. Not sure why its not working with a proper cable :thumbdown:
Image
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
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

Re: ELM327 Software Development

Post by delcowizzid »

dont trust my cable and usb LOL its chinese and only works with one software program only.ill see if i can update .net i just never plug my tuning laptop to the internet LOL
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
Tazzi
Posts: 3425
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: ELM327 Software Development

Post by Tazzi »

Yeah but itll probably be a cheap knock off chinese elm that ill be using too. Even if there knock offs, it should always display "ELM327" when reset or command ATZ is sent to it. I make it search for just "ELM". Not should whats happening really!
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
Charlescrown
Posts: 1833
Joined: Sat Aug 06, 2011 7:58 am
cars: V8 VR Commodore BT1
LB Lancer 2L turbo & Delco
Starion TBI with Delco
Mitsubishi Lancer EVO4 track car
NA MX5
3 vintage motor bikes
Location: Padstow NSW

Re: ELM327 Software Development

Post by Charlescrown »

I am trying it with a genuine Elmscan5 and it just crashes
Post Reply