<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=3043170519342045&amp;ev=PageView&amp;noscript=1">

Syntax

#include "j2534_v0404.h"

long PassThruConnect(unsigned long DeviceID, unsigned long ProtocolID, unsigned long Flags, unsigned long BaudRate, unsigned long *pChannelID);


Description
Establish a logical communication channel with the vehicle network (via the PassThru device) using the specified network layer protocol and selected protocol options.

Parameters

DeviceID - Vehicle interface identifier.

ProtocolID - The protocol identifier selects the network layer protocol that will be used for the communications channel.

Flags - Protocol specific options that are defined by bit fields. This parameter is usually set to zero.

BaudRate - Initial baud rate for the channel.

pChannelID - Pointer to an unsigned long (4 bytes) that receives the handle to the open communications channel. The returned handle is used as an argument to other PassThru functions which require a communications channel reference.

See Also: PassThruDisconnect


Example:


unsigned long Flags = 0;
unsigned long ChannelID;
unsigned long DeviceID;

PassThruOpen(NULL, &DeviceID);
PassThruConnect(DeviceID, ISO15765, Flags, 500000, &ChannelID);

// Perform vehicle communication here

PassThruDisconnect(ChannelID);
PassThruClose(DeviceID);

BACK