collin80 / SavvyCAN

QT based cross platform canbus tool
MIT License
1.04k stars 288 forks source link

CANtact support #238

Open romain145 opened 4 years ago

romain145 commented 4 years ago

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

collin80 commented 4 years ago

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 notifications@github.com 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 .

romain145 commented 4 years ago

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.

collin80 commented 4 years ago

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.

mitchdetailed commented 4 years ago

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 notifications@github.com 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 .

Alia5 commented 3 years ago

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

collin80 commented 3 years ago

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

BennyEvans commented 2 years ago

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

collin80 commented 2 years ago

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

ElektronikCZ commented 2 years ago

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

Alia5 commented 2 years ago

Meanwhile:

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

And then just use savvycan on the wsl

gromgsxr commented 1 year ago

is support likely to get added for this?

collin80 commented 1 year ago

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.

mitchdetailed commented 1 year ago

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: @.***>

gadjex commented 1 year ago

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

gromgsxr commented 1 year ago

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

Careless commented 1 year ago

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.

ElektronikCZ commented 1 year ago

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

BennyEvans commented 6 months ago

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

ElektronikCZ commented 6 months ago

This is one of the most epic comebacks of 2024

BennyEvans commented 6 months ago

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:

I still need to test:

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 commented 5 months ago

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 commented 4 months ago

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 commented 2 months ago

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 🎉