Open source LIN 2.1 master, slave and bus monitor dongle. SLCAN compatible. Plug-and-play on Windows, Linux and macOS.
Buy with Card Buy on Tindie Buy on Lectronz Source on GitHub
Product and its documentation is supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. Producer will not accept any claim for damages howsoever arising as a result of use or failure of this product. This product is not intended for use in any medical appliance, device or system in which the failure of the product might reasonably be expected to result in personal injury.
LIN(Local interconnect network) Usb Converter(LUC) can work both with PC without any additional drivers, it creates virtual COM port that handles LIN communication. Multiple features are supported like:
Board bottom view
After USB enumeration device creates virtual COM port that is used both for data transfer and converter setup.
Device is be powered directly from USB, but external 4.5-28V is needed to supply LIN transceiver.
Board layout is shown below.
For proper work on Windows you need to install virtual com drivers from ST site or download from here .
Below is list of all available commands. USART baud rate is virtual so can be any. All commands are ASCI format. Commands are terminated with newline character CR (0xD). On error the device responses with 0x7 value.
| Command | Description |
| O | Opens device in master mode. |
| C | Close LIN port on device, frame will not be received. |
| Sx | Baud rate selection: S2 - 9600 S1,S3-S8 - 19200 |
| V | Get hardware version. |
| v | Get firmware version. |
| N | Get serial number. |
| L | Open device in, slave mode, for LIN slave simulation. |
| l | Open device in, monitor mode, message analyzer mode, with single frame sending possibility . |
| tiiildd | In Monitor mode, transmits full header and data frame. In Master mode, updates table set with new frame In Slave mode, updates table set with new data 0ii: Identifier in hexadecimal format (000-0FF) l: Data length (0-8) dd: Data byte value in hexadecimal format (00-FF) |
| r0iil | In Monitor mode, transmits header only with set ID and Length, subscribed slave should answer the header. In Master mode, puts or updates table set with this id for continuous sending. In Slave mode, updates table set with reception slot Proper timing is set according to LIN standard. 0ii: Identifier in hexadecimal format (000-0FF) l: Data length (0-8) |
| r1ff0 | In Master mode, starts sending frames from table. |
| r2ff0 | In Master, Slave mode, clears schedule table. |
| xm | Swich checksum for classic x2 for enhanced x1 |
000005: C (send close command)
000006: v (ask for firmware version)
000007: v0102 (get version number from device)
000008: V (ask for hardware version)
000009: V0101
000010: N
000011: N16000000
000012: W2D00
000013:
000014: S0 (speed setting, 19200)
000015:
000016: L (open in monitor mode)
000017:
000018: r0128 (transmit header with 8 data bytes request, id 0x12)
000019: z
000020: t01280011223344556677 (slave responded for header request with 8 byte data frame)
000015:
000016: O (open in master mode)
000017:
000018: r0018 (add to schedule table frame transmission header with 8 data bytes request, id 0x01)
000019: z
000018: r0022 (add to schedule table frame transmission header with 2 data bytes request, id 0x02)
000019: z
000020: t01280011223344556677 (add to schedule table frame transmission header + data (slave task) with 8 data bytes, id 0x12)
000021: z
000022: r1ff0 (start sending frames)
000023: z
T 0 id id t1 t1 t2 t2 len d0 d0 d1 d1 d2 d2where:
T0005013AABBCC
slcand and works with parts of can-utils. No proprietary driver is required.O, L and l commands.xm command. Custom frame timing is supported in master mode.We are using ST STM32f04264 microcontroller. Device PCB is designed in ki-cad. All source files are available in github here.
Converter software is pure C code written in free TrueSTUDIO for STM32. All sources and releases with compilation instructions are available in our github here.
ULC have got embedded DFU USB bootloader for usage see UsbCANConverter(UCCB) project see tutorial.
There is dedicated python library for LUC, (uCANLinTools) with: LDF parsing support, LIN frame (PIDs) encoding/decoding, LIN master, slave support. See uCANLinTools for more info, source code and examples see here
You can use LUC on any operating system with serial terminal program like for example putty. Description of all available commands can be found in About section. All commands are the same as for USB-CAN converter so all tools can be reused, see UCAN USB-CAN converter project for libs and tools. LUC is also compatible with LINUX CAN-UTILS and SOCKET CAN. Device have its own terminal, uCCBViewer.
UCCBViewer is a GUI program for both uCAN CAN and LIN converters. For USB-LIN converter uCCBViewer functionalities are:
frame reception, transmission, master table setup, LIN schedule table and UDS / diagnostics. The viewer is now written in Python, so Java is no longer required.
Newest release of UCCBViewer (p2.6)