pinebuds/README.md

81 lines
3.3 KiB
Markdown
Raw Normal View History

2022-09-25 03:17:03 -05:00
# PineBuds Open Source SDK
2022-12-28 00:04:07 -06:00
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.
2022-12-28 00:16:00 -06:00
## Usage
2023-01-07 19:41:25 -06:00
To use this setup to build & flash your PineBuds you will need a system with docker setup at the minimum.
2022-12-28 00:16:00 -06:00
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.
```bash
./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
2023-01-04 20:48:10 -06:00
# 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
2022-12-30 05:27:18 -06:00
# 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.
2022-12-30 05:42:58 -06:00
# You can try the helper script by running
2022-12-30 05:27:18 -06:00
./download.sh
# Or do it manually by :
2022-12-28 00:16:00 -06:00
# 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
```
2022-12-28 04:41:15 -06:00
2023-01-07 19:41:25 -06:00
## Changelist from stock open source SDK
2022-12-28 04:41:15 -06:00
2022-12-30 05:27:18 -06:00
- 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
2023-01-07 19:41:05 -06:00
- Debugging baud rate raised to 2000000 to match stock firmware
2022-12-30 05:27:18 -06:00
- 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
2022-12-30 05:42:58 -06:00
- Hold : Toggle ANC(Currently non functional, WIP)
2022-12-30 05:27:18 -06:00
- Triple tap : Volume Up
#### Left Ear:
- Single tap : Play/Pause
- Double tap : Previous track
2022-12-30 05:42:58 -06:00
- Hold : Toggle ANC(Currently non functional, WIP)
2022-12-30 05:27:18 -06:00
- 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 audio alerts are stored in:
`config/_default_cfg_src_/res/en/`
2023-01-29 10:27:03 -06:00
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.mp3`) with your own MP3 with the same name
and recompile with `./build.sh`!