camcamfresh / Xiaomi-M365-BLE-Controller-Replacement

Replacing the BLE Controller with a Cellular Controller
142 stars 34 forks source link

How to activate Scooter #3

Closed DoidoYo closed 5 years ago

DoidoYo commented 6 years ago

Hello, what are the expected commands to the motor controller? Does it have to be unlocked first to then start sending break and throttle information? Is the password needed? I'm also trying to build a BLE controller replacement. While I'm able to read the information between the stock BLE and motor controller, I'm having trouble activating the motor and running it with my custom one. Any help is appreciated.

camcamfresh commented 5 years ago

So I haven't tried enabling the password on the scooter, though I do remember seeing it on the MiHome app. I've tested the break and throttle information and as long as the scooter is on, the BLE controller sends the values, however if the scooter is locked the motor controller will not activate the motor (though it still receives the values). I would avoid using the word activate since the motor controller does need to be activated once to begin working (I'm not sure how this works but some guys in Russia activate the control boards for like $35 I think, if I find the link again I'll tag it on this thread). Now once it the motor control is activated, it will respond to commands sent by the BLE board. It doesn't matter if the motor controller loses power it will stay activated. When I began experimenting with the communication data I literally copied the exact packets I was monitoring between the factory BLE board and the motor controller and programmed my microchip to send those. As a result, I had to spin the scooter's wheel before turning the microcontroller on (began communicating with the motor controller) but I was able to successfully turn on the motor although it was only at one speed.

jacknab commented 5 years ago

hi, I actually been looking for details on how to make my own BLE board for my scooter, I came across your project here on Github - which totally looks like an exciting project to play around with, I didn't finish reading the description/deals.. I spontaneously went for it.. and without any hesitation purchased the Particle Electron cellular kit.
*Question now: does the scooter still need the BLE board? I have 2 M365 scooters, one is fully functioning, my second scooter I actually found in this very cluttered thrift store, sticker price was $10.00 - however after much troubleshooting I have discovered the ble controller board was fried.

camcamfresh you mentioned you programmed your own microcrontroller could I ask what type of components you used? Was it something Arduino like?

camcamfresh commented 5 years ago

No it does not need the BLE board. I did purchase a BLE board, but that was strictly for learning about the messages it sends to the scooter's motor controller (that is where I learned about the information request packet structure; it's in the escControl function of firmware.ino).

I completely eliminated the BLE board from the scooter and replaced it with the Particle Electron. It is very similar to Arduino (both use C++ if remember correctly), but it also has cellular capabilities.

microcontroller = particle electron (I also sometimes use it to describe the motor controller and BMS circuit boards). Not sure if this is the correct terminology, but I've never taken a computer science class about any of this so ... that's what I call it for now.

jacknab commented 5 years ago

awsome i have ordered the particle cellular board however the version that had gps board was sold out, the board arrive tomorrow.

anyway of taking some photos of your project to see its design and wiring.

.

jacknab commented 5 years ago

how are u sending commands to the particle board? i know over celullar but did u create a simple web page to do this

On Wed, Nov 7, 2018, 2:17 AM camcamfresh <notifications@github.com wrote:

No it does not need the BLE board. I did purchase a BLE board, but that was strictly for learning about the messages it sends to the scooter's motor controller (that is where I learned about the information request packet structure; it's in the escControl function of firmware.ino).

I completely eliminated the BLE board from the scooter and replaced it with the Particle Electron. It is very similar to Arduino (both use C++ if remember correctly), but it also has cellular capabilities.

microcontroller = particle electron (I also sometimes use it to describe the motor controller and BMS circuit boards). Not sure if this is the correct terminology, but I've never taken a computer science class about any of this so ... that's what I call it for now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/camcamfresh/Xiaomi-M365-BLE-Controller-Replacement/issues/3#issuecomment-436557278, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnEbIK-oPD8u4H36A6f_X8RFpgXXx9xks5usqVEgaJpZM4WiUpt .

camcamfresh commented 5 years ago

I usually use the Particle IDE, but am working on a swift program using HTML Post method (check the Particle Documentation). I am having trouble completing the program as I do not own a mac.