You are here

[solved] Where the motor configuration signature is from?

6 posts / 0 new
Last post
Last seen: 2 years 11 months ago
Joined: 2021-05-29 05:27
Posts: 2
[solved] Where the motor configuration signature is from?

I solved the signature problem. Turns out the signature is just an integer converted from a very long string containing all parameters' settings. Once the correct signature is written in the firmware, the whole thing run perfectly.

Below is my original situation. Basically I editted the code of bldc and vesc tool by adding a variable to motor configuration which causes the motor configuration deserialization to fail. Now I narrow the problem down to something being wrong with the motor configuration signature. In confgenerator.h I found the constants of the signature but it's just a long number and doesn't make any sense. Can someone tell me how to generate the correct signature so that the motor configuration can be deserialized? Thank you!

my confgenerator.h:

// This file is autogenerated by VESC Tool


#include "datatypes.h"
#include <stdint.h>
#include <stdbool.h>

// Constants
#define MCCONF_SIGNATURE        2211848314
#define APPCONF_SIGNATURE        3264926020

// Functions
int32_t confgenerator_serialize_mcconf(uint8_t *buffer, const mc_configuration *conf);
int32_t confgenerator_serialize_appconf(uint8_t *buffer, const app_configuration *conf);

bool confgenerator_deserialize_mcconf(const uint8_t *buffer, mc_configuration *conf);
bool confgenerator_deserialize_appconf(const uint8_t *buffer, app_configuration *conf);

void confgenerator_set_defaults_mcconf(mc_configuration *conf);
void confgenerator_set_defaults_appconf(app_configuration *conf);





I want to control aux to switch on and off depending on mosfet temperature and I want to change the temperature settings directly on vesc tool.

So, for the source code of vesc tool, I modified parameters_mcconf.xml by adding extra variables like this:

Around line 500:

            <longName>MOSFET Cooling Low Threshold</longName>
            <description>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; ; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The MOSFET temperature threshold(below which the cooling system turns off).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description>
            <suffix> °C</suffix>

Around line 3500:


Around line 3600:

<param>::sep::MOSFET Cooling</param>

After done this I can actually see the field appear in vesc tool.


And for firmware, I modified datatypes.h by adding the corresponding float variable in mc_configuration struct like the following.

float l_temp_fet_low; 

conf->l_temp_fet_low = MCCONF_L_LIM_TEMP_FET_LOW;


In confgenerator.c, "buffer_append_float32_auto(buffer, conf->l_temp_fet_low, &ind);" is added.

In mcconf_default.h, the following is added.


But when vesc tool tries to connect with the firmware, the error message throws out saying deserializing motor configuration failed. Can someone tell me what may cause that problem? Thanks.

Last seen: 6 days 17 hours ago
Joined: 2018-08-17 07:26
Posts: 427

Your changes are likely the cause. But you didn't bother to elaborate what they were. The quality of an answer is directly related to the quality of the question. 



NextGen FOC High voltage 144v/34s, 30kw (

Last seen: 2 years 11 months ago
Joined: 2021-05-29 05:27
Posts: 2

Thanks for pointing that out. I edited the question by adding all the modifications that I have done. By doing that I just want to add an extra parameter in motor configuration. Any idea?

Haocheng Chang

Last seen: 2 weeks 5 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I have added a few more AUX port options in the 5.03 development version. Is that what you are looking for?

Last seen: 1 year 3 months ago
Joined: 2022-04-16 06:34
Posts: 1

How did you know what to update the signature to? I Am trying to do a very simple build that just allows 0x72 as a valid MPU9150_WHO_AM_I, and can't get the signatures to work.


Last seen: 1 month 2 days ago
Joined: 2018-01-07 02:24
Posts: 3

I have same problem but dont understand the solution