First of off, I wanna just say, this wasn’t my idea, and this isn’t the first time its been done.
I gotta thank @trelensis and @Nick_LEED3D (sorry dont know you on this forum) and @b264 for figuring this out and modifying the firmware as required to make this work. Their info and the pathway there is all in this thread
This one is only intended as a summary/cheatsheet of their work, since BKB has bought the unity/zenith out of the shade and there are a fair few UART devices kicking round now.
Righto deckheads I spent way too long trying to make this work, so I’ll try to make it simple for any other kooks like me. If you want to use your BLE UART port for something else, hopefully this helps.
Step 1
For your device to be able to utilise this port the first step is to flash your firmware to change the Baud rate of this port to 115200, at least for the Davega mods anyway. Thankfully @nick_LEET3D has uploaded a precooked unity firmware (VESC 5.1) HERE for us to use. It’s locked at 115200 for the moment, so fingers crossed that’s what your device needs. I had success uploading this via USB with VESC Tool 2.06. You’ll need to rename the file “VESC_custom.bin” then upload through the custom tab at your own risk.
Step 2
Identify the pins required on the factory BLE port. I only figured out the ones I needed, but if anyone else knows the rest chime in and I’ll update.
(From the Unity BLE module)
1- TX, 2 - RX, 3 - 3.3V, 4 - CLK, 5 - GND, 6 - IO, 13 - 5V
Then grab yourself some suitable sized pins, or better yet a pin header if you can find one, and attach the requisite leads. For the flipsky TFT I needed the TX,RX,GND and 5V as seen in the pic. Depending on which version of Davega you have you may need the 3.3v, so be very careful you don’t pop a 3.3v version with 5v and ruin your day.
Step 3
Spend waaaay too long:
- wondering why it wont work
- swapping pins
- believing your solders are no good
- believing your pin sockets aren’t making contact
- thinking you broke something
- wondering if the firmware did not flash properly
I had the TFT powering up but only showing this most of the time and not responding to wheel speed input or battery level.
Step 4
Realise your crappy Flipshite TFT takes 30 seconds to actually start showing the correct values, and you had the pins round the right way at some stage in the preceding hour and did not know. In my case, I had to reverse the TX and RX from what the unity BLE module had mapped. Not sure if this changed when you go from the Unity FW to the VESC 5.1, or whether the Flipsky document was wrong for a VESC4 (which I thought was what unity was, but maybe not after its been updated to VESC FW.)
So for me with the Flipsky TFT the correct pin order was
1- RX, 2 - TX, 5 - GND, 13 - 5V
Remember depending on your Davega model, you may need 3.3v not 5 so double check again before you fire it up to see if it works.
Step 5
Celebrate with yet another drink and by stopping pulling chunks of your hair out in frustration, IT’S WORKING! Grab the hot glue gun and fashion an ugly AF plug blob thing to hold those wobbly little pins in.
I had to scalpel a little of the silicon out of the way of the pin header socket to make it all sit flush too.
Step 6
Take that baby out for a ride and bask in the glory of completing a relatively simple task in an inordinate amount of time, and all with only half a carton of tinnies.
This is probably well below the pay grade of almost everyone on this forum, but I was encouraged to document it here, so here it is.
Maybe someone far smarter than me could figure out how to commit something into the git that makes this second UART port a user select-able baud rate just in case the desired device is not 115200, and so that those of us that have done this mod can have a firmware update one day if required.