Code Monkey home page Code Monkey logo

9botone's Introduction

9BotONE

This repository contains some scripts and tools for communicating with my Ninebot ONE S2. It could work with other scooters too but might need some adjustment.

Ressources

The following docs helped me a lot when fiddling with the bluetooth protocol. Some of these are actually related to other similar scooters like the Ninebot ES2 or the Xiaomi M365.

9BotONE.py

Python script which connects to a ninebot and can read/write/dump registers. It runs using pygatt using BlueZ (Linux bluetooth stack).

# change the mac address in the file

python 9BotONE.py read <offset> <length>
python 9BotONE.py write <offset> <hex bytes...>
python 9BotONE.py dump <file>

Web tool

I initially wrote a javascript implementation of the ninebot tool for the keyfob, but it turns out the bluetooth API of the puckjs is the same as the (experimental) WebBluetooth API. So with a few extra lines i was able to read/write registers from the webbrowser.

You can try it yourself here: https://m4gnus.de/ninebot/src/

Keyfob

Having to take out my phone, disable mobile internet (so the app doesn't send my data to the "cloud"), enable bluetooth, open the app and finally click lock took too long, so i created a key fob using a puckjs which locks my scooter by simply clicking one button. Click the image for a demo video:

9botone's People

Contributors

m4gnv5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

9botone's Issues

Adding features

Hello

I like what you did and I would like to add some more features to it like turning the lights on/off, changing region, etc..
My first problem however is that I have a F40D, and the 4'th byte is not 0x11 or 0x09. I noticed you have a branch for ES2 but that doesn't help either.

Anyhow, I would like to ask how you managed to figure out then 4'th byte... actually how you managed to scan the bluetooth traffic you needed for reverse engineering?

I've been trying with bluetooth hci snoop logs on android, with wireshark+adb, but no success yet.

Thanks

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.