Hi Guys, I've been developing an android based display app for bafang and tsdz* motors (and more if possible). I've found it fairly difficult to get detailed data on both the factory and OSF versions of each firmware (obviously the OSF is easier to reverse engineer).
I've added my current findings to the attached ZIP file (I lost my phone during traveling so I can't 2fa login to github for the next week or so), I will update when I can upload the repo properly.
Anyhow, If anyone has any more concrete specs, I'd be grateful for a link/info/anything whatsoever. Especially for bafang factory protocol (I assume we have this mostly correct, bafang support seems to work 100%), TSDZ8 factory protocol, (also seems to work 100% but I'm sure I have some fields mislabeled) and TSDZ* OSF protocols (the latter just because it's quite a terrifying protocol to implement with so many variables) I'd like to make my TSD OSF support require as little config as possible, while still allowing for overrides for advanced users.
I have a pretty simple Serial -> BT LE interface using an NRF52840 board (with several target boards, but it should be trivial to add others) here:
GitHub - speedysheep/nrfProxy: Proxy serial UART to bluetooth LE for BafflingVision display.
Note: There's another app that does this exact thing. My app is unrelated to it, shares no code with it, and I'm pretty sure that project was abandoned. But it's a great idea. Although if anyone has a better idea of how to get 3.3v from a potentially 100v supply, I'd be eternally grateful, as I haven't come across a single solution that doesn't require me to make a PCB at this point. I'm currently just going to avoid this and power it via a rechargable li-on battery until I resolve that.
My display app is currently not open sourced as it's both in active development and I'm not sure where I'm heading with it.
But I've added a screenshotso you guys can get an idea of what is happening. (both the dashboard and the widgets are user definable, you pick what you need. You can have multiple dashboard screens, for e.g. if you wanted real-time data as well as graphs of how you performed over a ride. Google maps support works both full screen (as a live background image) or as a widget (as shown here). Widget list is too large to list, but also trivial to add to.
Heart beat monitor support over bluetooth is working. I'm unsure if there's value in other bike sensors, but feedback would be welcome.
Anyhow, any protocol docs would be helpful. And any unsupported motors with a serial UART connection with a documented protocol would be interesting to hear about also.
The app is currently working 100% (as far as I can tell) across TSDZ8 and Bafang motors, with just a few tidying up issues to resolve. OSF is taking significantly longer as I'm attempting to make it less difficult to set up for a newbie, which requires a surprising amount of logic.
I'll be releasing the app to testers as soon as I have clarified the protocol issues. Which is why I'm delayed by the OSF firmware, as OSF guys are much more likely to be tolerant of bugs and other issues
Anyhow, to sum up, if anyone has any more detailed protocol info for Bafang, Tongsheng (OSF or other) or any other serial UART motor I'd be grateful to hear from you. I'm hoping to eventually support CAN-BUS although I haven't yet seen how practical that might be.
Thanks,
badshepy.
I've added my current findings to the attached ZIP file (I lost my phone during traveling so I can't 2fa login to github for the next week or so), I will update when I can upload the repo properly.
Anyhow, If anyone has any more concrete specs, I'd be grateful for a link/info/anything whatsoever. Especially for bafang factory protocol (I assume we have this mostly correct, bafang support seems to work 100%), TSDZ8 factory protocol, (also seems to work 100% but I'm sure I have some fields mislabeled) and TSDZ* OSF protocols (the latter just because it's quite a terrifying protocol to implement with so many variables) I'd like to make my TSD OSF support require as little config as possible, while still allowing for overrides for advanced users.
I have a pretty simple Serial -> BT LE interface using an NRF52840 board (with several target boards, but it should be trivial to add others) here:
GitHub - speedysheep/nrfProxy: Proxy serial UART to bluetooth LE for BafflingVision display.
Note: There's another app that does this exact thing. My app is unrelated to it, shares no code with it, and I'm pretty sure that project was abandoned. But it's a great idea. Although if anyone has a better idea of how to get 3.3v from a potentially 100v supply, I'd be eternally grateful, as I haven't come across a single solution that doesn't require me to make a PCB at this point. I'm currently just going to avoid this and power it via a rechargable li-on battery until I resolve that.
My display app is currently not open sourced as it's both in active development and I'm not sure where I'm heading with it.
But I've added a screenshotso you guys can get an idea of what is happening. (both the dashboard and the widgets are user definable, you pick what you need. You can have multiple dashboard screens, for e.g. if you wanted real-time data as well as graphs of how you performed over a ride. Google maps support works both full screen (as a live background image) or as a widget (as shown here). Widget list is too large to list, but also trivial to add to.
Heart beat monitor support over bluetooth is working. I'm unsure if there's value in other bike sensors, but feedback would be welcome.
Anyhow, any protocol docs would be helpful. And any unsupported motors with a serial UART connection with a documented protocol would be interesting to hear about also.
The app is currently working 100% (as far as I can tell) across TSDZ8 and Bafang motors, with just a few tidying up issues to resolve. OSF is taking significantly longer as I'm attempting to make it less difficult to set up for a newbie, which requires a surprising amount of logic.
I'll be releasing the app to testers as soon as I have clarified the protocol issues. Which is why I'm delayed by the OSF firmware, as OSF guys are much more likely to be tolerant of bugs and other issues
Anyhow, to sum up, if anyone has any more detailed protocol info for Bafang, Tongsheng (OSF or other) or any other serial UART motor I'd be grateful to hear from you. I'm hoping to eventually support CAN-BUS although I haven't yet seen how practical that might be.
Thanks,
badshepy.
