|
| 1 | +# Speaker Setup Guide |
| 2 | + |
| 3 | +How to set up your Bose SoundTouch speaker to work with SoundCork. This guide |
| 4 | +covers enabling SSH access, extracting the data SoundCork needs, and redirecting |
| 5 | +your speaker's cloud traffic to your SoundCork server. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- Bose SoundTouch speaker (tested on SoundTouch 20, firmware 27.0.6) |
| 10 | +- Clean FAT32-formatted USB stick |
| 11 | +- Ethernet cable (recommended for initial setup) |
| 12 | +- Computer on the same network as the speaker |
| 13 | + |
| 14 | +## Step 1: Enable SSH Access |
| 15 | + |
| 16 | +### Firmware 27.x (Current) |
| 17 | + |
| 18 | +The old `remote_services on` TAP command (port 17000) was **removed** in |
| 19 | +firmware 27.x. You must use the USB stick method instead: |
| 20 | + |
| 21 | +1. Format a USB stick as FAT32. |
| 22 | +2. Create a single empty file called `remote_services` (no file extension). |
| 23 | +3. **Critical for macOS users** — remove the junk files that macOS creates |
| 24 | + automatically: |
| 25 | + ```sh |
| 26 | + mdutil -i off /Volumes/YOUR_USB_NAME |
| 27 | + rm -rf /Volumes/YOUR_USB_NAME/.fseventsd |
| 28 | + rm -rf /Volumes/YOUR_USB_NAME/.Spotlight-V100 |
| 29 | + rm -f /Volumes/YOUR_USB_NAME/._* |
| 30 | + ``` |
| 31 | + These hidden files can prevent the speaker from detecting the |
| 32 | + `remote_services` file. |
| 33 | +4. Power off the speaker completely. |
| 34 | +5. Insert the USB stick into the USB port on the back of the speaker. |
| 35 | +6. Power on the speaker. |
| 36 | +7. Wait approximately 60 seconds. |
| 37 | + |
| 38 | +> **A note on connectivity**: During our testing, we initially failed with WiFi |
| 39 | +> and a USB stick containing macOS junk files. We succeeded after cleaning the |
| 40 | +> USB AND switching to Ethernet. We changed both variables simultaneously, so we |
| 41 | +> cannot confirm which was the actual fix. If WiFi doesn't work for you, try |
| 42 | +> connecting the speaker via Ethernet cable as well. |
| 43 | +
|
| 44 | +Then SSH in: |
| 45 | + |
| 46 | +```sh |
| 47 | +ssh root@<speaker-ip> |
| 48 | +``` |
| 49 | + |
| 50 | +No password is required. |
| 51 | + |
| 52 | +### Make SSH Persistent Across Reboots |
| 53 | + |
| 54 | +By default, SSH access is lost when the speaker reboots. To make it permanent: |
| 55 | + |
| 56 | +```sh |
| 57 | +ssh root@<speaker-ip> |
| 58 | +touch /mnt/nv/remote_services |
| 59 | +``` |
| 60 | + |
| 61 | +This creates a persistent flag file on the speaker's non-volatile storage. You |
| 62 | +can now remove the USB stick and SSH will survive reboots. |
| 63 | + |
| 64 | +### Finding Your Speaker's IP Address |
| 65 | + |
| 66 | +There are a few ways to find the speaker's IP: |
| 67 | + |
| 68 | +- Check your router's DHCP client list for a device named "SoundTouch". |
| 69 | +- If you have the [Bose CLI](https://github.com/timvw/bose): `bose status` |
| 70 | +- The Bose SoundTouch app shows the speaker's IP in device settings. |
| 71 | + |
| 72 | +## Step 2: Extract Speaker Data |
| 73 | + |
| 74 | +SoundCork needs 4 XML files from your speaker. Some are available via the |
| 75 | +speaker's local web API (port 8090), others require SSH. |
| 76 | + |
| 77 | +### From the speaker's web API (port 8090) |
| 78 | + |
| 79 | +```sh |
| 80 | +curl http://<speaker-ip>:8090/presets > Presets.xml |
| 81 | +curl http://<speaker-ip>:8090/recents > Recents.xml |
| 82 | +curl http://<speaker-ip>:8090/info > DeviceInfo.xml |
| 83 | +``` |
| 84 | + |
| 85 | +### From SSH (requires root access) |
| 86 | + |
| 87 | +`Sources.xml` contains authentication tokens that are not exposed via the web |
| 88 | +API. You must retrieve it over SSH: |
| 89 | + |
| 90 | +```sh |
| 91 | +ssh root@<speaker-ip> |
| 92 | +cat /mnt/nv/BoseApp-Persistence/1/Sources.xml |
| 93 | +``` |
| 94 | + |
| 95 | +Copy the output and save it as `Sources.xml`. |
| 96 | + |
| 97 | +### Get Your Account UUID |
| 98 | + |
| 99 | +From the `DeviceInfo.xml` you just downloaded, find the `margeAccountUUID` |
| 100 | +field. Alternatively, via SSH: |
| 101 | + |
| 102 | +```sh |
| 103 | +cat /opt/Bose/etc/SoundTouchSdkPrivateCfg.xml |
| 104 | +``` |
| 105 | + |
| 106 | +Look for the account UUID in the marge URL. |
| 107 | + |
| 108 | +### Store Files in SoundCork's Data Directory |
| 109 | + |
| 110 | +Place the extracted files in the following structure: |
| 111 | + |
| 112 | +``` |
| 113 | +data/ |
| 114 | + <accountId>/ |
| 115 | + Presets.xml |
| 116 | + Recents.xml |
| 117 | + Sources.xml |
| 118 | + devices/ |
| 119 | + <deviceId>/ |
| 120 | + DeviceInfo.xml |
| 121 | +``` |
| 122 | + |
| 123 | +Where: |
| 124 | +- `<accountId>` is your `margeAccountUUID` |
| 125 | +- `<deviceId>` is the `deviceID` attribute from `DeviceInfo.xml` |
| 126 | + |
| 127 | +See the [`examples/`](../examples/) directory in this repository for the |
| 128 | +expected XML format. |
| 129 | + |
| 130 | +## Step 3: Redirect Speaker to SoundCork |
| 131 | + |
| 132 | +### Make the filesystem writable |
| 133 | + |
| 134 | +The speaker's root filesystem is read-only by default. You must switch it to |
| 135 | +read-write mode before editing any files: |
| 136 | + |
| 137 | +```sh |
| 138 | +ssh root@<speaker-ip> |
| 139 | +rw |
| 140 | +``` |
| 141 | + |
| 142 | +### Edit the server configuration |
| 143 | + |
| 144 | +```sh |
| 145 | +vi /opt/Bose/etc/SoundTouchSdkPrivateCfg.xml |
| 146 | +``` |
| 147 | + |
| 148 | +Change all 4 server URLs to point to your SoundCork instance: |
| 149 | + |
| 150 | +| Server | Before | After | |
| 151 | +|---------|-------------------------------------|-------------------------------| |
| 152 | +| marge | `https://streaming.bose.com` | `https://your-soundcork-server` | |
| 153 | +| bmx | `https://content.api.bose.io` | `https://your-soundcork-server` | |
| 154 | +| updates | `https://worldwide.bose.com` | `https://your-soundcork-server` | |
| 155 | +| stats | `https://events.api.bosecm.com` | `https://your-soundcork-server` | |
| 156 | + |
| 157 | +Reboot the speaker for changes to take effect. The speaker will now send all |
| 158 | +cloud traffic to your SoundCork server. |
| 159 | + |
| 160 | +## Warnings |
| 161 | + |
| 162 | +> **Port 17000 (TAP Console)**: The speaker exposes a diagnostic console on |
| 163 | +> port 17000. On firmware 27.x, most commands have been removed. **Do NOT send |
| 164 | +> exploratory commands** — the `demo enter` command puts the speaker into |
| 165 | +> factory/demo mode which may be difficult to recover from. |
| 166 | +
|
| 167 | +> **Read-only filesystem**: The speaker's root filesystem is read-only by |
| 168 | +> default. Always run `rw` before editing files. The filesystem reverts to |
| 169 | +> read-only on reboot. |
0 commit comments