Hammerhead Karoo 3 extension to control CYCLAMI BLE bike lights (CYC1600 and similar)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Romain 673da5781f 1.0.3: detect Apple mfr ID (0x004C) lamps like Cyclami CYC1700
The CYC1700 advertises with no name, no service UUID, just Apple manufacturer
ID 0x004C (common Telink BLE module pattern).

- Accept any device with Apple mfr ID 0x004C in BLE scan
- Name unnamed Apple-mfr devices as 'Cyclami (Apple iBeacon)' in selector
- Sniffer highlights 0x004C devices as likely lamps
- App versionCode 34, versionName 1.0.3
- Sniffer versionCode 37, versionName 1.0.6
2026-10-18 13:05:30 +02:00
.github/workflows Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
app 1.0.3: detect Apple mfr ID (0x004C) lamps like Cyclami CYC1700 2026-10-18 13:05:30 +02:00
cyclami-sniffer 1.0.3: detect Apple mfr ID (0x004C) lamps like Cyclami CYC1700 2026-10-18 13:05:30 +02:00
docs/images Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
gradle/wrapper Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
.gitignore Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
build.gradle Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
gradle.properties Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
gradlew Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
gradlew.bat Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00
README.md 1.0.3: detect Apple mfr ID (0x004C) lamps like Cyclami CYC1700 2026-10-18 13:05:30 +02:00
settings.gradle Karoo Cyclami Controls: control Cyclami/Magicshine BLE bike lights from a Hammerhead Karoo 3 2026-10-13 23:33:50 +02:00

Karoo Cyclami Controls

Karoo app and Karoo extension for controlling a Cyclami light over BLE.

Fork of Karoo Magicshine Controls by Lennart Thomsen (MIT), retargeted to Cyclami lights (CYC1600 and siblings that share the Magicshine BLE protocol). Hosted on Forgejo: https://forge.basmonde.fr/Romain/karoo-cyclami

Karoo Cyclami Controls UI

About

Cyclami Controls is a Karoo app plus ride-field extension for controlling supported Cyclami lights over BLE.

  • Karoo-native control screen with telemetry
  • four-part in-ride field for light toggle, two-second flash, battery, and app launch
  • selection gate for supported lamp families

Ride Screen Button

Add the Cyclami field to a Karoo ride page to get four in-ride segments:

  • light state toggles between OFF and the remembered last output, level, and mode
  • FLASH flashes the selected light output for two seconds, then restores its previous state
  • battery shows HIGH, MID, or LOW for the tested EVO 1700, or a percentage on compatible continuous-telemetry firmware
  • APP opens the full app
  • the field disconnects again when you leave the ride screen

The two-second action is the ride-field FLASH button. In the main app, FLASH still selects the continuous flashing lighting mode, alongside SOS and steady brightness settings.

Release Notes

1.0.3

  • detects lamps advertising Apple manufacturer ID 0x004C (Telink BLE modules used by Cyclami CYC1700)
  • unnamed devices with Apple mfr ID are shown as "Cyclami (Apple iBeacon)" in the lamp selector
  • sniffer highlights Apple-mfr-ID devices as likely lamp candidates

1.0.2

  • adds CYC, CYC1700, CYC-1700, CYC1600, CYC-1600 to supported BLE name prefixes for Cyclami-branded lamps
  • sniffer now accepts any device advertising the FFE1 service UUID OR matching known name prefixes (M1/M2/CYC)
  • sniffer logs all seen BLE devices (name, address, RSSI, service UUIDs) when no lamp is found, for debugging
  • app logs a warning when discovery times out with zero candidates found

1.0.1

  • robust lamp discovery: the BLE scan now also accepts any device advertising the Magicshine service UUID FFE1, so lamps whose advertised name is outside the known M1/M2 prefixes are detected
  • keeps the previous name-prefix matching as a fallback for lamps that do not advertise the service UUID

1.0

  • first release without a Beta label; version code 31 upgrades previous Beta builds
  • replaces the connect-time light blink/OFF sequence with read-only A4/A1 telemetry
  • refreshes battery and temperature every 30 seconds while connected; stale values become unavailable after 90 seconds without a response, checked at each poll
  • observes actual BLE disconnections and allows the app's CONNECT button to retry
  • uses one shared light state for the app and ride field instead of a separate toggle flag
  • releases the BLE connection even if the OFF write fails, with bounded cleanup time
  • cancels polling, flash, and other background jobs when the service is destroyed
  • shortens the ride-field FLASH to two seconds, protects in-flight Bluetooth writes, and starts its timer only after the first flash write
  • adds regression tests for polling, disconnect cleanup, state consistency, and BLE frame integrity

Beta 1.4.1

  • maps the EVO 1700's confirmed A4 values 100, 50, and 30 to truthful HIGH, MID, and LOW battery states
  • colors battery status green, orange, or red in the app and ride field
  • falls back to an unavailable state for unknown EVO 1700 battery values instead of guessing
  • adds the separate Cyclami BLE sniffer and documents the complete full-power discharge capture

Beta 1.4.0

  • expanded the ride field from two to four segments
  • added a five-second FLASH action with automatic restoration of OFF, steady, SOS, or continuous flash state
  • added live light battery percentage to the ride field
  • added compact status, flash, battery, and app icons to the ride field

Beta 1.3.5

  • reconnects through Karoo Bluetooth startup instead of giving up while a ride is active
  • fixes lamp discovery on Karoo by using an unfiltered BLE scan and advertisement names
  • sanitizes Cyclami lamp names before saving them

Beta 1.3.4

  • hardened Karoo extension lifecycle against Appstore service restarts
  • prevented unhandled Karoo binder disconnects during extension shutdown
  • kept the standard Karoo Extensions Library update flow

Beta 1.3.3

  • removed the in-app UPDATE button
  • restored the standard Karoo Extensions Library update flow
  • kept live manifest metadata so Karoo can show its system UPDATE button

Beta 1.3.2

  • added in-app UPDATE button that opens the official Karoo Appstore detail page
  • kept update handoff in Hammerhead Appstore instead of silent installing
  • pointed future update checks at the live GitHub manifest

Beta 1.3.1

  • hardened app CONNECT recovery from stale found / disconnected states
  • added short multi-attempt BLE reconnect after transient GATT failures
  • avoided unnecessary reconnect work when already connected

Beta 1.3

  • reduced BLE scanning and retry churn when the lamp is not nearby
  • added fresh NO LAMP retry from the ride button
  • added fresh CONNECT retry from the app after a no-lamp miss
  • improved ride disconnect and field state handling

Beta 1.2.1

  • hardened ride reconnect after Bluetooth dropouts
  • reduced BLE scan churn in the ride extension
  • improved app and ride button state sync
  • improved disconnected and no-lamp field states

Beta 1.2

  • added ride screen button
  • added lamp selector gate
  • added support for M2-B0 / M2-BO / M1-B0 / M1-BO lamps
  • improved ride auto-connect and disconnect
  • improved app and ride state sync
  • refreshed icon and app metadata

Supported Light Families

The current selector gate looks for BLE names starting with:

  • M2-B0
  • M2-BO
  • M1-B0
  • M1-BO
  • CYC1700 / CYC-1700
  • CYC1600 / CYC-1600
  • CYC (catch-all for other Cyclami CYC-series lamps)

Any device advertising the FFE1 service UUID is also accepted regardless of name. Devices advertising Apple manufacturer ID 0x004C (common in Telink-based Chinese BLE modules used by Cyclami CYC1700 and similar lamps) are also accepted, even without a name or service UUID in the advertisement.

Karoo Flow

  1. Open the app on the Karoo.
  2. Choose the lamp once in the selection gate.
  3. Press CONNECT.
  4. Wait for the connected status; connecting no longer changes the light output.
  5. Choose LOW, HIGH, or OFF.
  6. Use 25, 50, 75, 100, SOS, or FLASH.
  7. Optionally add the Cyclami field to a ride page for quick in-ride control.
  8. Press DISCONNECT when finished.

Current Caveats

  • The current implementation is tuned to the tested light variant, not the full Cyclami product line.
  • EVO 1700 firmware v1 exposes only coarse 100/50/30 battery states over BLE, remaining at 30 until shutdown. The app deliberately presents these as HIGH, MID, and LOW, not exact percentages.
  • The Karoo UI is the primary target; generic phone layouts are not a focus yet.

Diagnostics

  • SRAM/ANT investigation notes live in SRAM_SNIFFER_NOTES.md.
  • The separate diagnostic app lives in sram-sniffer/ and is intentionally decoupled from the Cyclami control app.
  • Cyclami protocol findings and the separate BLE diagnostic app are documented in MAGICSHINE_BLE_SNIFFER_NOTES.md.

License

MIT License

Installation on the Karoo 3

  1. Make sure the Karoo is on firmware 1.538.2049 or higher and connected to Wi-Fi.
  2. Build the APK (./gradlew :app:assembleDebug) or download it from the repo releases.
  3. On your phone, open the APK download link, long-press it and choose Share → Hammerhead Companion.
  4. Tap Install on the Karoo when prompted.
  5. Open the app once, grant Bluetooth permissions, pick your lamp in the selector, press CONNECT.
  6. Optionally add the "Cyclami Controls" field to a ride page for in-ride toggle / flash / battery.

Note: the Cyclami CYC1600 is sold under several brands (Cyclami CYC1600, Magicshine CBL 1600 / EVO 1700). They share the same BLE protocol (service FFE1, characteristic FFE0); the app detects lamps advertising as M2-B0, M2-BO, M1-B0 or M1-BO. If your lamp advertises a different name, open an issue with the name and we will add it.