OBDX Development - Developer Tools and Suggestions

Programs / Tools / Scripts
Post Reply
User avatar
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by antus »

good progress :thumbup: you'll know what your doing by the time its done :D
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

I hope so... I have no idea if the event call back is even done correctly.
The function I declared is:

Code: Select all

static public T_PDU_ERROR PDURegisterEventCallback(uint _hMod, uint _hcll, EventCallback eventcallback)
Now, the actual EventCallBack is the delegate. By nature, this is a pointer to a function.. so I believe the compiler is automatically understanding this is a pointer and not an object.
Usually I would be declaring that as a pointer, and then would convert to the structure/object, but the event callback should already be a pointer.. I think. :?

Either way.. its not crashing and has accepted it.

It has setup events for "System" which is basically API errors, and then also Module/System which is related to tool errors.

We are now able to navigate Tech2win after that... but it does come up with errors saying the tool does not support all required parameters, but this is because I have not answered back to the "PDUGetObjectId" requests, I have just got a dummy function returning ok there.

The purpose of that function is to return the 'value' of specific values such as "CP_LoopBack". Below is the current requests Tech2win does (Theres alot!!!):

Code: Select all

4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_Loopback
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P2Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P2Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P3Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P3Phys
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_RepeatReqCountApp
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_StartMsgIndEnable
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_SwCan_HighVoltage
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TesterPresentHandling
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TransmitIndEnable
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_5BaudAddressPhys
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_5BaudMode
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_As
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_Bs
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanFillerByte
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanFillerByteHandling
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanPhysReqExtAddr
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanPhysReqFormat
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanPhysReqId
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUSDTExtAddr
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUSDTFormat
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUSDTId
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUUDTExtAddr
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUUDTFormat
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_CanRespUUDTId
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_Cr
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_Cs
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_HeaderFormatKW
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_InitializationSettings
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P4Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P4Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_RequestAddrMode
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TIdle
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TInil
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TWup
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W1Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W1Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W2Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W2Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W3Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W3Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W4Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_W4Min
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_Baudrate
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_BitSamplePoint
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_K_L_LineInit
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_SamplesPerBit
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_SyncJumpWidth
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_TerminationType
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_5BaudInitBaudrate
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_5BaudCommBaudrateOverride
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_BecomeMaster
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_BecomeSlave
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_ByteCountOffset
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_MessageScheduler
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P3Max
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_P3Min_J2740
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_SetPollResponse
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_COMPARAM
4:50:18 PM Tuesday, 5 April 2022  : short name requested: CP_SetRelinquishMastership
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_11898_2_DWCAN
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_11898_3_DWFTCAN
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_9141_2_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_14230_1_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J1939_11_DWCAN
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J1850_VPW
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J2411_SWCAN
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J2740_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_BUSTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: KW_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_14230_3_on_ISO_14230_2
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_15765_3_on_ISO_15765_2
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J2190_on_ISO_9141_2
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J2190_on_SAE_J1850_VPW
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_15031_5_on_ISO_15765_4
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SAE_J1939_73_on_SAE_J1939_21
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: ISO_11898_RAW
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: XDE_5024_on_XDE_5024_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: KW82_on_KW_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: KW81_on_KW_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PROTOCOL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: KW309_on_KW_UART
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: HI
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: LOW
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: K
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: L
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: PLUS
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_PINTYPE
4:50:18 PM Tuesday, 5 April 2022  : short name requested: SINGLE
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_IO_CTRL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: PDU_IOCTL_READ_VBATT
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_IO_CTRL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: PDU_IOCTL_START_MSG_FILTER
4:50:18 PM Tuesday, 5 April 2022  : PDUGetObjectId Called
4:50:18 PM Tuesday, 5 April 2022  : object requested: PDU_OBJT_IO_CTRL
4:50:18 PM Tuesday, 5 April 2022  : short name requested: PDU_IOCTL_CLEAR_MSG_FILTER
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: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

2 steps forward... 200 steps back.

Now... we are onto actually setting up the VPW protocol by using the command: PDUCreateComLogicalLink

This is the structure of the command:

Code: Select all

T_PDU_ERROR PDUCreateComLogicalLink(UNUM32 hMod, PDU_RSC_DATA *pRscData,
UNUM32 resourceId, void *pCllTag, UNUM32 *phCLL, PDU_FLAG_DATA
*pCllCreateFlag ) 
hmod is simply the scantool unique number.

Its the *pRscData is suppose to have the protocol ID, pin number ect to describe what we are connecting to.

resourceID uses the XML (if ones available) to provide a unique number specifically for the protocol.

And the others are not of major concern right now.

But the pRscData, this is currently producing the following when clicking a LS1 Engine in tech2win:

Code: Select all

7:27:03 PM Tuesday, 5 April 2022  : PDUCreateComLogicalLink Called
7:27:03 PM Tuesday, 5 April 2022  : hmod is : 00000001
7:27:03 PM Tuesday, 5 April 2022  : Resouce ID is : FFFFFFFE
7:27:03 PM Tuesday, 5 April 2022  : Bus Type ID : FFFFFFFE
7:27:03 PM Tuesday, 5 April 2022  : Protocol ID : FFFFFFFE
7:27:03 PM Tuesday, 5 April 2022  : Num pin data : 00000001
7:27:03 PM Tuesday, 5 April 2022  : DLC Pin Type ID: FFFFFFFE
7:27:03 PM Tuesday, 5 April 2022  : DLC Pin Number: 00000002
The datasheet indicates that resource ID will be FFFFFFFE when an MDF (The XML sheet) is not supplied, so that is to be expected. But the datasheet says that if the XML is not present, it must fill out the bus type, protocol id, and pin data. Currently all that the above data tells me is we use pin2 for an 'unknown' protocol. I am guessing I am suppose to know the protocol based off the pin number only??
I verified that I received the correct data breakdown above by dumping the memory area and it is spot on. It could be that Tech2win 'prefers' having the MDF sheet... yet the task is achieved by drewtech without one.


When clicking on a VY BCM (ALDL), we get the following:

Code: Select all

7:17:13 AM Wednesday, 6 April 2022  : PDUCreateComLogicalLink Called
7:17:13 AM Wednesday, 6 April 2022  : hmod is : 00000001
7:17:13 AM Wednesday, 6 April 2022  : Resouce ID is : FFFFFFFE
7:17:13 AM Wednesday, 6 April 2022  : Bus Type ID : FFFFFFFE
7:17:13 AM Wednesday, 6 April 2022  : Protocol ID : FFFFFFFE
7:17:13 AM Wednesday, 6 April 2022  : Num pin data : 00000001
7:17:13 AM Wednesday, 6 April 2022  : DLC Pin Type ID: FFFFFFFE
7:17:13 AM Wednesday, 6 April 2022  : DLC Pin Number: 00000009
So same thing, only real identifying data is pin 9 which is ALDL. the rest is basically blank. Following this, tech2win creates an event callback registration for the ComLogicalLink (opens to connection for read/write to car) and thats it. It does not set any filters, it does not request any data, it just sits... and waits.. so I would assume its waiting for a callback to be initiated

Now, I would guess ALDL is probably going to be the biggest bitch to implement correctly. Since it appears Tech2win is effectively expecting the tool to transmit as a passthrough maybe? I though DPDU would have more smarts, but it doesnt appear so.
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
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by antus »

That looks pretty good. I agree it looks like you're supposed to assume the protocol from the pin. At least, if you do that now and learn more later you can update it. For everything aldl to gmlan the pins should be pretty standard (even if 9 is manufacturer option rather than aldl by spec).
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

antus wrote:That looks pretty good. I agree it looks like you're supposed to assume the protocol from the pin. At least, if you do that now and learn more later you can update it. For everything aldl to gmlan the pins should be pretty standard (even if 9 is manufacturer option rather than aldl by spec).
Yeah, I think its cause I am trying to take the 'shortcut' and not write out an entire MDF sheet which is many hundreds of lines of data.

But... since I want OBDX cables to replace an MDI.... I have just made a copy of the MDI MDF file and directed tech2win to look at that for the OBDX... and amazingly.. no warnings came up about
"not supporting all parameters".

I tested sending a couple events.. and it didnt instantly crash the application (Which is awesome.. meaning the callbacks are valid). It did crash tech2win eventually as I was sending noifications about live data is present... but the ALDL line was technically not setup correctly (I think) since tech2win did not like missing the MDF file.

Anyways... will see where I get in the next hour not that it is technically being fed a file which has every last parameter needed for all protocols. :D
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: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

Same issue still. Although, this might be related to the many calls for PDUGetObjectId which is requesting a bunch of object names and wanting a result posted back... the more I think about it... the more it makes sense why everything is set as FFFFFFFE.

An example of it is:

Code: Select all

8:25:09 AM Wednesday, 6 April 2022  : object requested: PDU_OBJT_BUSTYPE
8:25:09 AM Wednesday, 6 April 2022  : short name requested: SAE_J2740_UART
This is for ALDL... and is requesting bustype. Now if you look below when it goes to setup the protocol, we can see the bus type is also set to FFFFFFFE, and this is likely because i have not actually filled this data out. :roll:

Code: Select all

8:30:30 AM Wednesday, 6 April 2022  : PDUCreateComLogicalLink Called
8:30:30 AM Wednesday, 6 April 2022  : hmod is : 00000001
8:30:30 AM Wednesday, 6 April 2022  : Resouce ID is : FFFFFFFE
8:30:30 AM Wednesday, 6 April 2022  : Bus Type ID : FFFFFFFE
8:30:30 AM Wednesday, 6 April 2022  : Protocol ID : FFFFFFFE
8:30:30 AM Wednesday, 6 April 2022  : Num pin data : 00000001
8:30:30 AM Wednesday, 6 April 2022  : DLC Pin Type ID: FFFFFFFE
8:30:30 AM Wednesday, 6 April 2022  : DLC Pin Number: 00000009
8:30:30 AM Wednesday, 6 April 2022  : PDUCreateComLogicalLink Success
8:30:30 AM Wednesday, 6 April 2022  : PDURegisterEventCallback Called
8:30:30 AM Wednesday, 6 April 2022  : hmod is: 00000001
8:30:30 AM Wednesday, 6 April 2022  : hcll is: 00000000
8:30:30 AM Wednesday, 6 April 2022  : hMod and hcll are not FF's, thus EVENT REGISTER for ComLogicalLink
8:30:30 AM Wednesday, 6 April 2022  : waiting 1500ms
8:30:32 AM Wednesday, 6 April 2022  : Sending logical event
8:30:32 AM Wednesday, 6 April 2022  : event sent
8:30:32 AM Wednesday, 6 April 2022  : waiting 1500ms
8:30:32 AM Wednesday, 6 April 2022  : PDUGetEventItem Called
8:30:34 AM Wednesday, 6 April 2022  : Sending logical event
8:30:34 AM Wednesday, 6 April 2022  : event sent
8:30:34 AM Wednesday, 6 April 2022  : waiting 1500ms
At the end here, we can see myself doing a loop sending a logical event, and then tech2win actually calls the "PDUGetEventItem". This is a new command for me, so I am assuming this will be where we send the actual received data (Maybe). The app then crashes since I don't actually send back anything valid to that function, plus its a dummy background thread just sending the event while testing. Might try send it some dummy data just for testing purposes in the getevent item.

On the todo list to proceed next is:
• Fill out all those object parameters so tech2win has an accurate reference for all IDs
• Redesign the serial processing to be event driven (read frame as data comes in) so that the API can fire off events for system/logical as they occur
• Open protocol, disable filters and pass event as frames are received.
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: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

Ok.. progress!

Since returning correct ID's back to tech2win for all its PDUGetObjectId requests, it is now using those IDs that I passed back in the functions that I was having problems with.

For example, we now have:

Code: Select all

9:59:05 AM Wednesday, 6 April 2022  : PDUIoCtl Called
9:59:05 AM Wednesday, 6 April 2022  : _hMod is: 00000001
9:59:05 AM Wednesday, 6 April 2022  : _hcll is: 00000001
9:59:05 AM Wednesday, 6 April 2022  : Ioctlcommandid is: 00000006
where Ioctlcommandid of 6 refers to PDU_IOCTL_READ_VBATT. So it wants me to read the battery voltage and send it on back :thumbup:

Creating the logical link has now become:

Code: Select all

10:00:22 AM Wednesday, 6 April 2022  : PDUCreateComLogicalLink Called
10:00:22 AM Wednesday, 6 April 2022  : hmod is : 00000001
10:00:22 AM Wednesday, 6 April 2022  : Resouce ID is : FFFFFFFE
10:00:22 AM Wednesday, 6 April 2022  : Bus Type ID : 00000010
10:00:22 AM Wednesday, 6 April 2022  : Protocol ID : 0000002E
10:00:22 AM Wednesday, 6 April 2022  : Num pin data : 00000001
10:00:22 AM Wednesday, 6 April 2022  : DLC Pin Type ID: 00000009
10:00:22 AM Wednesday, 6 April 2022  : DLC Pin Number: 00000009
10:00:22 AM Wednesday, 6 April 2022  : PDUCreateComLogicalLink Success
Now we have a bus type ID = 10, which is SAE_J2740_UART
protocol ID = 2E, which is XDE_5024_on_XDE_5024_UART
and DLC Pin type ID = 9, which means SINGLE (1 pin).

So thats making SO much more sense now. Resource ID is now set as undefined as tech2win has all the data it needs to properly indicate desired protocol.
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: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

We have no purchases the 2022 DPDU document.. which.. in all fairness.. is helpful. But, it is not fantastic for examples.

I will persist for a bit longer to try get communication working for read/write, but Im thinking I need to do one of the following:
1) Create a DPDU application to use the MDI's DPDU DLL and pass the same commands Tech2win does to get back its responses.
2) Create a middle man API to capture communication between MDI and Tech2win.

Only issue I can see with the middleman approach is the MDI API will have full control of the events to execute... but these events only trigger tech2win to execute the "GetEventDetails" request which we can intercept.
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
antus
Site Admin
Posts: 8292
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by antus »

you can maybe avoid the mitm code by using ida debugger and set break on load dll then set breakpoints on the other mdi tool dll and inspect the data as you hit the breakpoints. but depending on skills and experience with the ida debugger the mitm approach might work better for you.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
User avatar
Tazzi
Posts: 3458
Joined: Thu May 17, 2012 8:53 pm
cars: VE SS Ute
Location: WA
Contact:

Re: OBDX Development - Developer Tools and Suggestions

Post by Tazzi »

antus wrote:you can maybe avoid the mitm code by using ida debugger and set break on load dll then set breakpoints on the other mdi tool dll and inspect the data as you hit the breakpoints. but depending on skills and experience with the ida debugger the mitm approach might work better for you.
Yeah, Im not too confident on pulling data out of IDA nicely.

Although.. If I can see the intptr.. technically... I can use an application on the side to investigate the same intptr location to extract the data (I believe thats possible) and convert into a proper structure. So.... that is a possibility!

Made a small.. bit of progress... part of the PDUCreateComLogicalLink function is a parameter called "pCLLcreateflag".

When we look at the data thats passed to it, we get: 80 00 00 00
Breaking this down shows bit 7 refers to "RAW MODE" which is being set to 1, which means:

Code: Select all

When receiving a message, RawMode ON indicates that the header bytes and checksums will be left in the Result Item that is returned
Basically this means we do not strip away any of the formatting bytes.

After responding back nicely to the CreateComLink and passing a valid hCLL (logical reference handler), we have again moved forward.
We have a bunch of PDUSetComParam that are requested:

Code: Select all

CP_BECOME_MASTER
CP_BECOME_SLAVE
CP_LOOP_BACK
CP_P3_MIN_J2740
CP_REPEAT_REQ_COUNT_APP
CP_BYTECOUNTOFFSET
CP_BAUD_RATE
CP_TERMINATION_TYPE
CP_SET_RELINQUISH_MASTERSHIP
CP_SetPollResponse
It then does a couple PDUIoCtl requests of:

Code: Select all

PDU_IOCTL_CLEAR_MSG_FILTER
PDU_IOCTL_START_MSG_FILTER
Then finally onto PDU Connect (This is actual connection to protocol), and then PDUStartComPrimitive which will be to transmit a frame.

We are edging our way forward... its getting closer... but still need to redo the event driven serial processing, along with now adding all the subfunctions from PDUIoCtl so filters can be added/removed.
Your Local Aussie Reverse Engineer
Contact for Software/Hardware development and Reverse Engineering
Site:https://www.envyouscustoms.com
Mob:+61406 140 726
Image
Post Reply