SavvyCAN icon indicating copy to clipboard operation
SavvyCAN copied to clipboard

CANtact support

Open romain145 opened this issue 4 years ago • 23 comments

Is there a plan to support the CANtact / CANable / CANable Pro interfaces running the stock slcan firmware (serial) or the candleLight firmware?

romain145 avatar Aug 11 '20 20:08 romain145

SavvyCAN supports socketcan so if you're running candlelight then you can use socketcan. Slcan should work as well as that's also socketcan.

On Tue, Aug 11, 2020, 4:39 PM Romain [email protected] wrote:

Is there a plan to support the CANtact / CANable / CANable Pro interfaces running the stock slcan firmware (serial) or the candleLight firmware?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/collin80/SavvyCAN/issues/238, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQLWZP4FKBL4XNJBI3VPHTSAGUBTANCNFSM4P3Q2HLQ .

collin80 avatar Aug 11 '20 22:08 collin80

Using the candleLight firmware (flashed here https://canable.io/updater/) the port list is empty. I tried passthrucan, peakcan, systeccan, tinycan (shows a can0.0 anyway) and vectorcan.

Testing on Windows 10 btw.

romain145 avatar Aug 12 '20 08:08 romain145

Oh sorry, I should have been more clear. SocketCAN interfaces only work on LINUX. I don't think the candlelight firmware will do much for you on Windows. For supporting cantact devices on Windows I will have to more directly target the CANtact communications protocol. I do think that would be worthwhile for me to do. Otherwise your options on Windows for that hardware pretty much boil down to Busmaster. That program is very feature rich but not the features people tend to actually need. It's more for large automotive companies that are doing internal testing of their hardware. So, I do think that CANtact/CANable users could use some more options.

collin80 avatar Aug 12 '20 16:08 collin80

Romain, use Linux in a VM with the Candlelight firmware + canable if you're needing a Windows based solution..

Candlelight will work with socketcan natively without using slcand commands. (sudo ip link set up can0 type can bitrate #######)

Then pull up the needed interface in Linux VM on windows.

On Wed, Aug 12, 2020, 3:05 AM Romain [email protected] wrote:

Using the candleLight firmware (flashed here https://canable.io/updater/) the port list is empty. I tried passthrucan, peakcan, systeccan, tinycan (shows a can0.0 anyway) and vectorcan.

Testing on Windows 10 btw.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/collin80/SavvyCAN/issues/238#issuecomment-672710897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI62NLWNLPSKGCPAIIX5XQ3SAJEMLANCNFSM4P3Q2HLQ .

mitchdetailed avatar Aug 12 '20 16:08 mitchdetailed

Using a VM sucks, though. It's also not just windows, but also MacOS

I give my +1 to this feature request.

I guess an implementation of the candleInterface can be found here

Edit: fix typos

Alia5 avatar Aug 26 '21 12:08 Alia5

Hmmm, interesting, yes that does appear to be a Windows driver for the candlelight API. I will look into supporting that.

collin80 avatar Aug 29 '21 15:08 collin80

I realise this is an old issue, but has there been any further investigation on supporting these devices in SavvyCAN under Windows?

BennyEvans avatar Aug 02 '22 02:08 BennyEvans

I never did look into it. I just went to that link and bookmarked it. I'll see what I can do.

collin80 avatar Aug 03 '22 13:08 collin80

Windows has candlelight support out of the box with no driver install needed. I also give +1 to this request, and im hoping you atleast looked into it. Its annoying to flash a different firmware in my can tool just for savvycan

ElektronikCZ avatar Nov 16 '22 12:11 ElektronikCZ

Meanwhile:

WSL2 + Custom kernel (to include can-bus stuff) + usbipd-win.

And then just use savvycan on the wsl

Alia5 avatar Nov 17 '22 08:11 Alia5

is support likely to get added for this?

gromgsxr avatar Jan 14 '23 22:01 gromgsxr

Someday, probably. But, as covered above, CANTact support works fine through the socketcan interface on Linux so using WSL could work. It's certainly not ideal. I really should implement actual support in Windows one of these days.

collin80 avatar Jan 15 '23 01:01 collin80

could always port the pcan code to the cantact.

On Sat, Jan 14, 2023, 7:06 PM Collin Kidder @.***> wrote:

Someday, probably. But, as covered above, CANTact support works fine through the socketcan interface on Linux so using WSL could work. It's certainly not ideal. I really should implement actual support in Windows one of these days.

— Reply to this email directly, view it on GitHub https://github.com/collin80/SavvyCAN/issues/238#issuecomment-1383010542, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI62NLVFODR4H3USVQRNI6TWSNEQZANCNFSM4P3Q2HLQ . You are receiving this because you commented.Message ID: @.***>

mitchdetailed avatar Jan 15 '23 01:01 mitchdetailed

Came here from Google search looking for the same thing, support for CANable in Windows. Would be nice if this was done.

gadjex avatar Jan 20 '23 22:01 gadjex

Someday, probably. But, as covered above, CANTact support works fine through the socketcan interface on Linux so using WSL could work. It's certainly not ideal. I really should implement actual support in Windows one of these days.

Direct windows support would be just awesome

gromgsxr avatar Jan 20 '23 22:01 gromgsxr

Someday, probably. But, as covered above, CANTact support works fine through the socketcan interface on Linux so using WSL could work. It's certainly not ideal. I really should implement actual support in Windows one of these days.

this doesn't help macOS users, though.

Careless avatar Jan 24 '23 22:01 Careless

Someday, probably. But, as covered above, CANTact support works fine through the socketcan interface on Linux so using WSL could work. It's certainly not ideal. I really should implement actual support in Windows one of these days.

You need to compile your own WSL kernel for that to work, and i never got that running. The SLCAN serial FW doesnt allow you to set different can bus speeds, like 95kbps as far as im aware. So the only option for me seems to be to install a full linux VM. There is a cangaroo software which you could use as the basis for porting candlelight support to windows https://github.com/HubertD/cangaroo

ElektronikCZ avatar Mar 01 '23 15:03 ElektronikCZ

I've got some spare time now so will look at implementing this. I'll create a PR once complete and link back here.

BennyEvans avatar May 02 '24 07:05 BennyEvans

This is one of the most epic comebacks of 2024

ElektronikCZ avatar May 02 '24 07:05 ElektronikCZ

I've had a chance to get some initial code working. If anybody in this thread has a chance, it'd be great if you could also test. I would like to do some more testing before I create the PR but will hopefully have a PR up in the next month. This work was also ontop of another modification that adds support for opening Wireshark socketCAN files. I'll create a PR for that first.

There are currently some restrictions with the code:

  • Only supports devices with base clocks of 48Mhz or 80Mhz - these are the clocks of the two devices I have (CANable and the device I'm currently developing, CAN Bus Debugger). If someone can send me the capability of the CANtact, that can be added pretty easily too if it's not one of the above.
  • Does not yet support one shot mode etc. but does support listen only.
  • Currently only compiled in when using MinGW to compile on Windows - I'm not sure it'll work so well if compiling under msvc but if someone has a chance, please feel free to modify the .pro file and include support when compiling with msvc. Let me know how you go.

I still need to test:

  • Multiple devices connected at once
  • More TX testing
  • Test compilation on linux/mac

Also please note that candle_dll is licensed under the LGPL. This is fine, as it's compiled separately and dynamically linked. But if you're wondering why the driver isn't just compiled into SavvyCAN, that's the reason. Any final Windows release containing the dll will need to contain a note regarding the dll license and where the code can be found - but this is trivial.

Also for transparency, please note that I'm the developer of a new product (not yet released) called CAN Bus Debugger.

Code is available here; https://github.com/BennyEvans/SavvyCAN/tree/gs_usb_support The code to compile the dll is here: https://github.com/BennyEvans/candle_dll

BennyEvans avatar May 13 '24 21:05 BennyEvans

Update on this: I've been away but plan to get back to testing soon. I've just creted PR #790 to add support for SocketCAN PCAP files and once that PR has been merged and I've finished testing I'll create the PR for gs_usb (candle) support.

BennyEvans avatar May 29 '24 09:05 BennyEvans

PR #790 has just been merged, so I'll work towards creating the next PR to add support for gs_usb (candle). I have something working, but would like to tweak a couple things and as I now have two devices, would like to ensure it can operate with multiple devices attached.

BennyEvans avatar Jul 10 '24 04:07 BennyEvans

I've just created the next PR #835 that adds support for these devices on Windows. Hopefully we can soon mark this issue as complete 🎉

BennyEvans avatar Aug 27 '24 06:08 BennyEvans