> On 16. Feb 2024, at 14:40, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote: > > On 09.02.2024 22:25:37, Oliver Hartkopp wrote: >>> On 2024-02-09 18:28, Dr. Michael 'Mickey' Lauer wrote: >>> My team and I have designed and developed >>> a new CAN(FD) adapter based on ESP32S3 and MCP2518fd >>> primarily aimed at ECU firmware reprogramming, >>> but eventually also for the use as OBD2-adapter, >>> CAN-logger, etc. >>> >>> The next incarnation will also have a >>> USB interface and I’m planning the necessary >>> changes for its firmware. >>> >>> I would like it to be compatible with SocketCAN >>> out of the box — optimally without writing a >>> Linux driver, but rather reusing an existing one. >>> >>> Which of the mainline SocketCAN drivers would you recommend >>> basing my USB protocol on? From a quick glance, >>> I’m leaning towards GS-USB, since this already >>> supports different hardware families. >> >> Yes. I would also recommend the gsusb driver and the CandleLight firmware >> project on the other side: > > ACK. gs_usb is the way to go for USB-to-CAN adapters. Ok, good to hear. We‘ll go with that then. > >> https://github.com/candle-usb/candleLight_fw >> >> ... where currently the CAN FD support is in the testing phase IIRC. > > The USB protocol for CAN-FD is stable and supported by the kernel and > the Work-In-Progress firmware. The firmware can be found here: > > | https://github.com/candle-usb/candleLight_fw/pull/139 > | https://github.com/candle-usb/candleLight_fw/pull/176 > > We're currently discussing the implementation details of the firmware, > but the USB part is, as mentioned above, stable Sounds pretty cool. Our design is based on an ESP32-S3 though, so I have to duplicate that effort. Is there some kind of USB protocol definition for what gs-usb expects or do I need to learn that from the implementation? Cheers, M