-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting to gen2 hoverboards #13
Comments
hi @gaucho1978, |
(be aware the plastics are slightly different, and not easy to get hold of). I did find a repo of a port to the dual board variety, but it was much less developed than the original of this repo... and i did not find documentation of the protocol between the boards. |
were you able to flash some new firmware on it? i would like to build up my own quad (4x4) e-longboard. do you think those boards can do the job? |
Tequilahat i've seen your board but it is different than mine. Mine is like the one found on flo (https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2) repository (you linked it, so you know it). Anyway I'm still waiting the programmer |
Btsimonh thank you. I Will flash mine then if my lawn mower project Will fail, i Will try to port your code on my board. The protocol between the 2 boards it is not documented on flo repository (https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2) but it is easy, reading the code, to understand how it is structured. I Think the hard part is to read the accelerometers and to correcly use that data. But i suppose i can copy your code for this! |
Another thing that i need to do is to exactly control the movement of the robot. For this reason i suppose that i have to check the position of the motors coming from the hall connectors and to count the Number of turns of the wheels to know where the robot is inside the garden (once he stored the perimeter of the garden thanks to proximity sensors). |
the problem will be the accellerometers - i don't know if that repo has code to read the chip, but I do not know of any code - i get the data from external boards over serial..... |
dear @btsimonh I would like to do the following, on the 2 boards firmware:
|
according to the code on the Flo repository, I can read that the motor control routine sets the 3 phases to 90 degrees in advance respect to the current position of the motor. This is done considering only 6 possible positions of the motor. So the easy way to implement position control, could be to read the position just in the 6 positions, and to stop the motor once it reach the position. SO the command could say: make 12 steps forward, and the motors will perform 2 complete rotations. |
those '6' positions are repeated around the wheel. each 'position' is ~6mm of movement. The 90 degrees refers to the phase of the signal, not the angle of the wheel.... |
:-O really?!!!!! looking at this picture ( https://raw.githubusercontent.com/flo199213/Hoverboard-Firmware-Hack-Gen2/master/Raumzeigerdiagramm.png ) it seems that a complete rotation of the phases correspond to a rotation of the motor. Instead you are telling that one position is around 6mm so, one rotation of the phases is 36mm that correspond to 1/14 of the rotation of the wheel (wheels of 6,5" so the perimeter is 519mm) . |
yes, sure, but not on the exact numbers (have a feeling there are 60 'positions', it's in the code). |
thank you. |
@gaucho1978 Your Diagram indicates One "electrical" revolution - where all 6 hall phases are stepped through. This would be the same, if you had only three windings and 1 magnet pole pair. |
@btsimonh and @p-h-a-i-l which IDE do you suggest me to use? |
see the readme.md for programming instructions using openocd. |
thank you @btsimonh . |
all free - it should go swimingly - but these things never do! In theory, platform.io will automatically download tools and libraries as required - just open this project folder, and try a build. Then duplicate, rename, strip and add the files from the other repo.... (then hit all the differences between keil and pio!)... |
I use platformio in vscode on linux |
@btsimonh I compiled your code with success (just some warning on unsigned long assigned to long variables) That .h file is not available on Flo repository but there is a RTE folder with something related to gd32 chip. |
May be it's easier if I begin with keil... |
not used it for years; but should be ok. It is apparently free for small code (which this should be...), and it should at least work - platform.io can be a little 'opaque' in how it is working/what it's adding automagically. |
Keil should be ok, but you will quickly run into the 32k limit. |
ok @btsimonh and @p-h-a-i-l but then how should I solve the found problem? |
@btsimonh I've seen that you forked the Flo repository https://github.com/btsimonh/Hoverboard-Firmware-Hack-Gen2 |
@btsimonh how did you fried your board? bad soldering? bad connections? |
I successfully compiled with keil. Now I need to try to flash it. |
stupidity. p.s. - no changes in my repo... |
I read about methods to extract firmware from st32 chip. I understood it is not easy and may be new chips are protected against these attacks. |
What kind of attacks? Glitching? |
Interesting.. Do you know if this attack is possible on STM32F1 too? |
the GD32 did not seem to behave as described in the papers.... I found a bit of code which operated the debug interface, and put it in an 8266, then modified it to perform the attack.... I think also the STM32F1 was not vulnerable. |
Your work is amazing. I have gen2 hoverboard (the one with 2 boards instead of one) and I would like to be able to restore it with hoverboard functionality. Any hint?
The text was updated successfully, but these errors were encountered: