You are here

VESC UART response format?

3 posts / 0 new
Last post
dcode
Offline
Last seen: 4 months 3 weeks ago
Joined: 2023-08-23 00:36
Posts: 1
VESC UART response format?

Hi folks!

Currently getting started with VESC and trying to communicate with two of them via UART, but the response data I am seeing doesn't make sense to me. I've looked at various Arduino libraries and the sources of the bldc firmware (using 6.05 beta here) as well as vesc_tool itself, and these seem to stick to a strict response format, but that format is not what I am seeing. For example, when I request the firmware version with

id=2, length=1, packet_id=COMM_FW_VERSION=0, crc=0 0, end=3
-> 2 1 0 0 0 3

the response is

2 36 6 65 19 250 221 53 213 45 50 25 37 8 84 154 57 38 130 0 8 0 64 0 0 45 105

where the initial 2 indicates a one-byte length, but 36 isn't the correct length. And so it continues: The packet_id should be COMM_FW_VERSION=0, not 6, etc.

Similar for packet_id=COMM_GET_STATS=128

getStats mask=0, VESC responds with 2 65 0 0 34 55

getStats mask=1, VESC responds with 2 66 0 0 64 154 121 84 151 26

getStats mask=3, VESC responds with 2 67 0 0 160 211 43 92 130 226 127 171 3

where none of the responses match the format I'd expect. Overall, though, the VESC accepts the request messages, which would not be the case if, say, the CRC was wrong, just the responses seem weird. Any ideas what I'm doing wrong?

Darkgayo
Offline
Last seen: 7 months 3 weeks ago
Joined: 2023-08-29 17:32
Posts: 1

I try to use my arduino 32u4 with my Ubox V2 75v 100A j but the arduino library doesn't work properly! All variable change to "0" value with GetMCconfig ang SerMCconfig commands.

any idea? Thanks

rafeh1
Offline
Last seen: 3 weeks 21 hours ago
VESC Free
Joined: 2018-01-07 02:24
Posts: 9

anybody get a bt serial tool working on android

rafe