VESC firmware update via CAN

Hello my friends, I have a question about CAN forwarding and firmware updates via CAN

Scenario: I have two VESCs, only VESC 1 is accessible via USB. VESC 2 is CAN connected, CAN forwarding enabled and for that to work the “App to use” is set to “Custom User App” (“no app” might work too, not tested).

Problem: When updating the VESC firmware on a CAN connected VESC the default “App to use” is reset to UART. This “bricks” access my VESC 2 (I don’t have USB access). I see that happens in appconf_default.h:

#define APPCONF_APP_TO_USE APP_UART

Question: Do I need to compile a custom VESC build with a different preset to get around this problem or are there better ways to deal with this?

Any insights much appreciated. I assume someone ran into this problem before.

1 Like

I won’t be of any assistance in resolving your problem as I don’t have the technical depth to even understand your question :grinning:

However I would like to express my gratitude to you for founding this forum. It has provided me with countless hours of entertainment and a base of understanding that has led me to have successful builds and have enough knowledge that I allows me to help others in the community.

:+1:

2 Likes

Hey Foilguy, I am very happy to hear that! Thank you for that and thanks for your active participation here!

And I also think I just solved my problem, which turned out not to be a problem after all. Very Happy :slight_smile: . I can now always connect to it after doing a firmware update via CAN forwarding. Not sure what I did wrong before. The app-to-use = UART setting works for my use case, I am controlling the VESC via CAN. So I guess I can leave it. But interestingly setting it to PPM interferes with me controlling the VESC speed/current/rpm via CAN.

Now I am trying to understand how the default CAN ID is set after flashing. I think based off some HW UID. One of my VESCs goes to 80 and the other one to 116. Just watched a video and it was 116 there as well, coincidence? But these are all minor things, now that I know my CAN forwarding stays working, I can set it all back. All good.

1 Like

I want to know what your dreaming up that needs two VESCs…

Single VESC :slight_smile: But it will only have CAN access (no USB, PPM, UART, BT …). So I am figuring out right now if and how I can do every imaginable future update via CAN, such as bootloader and FW updates, motor calibraitons and configuring all the settings. Seems possible and looks like the simplest way is to use a 2nd VESC as a gateway and do CAN forwarding. I first tried recompiling the VESC tool with enabled direct CAN support so I can use a USBtoCAN device from my PC, but I failed. Gateway VESC it is.

Can also get a vesc express chip instead of a second vesc. They are quite cheap and compact.

1 Like

That’s good to hear, I wasn’t aware that the VESC Express can serve as a Vesc Tool CAN gateway. I already had ordered it for logging purposes. Thanks.