You are here

Help with COMM_GET_VALUES over nRF

4 posts / 0 new
Last post
futuredesign
Offline
Last seen: 6 years 1 month ago
Joined: 2017-09-09 00:41
Posts: 4
Help with COMM_GET_VALUES over nRF

Hi all,

I'm making my own remote and I've gotten a long way. Sending MOTE_PACKET_BUTTONS and MOTE_PACKET_PAIRING_INFO is working, so I can actually remote the Vesc from my remote.

Now I'm trying to get feedback from the Vesc. I'm trying to get the Vesc to respond to COMM_GET_VALUES command over nRF.

My packet is assembled this way:

  int16_t index = 0;
  txBuffer[index++] = MOTE_PACKET_PROCESS_SHORT_BUFFER;
  txBuffer[index++] = COMM_GET_VALUES;
  crc = crc16(txBuffer, index);
  buffer_append_uint16(txBuffer, crc, &index);
  vescTransmit(index);

However I don't get anything in return except the occasional MOTE_PACKET_ALIVE.

Can someone tell me what i'm doing wrong here?

Thank you in advance!

benjamin
Offline
Last seen: 2 weeks 2 hours ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

Are you connected over USB at the same time and sending/receiving data? The commands interface sends data back to the last interface that asked for data, so if something is sent over USB in between the packet will be sent back over USB.

futuredesign
Offline
Last seen: 6 years 1 month ago
Joined: 2017-09-09 00:41
Posts: 4

Hi Benjamin,

Thank you for taking your time to answer my question.

I was connected to the Vesc via USB while developing my remote, however disconnecting, removing the cable and rebooting the Vesc didn't change my situation. Still no answer.

I'm now trying to build the Vesc firmware with additional debug output in selected spots in the code. Fingers crossed.

I didn't find any other project that made use of the MOTE_PACKET_PROCESS_SHORT_BUFFER. Have you yourself tested the function? It's so simple and should work.

futuredesign
Offline
Last seen: 6 years 1 month ago
Joined: 2017-09-09 00:41
Posts: 4

Problem solved. It turns out that the timing in reading packets are very critical. So 6 hours of debugging later I now how my remote working... The good thing was that I learned alot about the bldc software and how to manipulate it.