New generic module supporting CAN232/CANUSB/LAWICEL protocol #89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
I've been interested with using CANToolz with my Arduino+Seeed CAN-BUS shield. I've flashed my Arduino with https://github.com/latonita/arduino-canbus-monitor, which implements CANUSB protocol.
I've seen that the
hw_USBtin.py
module also implements the CANUSB protocol somehow but I couldn't easily remove the things that were specific to USBtin to make it work with my setup.So I've decided to have a look to implement a more generic module that should be able to support all hardware implementing CAN232/CANUSB/LAWICEL protocol. It works quite okay-ish. You can receive CAN frames and send CAN232 commands at the same time without missing too many frames. I've plugged the new module with
mod_stat
and it works quite well.I have to be honest though, there are very likely a lots of bugs. I've tried to have a look to implement some unit tests for it for looking at the other unit tests, I'm not sure to understand how I should proceed.
Also, due to parallel processing I suppose, there are some unexpected corruptions that affect the received frames, which raised quite some unexpected exceptions during the development of the module. I've tried to have it as stable as possible for the initial version but some work remains IMO.
This new module implements the following CANUSB commands:
Hardware I am currently using for the module:
Screenshot from the web interface:

All feedback are welcome!