Git Product home page Git Product logo

mi-drone-battery-proxy's Introduction

Mi-Drone-Battery-Proxy

Software implementation of Xiaomi FiMi Mi Drone locked battery hack via Arduino

This application allows to use Arduino like a I2C Proxy between Xiaomi Mi Drone and locked battery.

It's strongly recommended to change bad(undervoltaged) bank in locked battery to good bank from another locked battery before using I2C proxy for unlock battery!

The main functionality is changing response from locked battery to drone for 2 commands:

// 0xFF 0x03 0x4A 0x00 0x02 - undervoltage times - always send zero value - 0x0 0x0 0x0 0x0 // 0x07 - battery status - always send good status - 0x04 0x0 0x0B 0x0B

Also this app allows to send commands from Serial to battery for analyzing purpose. It's better to set DEBUG_MODE=0 when analyzing is not needed

Connection: I2C Bus from drone should be connected to the hardware I2C port, bacause only hardware I2C supports slave mode. For the Arduino Pro Mini it's A4(SDA) and A5(SCL) pins. I2C Bus from battery could be connected to any PWM pins. These pins should be defined as I2C_BATTERY_SDA and I2C_BATTERY_SCL. Using pin 5 (SDA) and 6 (SCL) in this example.

Currently this software implementation has some problems on different hardwares. On some Arduino Pro Mini it's working fine out of the box all the time. On some it may detect battery only from 10th time and may stop working due some interruption in a minute after start.

Repository is based on hacked Wire and SoftwereWire arduino libraries with ability to send and receive bytes without buffering.

Main purpose of this repository is to rewrite code of this software proxy implimentation with support of Non blocking Wire library (nI2C) https://github.com/nitacku/nI2C

mi-drone-battery-proxy's People

Contributors

joshhh avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.