linklayer / cantact

Drivers and Command Line Interface for CANtact tools
http://cantact.io
MIT License
46 stars 12 forks source link

Fix CAN send #14

Closed brainstorm closed 1 year ago

brainstorm commented 3 years ago

Trying to get CAN sending packets working as mentioned in issues #9 and #12 and #16... also bumping a couple of dependencies in the process.

ericevenchick commented 3 years ago

Looks like this is still in draft state, so I hadn't reviewed it. Based on your comment on the other issue, is this ready for review?

brainstorm commented 3 years ago

Thanks for the response! No, this PR is not ready yet, but I'd be great if you gave cantact some more testing and documentation, specially under OSX.

Other than reading CAN frames (via can dump), I've not been able to send arbitrary CAN frames under OSX (unless they are hardcoded locally, own hack I will not push)... could you block some time for testing under OSX and document operations?

I suspect you used it mostly under Linux with SocketCAN (which is not available under OSX, afaik) instead of your own CLI? Please correct me if I'm wrong.

Cheers!

brainstorm commented 3 years ago

While I was fixing up your send_one.py and can send 0 1 2 Rust CLI, I thought that ideally, your cantact CLI should have the same syntax that SocketCAN does, shouldn't be too tricky to put together since you have all you need coming from the clap arguments.

The directories crate changes need a bit more careful revision since your conventions might not work the best across systems, I would just follow the recommended way outlined in its documentation since the crate you used is now deprecated.

That's what I was having in mind when writing this draft PR, I hope you have a bit more time than I do, for now I'll just be using the SocketCAN interface since I'm a bit time constrained with this right now and would like to focus on the hardware I intended to use connected w/ cantact instead...

I didn't anticipate that I'd be fixing the CANTACT Pro software itself after spending $149 on the hardware, but oh welp, I hope you find the time and stamina to fix those issues ;)