• Open an XCP connection and return an opaque handle string.

    Pass a connection name saved in the XCP window (XcpCreateConnection('ecu')), an inline XCP-on-CAN address object (XcpCanInline), or an inline XCP-on-Ethernet address (XcpEthInline).

    Parameters

    • addr: string | XcpInlineAddr

      Saved connection name, or an inline CAN / UDP / TCP address.

    • Optionaldevice: string

      Optional CAN channel name. Overrides the device on a CAN connection.

    Returns Promise<string>

    Opaque handle string to pass to the other Xcp* functions.

    If the saved name is unknown, the configuration is invalid, or no matching CAN device is open.

    const handle = await XcpCreateConnection('ecu')
    // Or inline UDP:
    const eth = await XcpCreateConnection({ transport: 'udp', ip: '127.0.0.1', port: 5555 })