# Miscellaneous

## dllversion()

`canlib.linlib.``dllversion`()

  Retrieve the LIN library version.

  Note

  Requires CANlib v5.3

## getChannelData()

`canlib.linlib.``getChannelData`(channel_number, item=<ChannelData.CARD_FIRMWARE_REV: 9>)

  This function can be used to retrieve certain pieces of information about a channel.

  Note

  You must pass a channel number and not a channel handle.

  Parameters: | channel (int) – The number of the channel you are interested in. Channel numbers are integers in the interval beginning at 0. item (linlib.ChannelData) – This parameter specifies what data to obtain for the specified channel. Currently the only item available is `ChannelData.CARD_FIRMWARE_REV`, which is the default.
  Returns: | (major, minor, release, build) :: A four-tuple of the firmware version. (For `ChannelData.CARD_FIRMWARE_REV`)

## getTransceiverData

`canlib.linlib.``getTransceiverData`(channel_number)

  Get the transceiver information for a CAN channel

  The application typically uses this call to find out whether a particular CAN channel has a LIN interface connected to it. For a Kvaser LIN Leaf it retrieves the transceiver type and device information.

  This function call will open the CAN channel, but no CAN messages are transmitted on it. In other words, it’s risk-free to use even if no LIN interface is connected, or if the channel is connected to a CAN system.

  Note

  Attempts to use the channel for LIN communication will be meaningful only if the returned `TransceiverData`’s ~type~ attribute is one of `canlib.canlib.TransceiverType.LIN` or `canlib.canlib.TransceiverType.CANFD_LIN`

  A LIN interface need not be powered for this call to succeed.

  The information may not always be accurate. Especially after changing transceiver on a running LAPcan card, you should go on bus and off bus again to be sure the transceiver information is updated.

## initializeLibrary

`canlib.linlib.``initializeLibrary`()

  Initialize LINlib

  Note

  LINlib is automatically initialized when `canlib.linlib` is imported. This function is only necessary when LINlib has been manually unloaded with `unloadLibrary`.

## TransceiverData

class `canlib.linlib.``TransceiverData`(ean, serial, type)
  `ean`

    Alias for field number 0

  `serial`

    Alias for field number 1

  `type`

    Alias for field number 2

## unloadLibrary

`canlib.linlib.``unloadLibrary`()

  Deinitialize LINlib

  This function de-initializes the LIN library. After this function is called `linInitializeLibrary` must be called before any other LIN function is called.