-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for CANable USB to CAN interface #15
Comments
This task currently in progress 👍 |
will something like this also be supported? |
Hi @andrey-pr , I have bought a CAnable usb. |
Sorry, development of canable driver is paused. Branch "canable" is currently absolutely unusable |
Thanks for the reply. I received my CANable-usb today, so I was keen to setting it up before seeing your comment. I have merged the master branch into the canable branch and did a ton of tinkering with the canable class. Tomorrow I will look into sending data onto the can-bus. I hope this fixes a lot of fields being empty in the UI. (As you can see some of the fields are still empty: https://imgur.com/a/LcdiD5D ) |
Hi @andrey-pr , I could use your help a little bit since I think you have already looked at this problem. I do receive some data on the can bus when said data is requested, but looking at the length of the data, it seems I am still missing some data? I do think it has something to do with the This is the received data: |
This kind of parameters (version names, etc) transported several frames per parameter. One frame have limited length and this parameters are longer, so the first frame will be returned as MULTIFRAME_START, then several with MULTIFRAME, then MULTIFRAME_END and after each one you need to answer with NORMAL_ACK. Code that processes this frames is located in device/besst/besst.ts file, but its not stable enough |
Thanks for explaining the process. I also had an issue where receiving different subcommands from the same target would just send the reply of 3 data points in a single sequence, so this required me to add a check if the message is complete at every received multiframe command. The first mutliframe message contains the bytes' length of the incoming message. I have used this as much as possible to try and repair the received frames. When an ending frame is received, the buffer is always cleared. Broken frames are discarded, but it seems to be pretty stable now. What seems to make the multiframes wayyy more reliable is adding a timeout between sending multiframe requests. (I have added I do still seem to be missing some data, but maybe that is my Bafang M200 (Veloretti) not having those data points. Eg. when clicked the refresh button on the engine page I see 2 parameters(conParams_1 & conParams_2) not loaded: |
I thought this would be a good place to post an an official 'TODO' for adding support for a USB to CAN adapter, such as the CANable Pro, which can be purchased online (Aliexpress) for 10 USD or so. This is the only thing keeping me (and likely many others) from using this wonderful piece of software.
The text was updated successfully, but these errors were encountered: