-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEAK PCAN-USB Pro FD support? #17
Comments
The actual version is intended to provide LIN support on serial port hardware. It implements LIN as TTY line discipline which means to include finite state automata above low level UART API to achieve LIN functionality. Because LIN replies has to be provided in time (without space to wait for application), the slave side is implemented as a cache/full array of all responses which can be updated asynchronously. The actual user access API is made through CAN messages, this means that it is possible to create even hardware box which has CAN channel on one side and LIN on another and is physically connected between some SoC CAN output and LIN connector. As for hardware connected through USB, it can be useful to provide same API as slLIN provides to allow write applications portable. But because it will include cache and state automata inside external box then most of slLIN functionality is abundant. So I would suggest to write such device driver on the base of standard SocketCAN CAN driver for some USB device and provide mechanism to convert received CAN messages to appropriate USB commands of such device and in another direction covert received data in Peak specific encapsulation as CAN frames into created canX interface. |
Hi @ppisa I think you might have misunderstood - I'm not trying to use the CAN interface for LIN communication. PEAK's PCAN-USB Pro FD has 2x LIN transceivers in it, specifically the TJA1021/20. This device has hardware for LIN communication, I'm wondering whether |
I have described the situation in my previous comment. If the control of the LIN bus endpoint over CAN interface and CAN messages format introduced in slLIN is considered as the standard on GNU/Linux side then same interface can be used for PCAN-USB LIN interfaces which would appear as new SocketCAN interfaces under GNU/Linux. But very little of the slLIN code can be reused. It has to be supported by specific USB driver for PCAN-USB LIN interfaces which would convert CAN messages into device specific protocol sent over URBs to control internal state automatons in realized inside firmware of the USB connected devices. Same SocketCAN API can be used for client applications working with PCAN-USB LIN interface as fis used when LIN signal levels converter is connected to UART which is operate dby slLIN. But code has to be developed from scratch and with knowledge of the device USB protocol. |
Does this project support LIN interfaces on hardware like PEAK's PCAN-USB Pro FD (https://www.peak-system.com/PCAN-USB-Pro-FD.366.0.html?&L=1)?
The text was updated successfully, but these errors were encountered: