FOCBOX UNITY $299 | R-SPEC DRIVE KIT $588

Best way to program VESC via bluetooth


#7

Easy when you have Linux. The majorities can’t flash a module. This is why me made some. Since we didn’t start with 1000Units, price is not super low, but acceptable.

Frank


#8

metr.at App with the Bluetooth Module and TCP Bridge is the best and easiest way. Makes things so easy - never had to open my enclosure


#9

Since yesterday (?) Ackmaniac’s app supports this feature as well.

Connect your laptop VESC-tool to your app that’s connected to your BT-module.


#10

Also when I am on outside i use “perimetr” app to directly change VESC Settings and save them to the VESC. Saved me much trouble


#11

Can you do firmware uploads and real time data via a HM-10 and TCP bridge?

Firmware upload takes about a minute on a nrf51, that works out to be 12 minutes at HM-10 speeds.


#12

I’d say when it comes to configuring, VESC tool with NRF is the real deal. You connect on your laptop or the phone to any of your VESCs that’s connected via CAN with the actual vesc tool. Super handy for testing things on the road instead of on the bench…
What is really still missing is a good realtime display. I think Benjamin is still working on that.
For the moment I still have the HM-10 for Ackmaniac’s realtime display connected to the Slave-FOCBOX, and NRF for VESC tool on the Master. I won’t give up either right now.


#13

That is because Benjamin coded a cutom FW for the NRF51822, knowing what he is doing, getting the root problems nailed first.

Quote Vedder on https://vesc-project.com/node/234:

This is because it is not simply an USB-UART bridge, it also decodes and encodes the packets to get the maximum possible throughput and reliability.

Frank


#14

Limitations on Ackmaniac new feature :


#15

I don’t think that firmware updates work on the others via Bluetooth.
And if somebody says the opposite then please only do so when you tested it yourself.
And when you have a different Baudrate than the standard that comes with the firmware then you are fucked anyway because the connection won’t work.


#16

Doing it all the time! Works a treat with new module. 90 seconds, job done.


#17

STM32 has UART bootloader but you need to set BOOT pins which arent breaked out of package on pcb…


#18

Yep, firmware update worked perfectly the 4 times I’ve done it. Two times on two different VESCs, with 2 of those updates via CAN fwd.

I’m guessing it’s no accident that the nrf firmware Vedder wrote also adopts the VESC default baud rate.


#19

NRF isn’t bluetooth.

@Kug3lis are you trying to explain to me that it is possible to upload a firmware via UART?

@lock Edit: Now i see that he he did it for NRF51822 modules and he also changed the behavior of the VESC-Tool when bluetooth is connected. In that case it might work. Didn’t have a look at this implementation.
Last time i worked with NRF modules were with NRF24L01 which work different.


#20

The nRF51822 supports Bluetooth Low Energy and the other non-Bluetooth protocols. My MacBook can talk to my skateboard, and I’m fairly certain it only does Bluetooth :wink:


#21

LOL, when i look in the mirror i see a stupid fool.

Tested firmware update with my app and the bluetooth module via PC over TCP connection and it worked.
Takes like 5 minutes because of the slow baud rate but it works.

Can’t really believe it myself and don’t recommend it but…

Good think is that i changed the default baudrate in my firmware to 9600 so it works with standard hm-10 modules.


#22

Is it really such a bad idea though?

Based on my ‘possibly flawed’ understanding each firmware update packet is written to some other (unused) part of the flash, and it’s only if all packets are successfully written that the bootloader will be told to overwrite the actual firmware. If it was to fail halfway through the upload and you got a timeout error then there’d be no harm done as you’ve just written to an unused part of the flash anyway (that would be overwritten next update attempt). To get a timeout in the first place a single packet must fail 5 times, and this gets reset if a packet gets through. Corrupted data is unlikely to get through due to the crc check performed by the VESC.

The risky part I see is when the bootloader replaces the VESC firmware with what has been uploaded, but that’s all done on the VESC so shouldn’t matter if it’s initiated via USB or BT. If this fails halfway through, then yeah you’re going to have to break out the st-link.

It takes a lot longer than 5 minutes to get my enclosure off and on again!


#23

I see you understood it. But for many others there are a lot of questions and misunderstandings. Like updating the slave over CAN and saving the data in a xml when parameters changed as well. And then when the modules have another baudrate. For example vedders BLE modules wouldn’t work with my firmware after the update because i use 9600. It would be easy to have 115200 as well but then people need to be able to change the baudrate on the modules themself. And that is too much for the most. But maybe i can add the baudrate change in the ACKMANIAC-Tool for common modules.


#24

Inside each STM32 there is internal system memory with bootloader which gets triggered using BOOT pins so you can use: USB, UART, CAN, I2C, SPI or some other protocols to program STM32

I found this tool which implements ST protocol for UART and I2C


#25

I wish i knew about metr.at before buying my HM-10 modules. I definitely go metr.at route next time.


#27

I deleted my post of the countdown to Metr Pro release. You can now find all the information about it here: http://www.electric-skateboard.builders/t/metr-pro-next-gen-bluetooth-module/57780/
You will see there that you can update your VESC firmware with Metr Pro directly with the Metr App over the air. Its also possible to use the VESC Tool desktop or mobile app for updating with the mentioned module.