Giter Site home page Giter Site logo

pinebuds's Introduction

PineBuds Open Source SDK

This is just the SDK from the wiki (so far), with dockerfile setup to make building easier, and my reverse engineered bestool integrated. The docker image will build bestool for you first, then drop you into the dev container for building and flashing the buds.

Usage

To use this setup to build & flash your PineBuds you will need a system with docker setup at the minimum. Docker is used to (1) make this all much more reprodicible and easier to debug and (2) so that we dont mess with your host system at all. In order to program the buds from inside of the docker container; privileged mode is used. So do be a tad more careful than usual.

./start_dev.sh # This will cause docker to start your working environment; this should take roughly 1-3 minutes depending on your network speed to the GCC hosting server

# Now you will be inside of the container, and your prompt will look akin to "root@ec5410d0a265:/usr/src#"

./build.sh # This will run make and build the output program. If you have weird build errors try running clean.sh or rm -rf'ing the out folder first

# Now that the firmware has finished building; if there are no errors you can load it to your buds

# You may want to back up the firmware currently on the buds - it will be deleted when the new firmware is loaded on:
./backup.sh

# You may need to take the buds out of the case, wait three seconds, place them back. This wakes them up and the programmer needs to catch this reboot.

# You can try the helper script by running
./download.sh

# Or do it manually by :

# Assuming that your serial ports are 0 and 1, run the following to commands to program each bud in series.
bestool write-image out/open_source/open_source.bin --port /dev/ttyACM0
bestool write-image out/open_source/open_source.bin --port /dev/ttyACM1

Changelist from stock open source SDK

  • Long hold (5 ish seconds) the button on the back when buds are in the case to force a device reboot (so it can be programmed)
  • Use the resistor in the buds to pick Left/Right rather than TWS master/slave pairing
  • Pressing the button on the back while in the case no longer triggers DFU mode
  • Debugging baud rate raised to 2000000 to match stock firmware
  • Fixed TWS operation such that putting either bud into the case correctly switches to the other bud
  • Working (mostly) audio controls using the touch button on the buds
  • Turned off showing up as a HID keyboard, as not sure why you would; but it stops android nagging me about a new keyboard

Current bud tap codes

Both pods active

Right Ear:

  • Single tap : Play/Pause
  • Double tap : Next track
  • Hold : Toggle ANC(Currently non functional, WIP)
  • Triple tap : Volume Up

Left Ear:

  • Single tap : Play/Pause
  • Double tap : Previous track
  • Hold : Toggle ANC(Currently non functional, WIP)
  • Triple tap : Volume Down

Single pod active

  • Single tap : Play/Pause
  • Double tap : Next track
  • Hold : Previous track
  • Triple tap : Volume Up
  • Quad tap : Volume Down

Changing audio alerts

The default audio alerts are stored in:

config/_default_cfg_src_/res/en/

If you want to change the alert to a custom sound, just replace the sound file you'd like to change (ie config/_default_cfg_src_/res/en/SOUND_POWER_ON.opus) with your own audio file with the same base name (ie config/_default_cfg_src_/res/en/SOUND_POWER_ON.mp3) and recompile with ./build.sh!

Language support

The AUDIO environment variable can be set when running the build.sh script to load sound files for languages other than the default English. For example, running AUDIO=cn ./build.sh will load sounds files from config/_default_cfg_src_/res/cn/ instead of the default en/ folder.

The current languages supported with sound files are English (en) and Chinese (cn). Other languages (or other sets of custom sounds) may be added by adding all the correct sound files into a config/_default_cfg_src_/res/<custom_sounds>/ directory and building with AUDIO=<custom_sounds> ./build.sh.

pinebuds's People

Contributors

dylancao avatar fintasticman avatar frap129 avatar pure5665 avatar ralim avatar shymega avatar spagett1 avatar thatcherc avatar

Stargazers

 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.