open-merou

Open Mérou, a free iOS app for the Oceanic+ underwater iPhone housing
git clone https://git.schurger.org/open-merou.git
Log | Files | Refs | README | LICENSE

PROTOCOL.md (4921B)


      1 # BLE protocol of the Oceanic+ housing (reverse-engineered)
      2 
      3 Source: iOS HCI capture (sysdiagnose) of 2026-11-13, official app in its free version,
      4 iPhone iOS 24B119. Decoding: `tools/pklg.py`. The times in the log are shifted by -5 h
      5 from local time (07:55 in the log = 12:55 on the clock).
      6 
      7 Nothing is encrypted at the application level: raw, little-endian values.
      8 
      9 ## Identity (nRF Connect, 2026-11-13)
     10 
     11 - Advertised name: `HUISH`, connectable. Nordic chip (nRF5 SDK), DFU available.
     12 - Manufacturer data: Nordic (0x0059) `D0B4 AF9F 7FAA`.
     13 - Standard services: 1800, 1801, Battery 180F (2A19 = handle 0x0016), Device Information 180A
     14   (2A29 manufacturer, 2A24 model, 2A25 serial number, 2A27 hardware revision…).
     15 - **Nordic LED Button Service** (the SDK's "Blinky" sample) `00001523-1212-EFDE-1523-785FEABCD123`:
     16   - `00001524-…` Button State (read, notify) = handle 0x0010, button codes below;
     17   - `00001525-…` LED State (read, write): role unknown, not used in the capture.
     18 - Custom service `00001623-1212-EFDE-1523-785FEABCD123` (characteristics 1624 to 1629, see the table).
     19 - Secure DFU `FE59`, characteristic Buttonless DFU Without Bonds `8EC90003-F315-4F60-9F…`.
     20   **Never write to it**: the housing would switch to update mode.
     21 
     22 Common base of the UUIDs: `0000XXXX-1212-EFDE-1523-785FEABCD123`.
     23 
     24 ## Observed characteristics (by ATT handle; UUIDs to be confirmed)
     25 
     26 | Handle | UUID (XXXX) | Properties | Format | Role |
     27 |---|---|---|---|---|
     28 | 0x0010 | 1524 (service 1523) | read, notify | 1 byte | **Button**: high nibble = button, low nibble = 0 short / 1 long |
     29 | 0x0013 | 1525 (service 1523) | read, write | ? | "LED" of the Nordic sample, not used by the app |
     30 | 0x0016 | 2A19 (180F) | read, notify | 1 byte | **Battery** (%): 92→88 while pumping |
     31 | 0x0027 | 1624 (service 1623) | read, write | 1 byte | **Pump**: `01` = start, `00` = stop |
     32 | 0x0029 | 1625 | read, notify (~3 Hz) | uint32 | Assumption: **external pressure** (depth gauge) in daPa: 9940 = 99.4 kPa in air |
     33 | 0x002C | 1626 | read, notify (~3 Hz) | int32 | Internal **temperature**, hundredths of °C (2100 = 21.00 °C) |
     34 | 0x002F | 1627 | read, notify (~3 Hz) | uint32 | Absolute internal **pressure**, Pa (100,960 = 1009.6 hPa) |
     35 | 0x0032 | 1628 | read, notify | 1 byte | Unknown, `00` at rest, never notified (water alarm?) |
     36 | 0x0035 | 1629 | read, notify | 1 byte | **Pump state**: `01` = running, `02` = stopped |
     37 
     38 Handle ↔ UUID mapping **confirmed** by the nRF Connect discovery log (13:18):
     39 1523 (2 characteristics), 180F, 180A with 6 characteristics (2A29, 2A24, 2A25, 2A27, 2A26, 2A28),
     40 1623 = 0x0025 (1624 without descriptor, 1625–1629 with CCCD, 3 handles each), FE59. Each observed
     41 handle falls exactly on the value of the expected characteristic.
     42 
     43 ### Buttons (0x0010)
     44 
     45 | Value | Button |
     46 |---|---|
     47 | 0x10 | left |
     48 | 0x20 | shutter |
     49 | 0x30 | right |
     50 | 0x40 | up |
     51 | 0x50 | down |
     52 | 0x_1 | long press (2 s), e.g. 0x31 = right long |
     53 
     54 The housing only reports the presses: all the behaviour (photo, menus, pump) is in the app.
     55 
     56 ## Observed vacuum cycle
     57 
     58 1. 12:55:02 right press (0x30) → the app writes `01` to 0x0027 → 0x0035 = `01`.
     59 2. Pressure: 100.96 kPa → 79.57 kPa in 10 s (≈ 2 kPa/s); 0x0016: 92 → 88.
     60 3. 12:55:12 the app writes `00` to 0x0027 (P = 79,574 Pa, first sample < 80,000 Pa,
     61    or a 10 s timeout: to be settled) → 0x0035 = `02`.
     62 4. 3 min leak test done **by the app** on the pressure: 79.57 → 80.01 kPa in 4 min,
     63    while the temperature rises from 21.2 to 22.2 °C (the gas law explains ~+280 Pa out of +434).
     64 5. Opening (app side, guided): long press right (0x31) = start the opening sequence,
     65    then right presses (0x30) = step confirmations (open the plug, purge, close the plug).
     66    12:59:40 back to 99.3 kPa when the plug is open: mechanical venting, no BLE write.
     67 6. Power-off: no BLE order. The housing only turns off on a long press right **once disconnected**;
     68    while connected, the long press is only notified (0x31). The official app therefore drops the connection
     69    (HCI 0x16) at the end of the sequence, then the user does the long press.
     70 
     71 ## Validated on the housing with Open Mérou 0.2 (2026-11-13)
     72 
     73 - Buttons detected; 1627 = internal pressure; writing 01/00 to 1624 = pump, the pressure
     74   drops with the housing closed.
     75 - **The plug must be open before starting the pump** (Jean's instruction, as in the official app).
     76 
     77 ## Validated on the iPhone 18 Pro (2026-11-13)
     78 
     79 - Preview upright in landscape with the default orientation ("Landscape"); lenses 0.5× 1× 2× 4× 8× offered.
     80 
     81 ## To do
     82 
     83 - nRF Connect read of 2026-11-13 13:2x, housing in air: 1625 = 9940, 1626 = 23.64 °C,
     84   1627 = 99,869 Pa, 1628 = `00`.
     85 - Read the Device Information strings (firmware version).
     86 - 1625 = external pressure? (value underwater, or when pressing on the sensor).
     87 - Pump stop threshold (pressure or timeout): second capture.
     88 - What happens at power-off (long press right).