Commit Graph
55 Commits
Author SHA1 Message Date
Claude 5a005c4d14 SPEC-WB: rates measured on the simulated pair
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:58:37 +00:00
Claude 3cf4e4997e SPEC-WB: transmit level and replica capacitor as built
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:41:19 +00:00
Claude 5e2a81df06 Merge branch 'worktree-agent-a4506ef221c3629cc' into ccr-46ff3724-oyb4hv 2026-10-27 09:39:51 +00:00
Claude 82216f453d firmware docs: the WB stick (PROTOCOL.md, README)
PROTOCOL.md "WB stick": finding it (1209:0003, subclass 0x57, the Line
stick's endpoints and Microsoft OS 2.0 set; 480-byte packets), the
samples (mono S16, the hybrid or the line channel), the requests,
loopbacks, levels, the structures, and the codec's clocks per rate.

README: the board in the build list and layout, a "WB stick" section
(clocks, bring-up, the hybrid's routing, frames, LEDs, tests), and two
findings for the spec: the differential drive on AVDD gives about +3 dBm
for a full-scale sine (+4.8 dBm where it clips), short of SPEC-WB's
+8 dBm, since SLAA557 allows a differential headphone load only on AVDD;
and the A-LDO's 1.77 V is just under the 1.8 V SLAA557 wants for the
0.9 V common mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:39:00 +00:00
Claude bce166e430 wb: wait for the MicPGAs' gain flags too before calling the codec up
SLAA557: the PGA soft-steps from mute after power-up; page 0 register
36 D7/D3 say when it has reached the programmed gain. The bring-up now
waits for them with the ADCs' power flags (200 ms at most), and a test
covers a codec whose MicPGAs never get there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:39:00 +00:00
Claude 6d7a5dcda5 firmware: the wideband stick (PS_BOARD=wb), TLV320AIC3204 over USB
pico-serial WB (SPEC-WB.md): the Line stick's USB device in front of a
TLV320AIC3204 codec at 96 kHz (48 and 192 kHz for tests), USB 1209:0003.

- Clocks (SPEC-WB 4): MCLK is the 12 MHz crystal on GPIO21 (GPOUT0);
  the codec's PLL P=1 R=1 J.D=8.1920 makes 98.304 MHz; NDAC=NADC=
  MDAC=MADC=4; 96 kHz: DOSR=AOSR=64, PRB_P7/PRB_R7, BCLK N=4 (6.144
  MHz, 64 a frame); 192 kHz: 32, PRB_P17/PRB_R13, N=2; 48 kHz: 128,
  PRB_P1/PRB_R1, N=8. The codec is the I2S master, 32-bit words.
- Bring-up (src/core/wb_codec.c) in SLAA557's order: pin and software
  reset, PLL, dividers, I2S, INT1 on MFP5, weak AVDD off then the A-LDO
  at 1.77 V, CM 0.9 V, the left DAC's + and - to HPL and HPR (one DAC,
  a differential drive), drivers up and their gain flags waited for,
  then the DAC and both ADCs, their flags waited for.
- The hybrid in the left MicPGA: + IN1L, IN1R; - IN2R, IN3R; 10 k each
  (P1 R52=0x41, R54=0x14): line minus replica. The right MicPGA takes
  the line alone (IN2R - IN1L, 20 k); the replica alone can't be routed
  differentially.
- I2S slave in PIO (src/wb/i2s.pio), full duplex, DMA ping-pong blocks of
  32 frames into src/core/wb_audio.c; out of step, it stops and is
  restarted (counted).
- Requests (src/core/wb_proto.h): info, status (peaks, codec flags),
  rate, carrier LED, TX gain (DAC volume), RX gain (MicPGA), input
  channel, firmware and codec loopbacks, codec register read/write by
  page, reset, UF2. Mono S16 packets up to 240 samples (480 bytes).
- test_wb.c: the clocks re-derived from the registers and checked
  against SLAA557's limits for every rate, the MicPGA bits against the
  netlist, the bring-up order and timeouts, packet sizing, the samples
  path, the requests. Each of 15 deliberate breaks is caught.
- CI builds PS_BOARD=wb and runs test_wb.

All five boards build (SDK 2.3.1, TinyUSB 0.21.0); host tests and
check_docs pass. Nothing has run on a WB board yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:37:55 +00:00
Claude 7a0136ee52 firmware: share the sticks' USB device and sample streams
Ahead of the wideband stick, which needs the same USB device and the
same sample streams as the Line stick:
- src/core/sstream.c: the two sample streams (head start, under- and
  overruns, counters), out of daa_frame.c; line_stream_t is now the
  frames plus an sstream_t.
- src/stick/usb_stick.c (was src/line/usb_line.c): descriptors, class
  driver and Microsoft OS 2.0 set, with the stick's numbers and requests
  behind stick.h; the Line stick's part is src/line/line_stick.c. The
  descriptors are the same bytes as before.
- sfifo.h: SFIFO_SIZE can be set per build.

Line builds; host tests (test_line unchanged but for field paths) and
check_docs pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:22:05 +00:00
Claude 8114a23eef wb: PCB placement and rules, shell variant
build_pcb.py --variant wb: the Line stick's USB end, the transformer
across a 4 mm isolation gap, codec and hybrid behind it; ground vias in
the codec's exposed pad. stick.py --variant wb: LINK/DATA labels and
the transformer in the collision check (out-wb/).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:15:45 +00:00
Claude d3c7166a9a schematic: wb variant (TLV320AIC3204, PE-65848 footprint and symbol)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:07:45 +00:00
Claude 4b5451a195 netlist: wb variant, the wideband bare-pair stick (SPEC-WB)
TLV320AIC3204 codec (I2S on GP2-5, I2C1 on GP6/7, MCLK on GP21),
headphone drive through 60.4 R into a Pulse PE-65848 transformer,
a x10 replica arm subtracted in the codec's mixer, 0.5 uF/500 V DC
block in the split line winding, sidactor and TeleLink fuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:05:45 +00:00
Claude c0405e1d41 SPEC-WB: verified parts; run at 96 kHz (codec ADC passband 37 kHz)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 09:00:31 +00:00
Claude 50250a91fb SPEC-WB: draft spec for the wideband bare-pair stick
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-27 08:55:42 +00:00
Claude 3e1b87be7e Line stick: routed PCB, fab files, renders; CI checks its DRC
Fully routed: DRC 0 errors, 0 unconnected, matches its schematic (the
2.5 mm isolation rule included). Gerbers and the JLC placement file in
fab/; the two Skyworks chips and the RJ11 are hand-fitted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 15:52:07 +00:00
Claude 7dc31c070e Line stick: R2 (150R) beside Q5, whose base it drives
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 15:31:46 +00:00
Claude 1d38702fc0 build_pcb: the finisher may use In1 where the Line board has no plane (the line side)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 14:59:11 +00:00
Claude 106d416457 Merge remote-tracking branch 'origin/ccr-46ff3724-oyb4hv' into ccr-46ff3724-oyb4hv 2026-10-22 14:44:30 +00:00
Claude 71f76c5e9e Line stick: Microsoft OS 2.0 descriptors, so Windows binds WinUSB itself
The stick is now USB 2.1 with a BOS descriptor whose Microsoft OS 2.0
platform capability names vendor request 0x4D (LP_REQ_MS_OS_20). Windows
reads the descriptor set with it (device, IN, wIndex 7). The set gives
both interfaces the compatible ID WINUSB and a DeviceInterfaceGUID:
- the line interface gets D-Modem's {0463C853-BB62-4057-9E76-D14B0E3ACAFD},
  the GUID its dmodem-usb.inf uses;
- the reset interface gets the Pico SDK's, so picotool works too.

dmodemd --usb (libusb) and picotool then work on Windows with no INF and
no Zadig.

Checked: the line firmware builds (SDK 2.3.1, TinyUSB 0.21.0), the BOS and
descriptor set parse as expected from the built ELF, host tests and
check_docs pass. Not yet tried on a real Windows host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mJrc5ZMECC5SzurFsvyAn
2026-10-22 14:44:21 +00:00
Claude 47246565f0 Line stick: Si3018 turned so C1B/C2B face the barrier caps; caps beside their pins
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 14:25:41 +00:00
Claude 665511a995 build_pcb: rip-up records copy coordinates (KiCad's vectors are views into the object)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 14:19:20 +00:00
Claude 51c07ef9b2 build_pcb: finisher fixes found on the Line board
- Clearance to another net is the larger of the two nets' classes, as in
  KiCad's DRC (it used the routed net's own: 0.25 mm next to TIP/RING).
- A failed rip-up restores every track as it was before it, rebuilt from
  a record: undoing one level re-added its own ripped tracks over routes a
  deeper level had made (shorts), and re-adding removed objects across
  nested levels crashed KiCad's Python binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 13:49:06 +00:00
Claude ee10072d21 Line stick: project file with the new net classes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 12:38:43 +00:00
Claude 2f74787777 Line stick: line-voltage net class; the finisher keeps out of rule areas
The finishing router ignored rule areas: on the Line board it ran tracks
through the isolation gap and a screw's keep-out. It now treats every
no-track / no-via rule area as blocked (the hood and W boards had none of
their tracks there).

TIP, RING and the bridge's + (now LINE_*) keep 0.4 mm clearance; the
Si3018's low-voltage side (LS_*) gets 0.25 mm, so the line side can route.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 12:38:28 +00:00
Claude 996421f216 Merge branch 'worktree-agent-a9de85d7e2a44121e' into ccr-46ff3724-oyb4hv 2026-10-22 11:24:16 +00:00
Claude 5f7698895c firmware: phone-line stick (PS_BOARD=line), Si3056 DAA over USB
pico-serial Line's firmware: a USB front end for its Si3056 + Si3018 DAA,
the modem itself being D-Modem on the host (SPEC-L.md).

- Si3056 bring-up: 48 MHz MCLK from the USB PLL on GPIO21, reset in
  serial mode 0, PLL1 N = 125 / M = 256, 9600 Hz, 16-bit mode, line side
  powered up; FDT checked.
- si3056.pio: the RP2040 as the serial port's slave; every word through
  the portable frame engine (daa_frame.c) from the PIO's interrupt.
  Register accesses ride in secondary frames (LSB flag, then FC pin).
- USB: one vendor interface shaped like the SmartUSB56's (alt 1:
  isochronous OUT/IN at 1 ms, IN lengths set by the codec's clock, and an
  interrupt endpoint for events), vendor requests for rate, hook, flash,
  line monitor, register access, status, reset, UF2; 1209:0002.
- Host tests (test_line.c): the frame engine against a model of the
  Si3056's serial port, the sample streams, the device logic; mutations
  of the frame engine are caught. PROTOCOL.md "Line stick" documents it
  for the host's driver; CI builds it.

Not yet run on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 11:23:50 +00:00
Claude ab02fd9b8b docs: the Line stick in the hardware and enclosure READMEs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 11:19:59 +00:00
Claude fca0170315 Line stick: 3D-printed shell and PCB placement
enclosure/stick.py makes the 82 x 24 x 20 mm stick: RJ11 flush with one
end, USB-C in an overmould opening at the other, two LED light tubes, one
M2 screw on the USB side of the isolation gap; it checks the fit and
writes the board outline and placement.

build_pcb.py --variant line places the board on that outline: the line
side (no planes) toward the RJ11, a 2.5 mm isolation gap that only the four
Y2 capacitors cross, the Si3056 and the RP2040 core toward USB-C. A DRU rule
holds 2.5 mm between line and USB-side copper. Fanout vias now respect
every no-via rule area (unchanged for the hood and W boards).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 11:19:26 +00:00
Claude 9316d5e60f Line stick: spec, netlist and schematic (Si3056 + Si3018 DAA)
pico-serial Line, a USB-C phone-line stick shaped like Apple's USB Modem:
a softmodem whose modem is D-Modem-RE on the host. SPEC-L.md covers the
architecture, the DAA (Si3056 for 9600 Hz sampling, so D-Modem's V.90
works), the USB interface, mechanics and compliance.

build_netlist.py and build_schematic.py take --variant line: the Si3056
datasheet's typical application (Figure 17) with a 1.25 A telecom fuse,
parts checked against JLCPCB stock. New footprints for the RJ11 and the
fuse; the symbol cache now keeps every board's symbols. ERC clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-22 11:04:45 +00:00
Claude bada4f832b firmware: document every RP2040, USB and Bluetooth function
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 21:16:34 +00:00
Claude f47d285163 firmware: document every test and test helper
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 21:16:05 +00:00
Claude 046b2a722f firmware: document every core function; add a check for it
tools/check_docs.py lists functions with no comment (public ones count
as documented by their header prototype); CI runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 21:14:17 +00:00
Claude 8180f4850e hardware: route pico-serial W; fab files and renders
Fully routed (Freerouting at 50 passes, then the finisher): DRC 0
violations, 0 unconnected, matches its schematic; ERC clean. No copper in
the antenna keep-out. Gerbers and the JLC placement file in fab/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 12:00:35 +00:00
Claude 2f2d321611 docs: pico-serial W board in the hardware README; SPEC-W next steps
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 11:35:27 +00:00
Claude c3f3c6dd81 hardware: finisher treats oval pads as stadiums, not rectangles
A link started at a rectangle's corner, off the oval's copper, and never
counted as connected (the W board's USB-C shield legs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 11:34:59 +00:00
Claude ff1225a16b Merge branch 'worktree-agent-a368972070f3c05aa' into ccr-46ff3724-oyb4hv 2026-10-18 10:53:54 +00:00
Claude cddb085d4e firmware: Bluetooth for pico-serial W (BLE NUS, SPP, pairing)
PS_BOARD=w builds for the W board: the RM2 wired as on Pico W, with
BTstack polled from the main loop.

- Classic SPP server ("pico-serial", RFCOMM 1) with credit-based flow
  control; LE Nordic UART Service plus the pico-serial control service
  (line coding, outputs, inputs, mode, break, flow, credits, info).
- Port ownership (SPEC-W 4.6) in a new portable links layer
  (src/core/link.c): USB with its port open, else the first wireless
  link, else USB. The wired boards behave as before.
- Over SPP, DCD follows the phone's CONNECT / NO CARRIER.
- Pairing only in a 2-minute window (at power-up with no bonds, PAIR
  button, or a new USB request); hold PAIR 10 s to forget. Up to 4 bonds
  in flash, below the settings sector. Just Works with LE Secure
  Connections / SSP; data and control need an encrypted link.
- BT LED shows advertising, the pairing window or a connection; RD/SD go
  to the RM2's GPIOs.
- Host tests for the links layer; CI builds the W image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 10:53:28 +00:00
Claude 8f5d5d39a0 hardware: M2 screw-hole footprint for the W board; footprint script renamed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 10:52:08 +00:00
Claude 8408842086 hardware: W board placement, keep-outs and CI checks
build_pcb.py takes --variant w: the outline, RM2, USB-C, LEDs, pairing
button and screw holes come from the printed hood's script; the antenna
keep-out has no copper on any layer. The front half is placed as on the
hood board. CI now checks both boards. Routing follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 10:46:18 +00:00
Claude 1bb455684a hardware: W variant netlist and schematic (RM2 Bluetooth)
build_netlist.py and build_schematic.py take --variant w: the RM2 wired
as on Pico W (GP23-25, GP29), fitted LEDs (two on the RM2's GPIOs), VBUS
sense on RM2 GPIO0 and a pairing button on GP28. Adds the RM2 symbol and
a footprint generated from the datasheet's Figure 6, and the W pin header
for the firmware. The design date is now fixed, so regenerating on a
later day leaves the files unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 10:39:15 +00:00
Claude 5337ab65f0 hardware: lay out and route the 4-layer PCB
build_pcb.py builds the board from the schematic: outline, JLC rules,
net classes, placement on both sides, GND/+3V3 fanout, Freerouting 1.9
plus a rip-up finisher, then pours. DRC, ERC and schematic parity are
clean. Adds Gerbers, drill and JLC placement files, renders, docs, and a
CI workflow that checks ERC, DRC and parity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 09:54:09 +00:00
Claude 51b150a77e Hardware: route the PCB; DRC clean, matches the schematic
- Routed with Freerouting 1.9 (rounds, each from the last) plus a small
  A* grid router in build_pcb.py for what it leaves; deterministic, and
  it tries a few pass counts if one leaves anything.
- In1.Cu solid GND; In2.Cu signals then a +3V3 pour; GND pours top and
  bottom. Every GND/+3V3 pad has its own via (U1's +3V3 inward, under
  the package); USB-C D+/D- corridor kept clear of vias.
- Net names come from KiCad's own export of the schematic, so DRC's
  schematic parity check passes; DNP/BOM flags match the symbols.
- Edge keep-out band (Freerouting ignores KiCad's edge clearance) and
  keep-outs around the USB-C's plastic pegs.
- Placement tweaks for routability; test pads moved behind the flash;
  licence and Source Location on the silkscreen.
- kicad-cli DRC (KiCad 9.0.9, 9.0 libraries): 0 violations, 0
  unconnected, 0 parity issues. ERC: 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 08:34:22 +00:00
Claude 581219cafa Hardware: start the PCB (placed, not yet routed)
- hardware/schematic -> hardware/kicad, so the schematic and PCB are one
  KiCad project.
- kicad/build_pcb.py lays out the board from the netlist script with
  KiCad 9's Python module: outline (SPEC 7.2, inferred), JLC 4-layer
  rules and net classes, footprints linked to their schematic symbols,
  placement on both sides, a GND plane on In1, a via for every GND and
  +3V3 pad, silkscreen (licence and Source Location), and optional
  autorouting with Freerouting and fab outputs.
- kicad/pico-serial.kicad_dru: edge rules for the DB25 cups and USB-C.
- The committed board is placed but unrouted; routing comes next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 06:07:04 +00:00
Claude d5f9e0bd2d Auto-baud: don't lock on a single character
A rate too fast can split one character (a lone CR, as Enter sends on
many terminals) into two "characters", which passed the 2-character
rule: a lone CR locked onto the wrong rate in 80% of trials. Now the
rate is chosen first, and the 2 characters are counted only at that
rate, so one character waits.

Tests: one-character cases (CR, LF, 0x55, 0xFF...) at every rate must
not decide; CR LF and CR CR must lock and decode at every rate. Docs
note that Enter (CR LF), or Enter twice on a CR-only terminal, is
enough to learn the rate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 01:36:52 +00:00
Claude d18fcbcca7 Firmware: learn the far end's baud rate (auto-baud)
As DCE the board now works out the computer's baud rate from what it
types, like a Hayes modem, so the host's speed setting doesn't have to
match the terminal's.

- PIO (autobaud.pio) times each low/high stretch on the RX pin while the
  UART keeps the pin.
- src/core/autobaud.c decodes those timings at every standard rate
  (110-230400) and picks the one they fit: bit length vs the shortest
  stretch, edges on bit boundaries, framing/parity, then the slowest rate
  whose edges score near the best.
- The characters it learned from ("AT") are decoded and passed on; the
  UART switches only once the line is idle.
- Re-learns on 3 framing errors in 2 s, AUTOBAUD_RESTART, or a new peer.
- Baud mode setting (saved, settings byte 7): auto (learn as DCE, host's
  as DTE), host, learn. Vendor requests 8 SET_BAUD_MODE and
  9 AUTOBAUD_RESTART; GET_INFO grows to 14 bytes with flags
  BAUD_LOCKED/BAUD_LEARNING and the baud mode.
- Tests: detector suite (every rate, 5 formats, jitter, rate error,
  glitches, mid-character starts), 5 new core tests, and the emulator
  test drives "AT\r" at 9600 and "ATI3\r" at 115200 onto GP1 with PIO
  stepped per CPU cycle.
- Docs: firmware README, PROTOCOL.md, SPEC.md 5.7 and 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 01:18:45 +00:00
Claude 3de517fbdb Licensing: hardware under CERN-OHL-S-2.0 or a commercial licence
- hardware/LICENSE: CERN-OHL-S-2.0 text (SPDX license-list-data)
- SPDX lines on the hardware scripts and specs, and in the generated
  NETLIST.md and placement.md; the schematic's title block names the
  licence and the Source Location
- Notice under section 4: products display the Source Location; the hood
  has github.com/Neo-Desktop/pico-serial and CERN-OHL-S-2.0 debossed
  underneath, and SPEC.md asks for both on the silkscreen
- LICENSING.md: hardware section, Source Location, what's covered, the
  KiCad library exception, Available Components; notes the repository
  must be public before products are shared

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 00:42:01 +00:00
Claude 886d6742d9 Licensing: firmware under AGPL-3.0-only or a commercial licence
Same arrangement as the rest of D-Modem: LICENSING.md, the AGPL text in
firmware/COPYING, and an SPDX-License-Identifier line in every firmware
source file (and the generated pin header, via build_netlist.py). Notes
the third-party parts (Pico SDK, picotool, TinyUSB, rp2040js, the boot
ROM, KiCad symbols). The hardware's licence is not yet decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-18 00:37:17 +00:00
Claude d61e37ba5e Firmware v0.1: USB CDC to RS-232 with DCE/DTE auto-detect
firmware/: Pico SDK 2.3.1 + TinyUSB 0.21.0 (for CDC SERIAL_STATE).
- portable core (src/core): role detection from chip A STATUS / chip B
  INVALID with both chips off (3 x 50 ms samples, 1 s loss), modem-line
  mapping (DCE: host DTR -> DCD+DSR, RTS -> CTS; DTE: DTR/RTS through),
  hold-off at 3/4 buffer, FLOW_AUTO latch for 3-wire cables, SERIAL_STATE
  with one-shot error events, line coding with flagged adjustments,
  timed break, settings in flash with CRC
- RP2040 layer: GPIO with the transceivers' inversion, UART with IRQs and
  per-byte error flags, UART pins routed to the active chip, flash
  settings, watchdog; USB composite: CDC, the pico-serial control vendor
  interface (PROTOCOL.md) and Raspberry Pi's reset interface (picotool)
- GPIO numbers generated from the netlist (build_netlist.py now writes
  firmware/src/generated/board_pins.h)
- boards: hood (16 MB flash, crystal margin) and a Pico bench rig

Tests: 22 host tests on the core with a fake HAL (sanitizers; checked by
breaking the core on purpose), and an end-to-end test that boots the real
image in rp2040js: enumeration, detection, line mapping, data both ways,
SERIAL_STATE, vendor requests, DTE mode (20 checks). CI workflow runs
both plus builds for both boards. Not yet run on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-17 19:15:50 +00:00
Claude 4067182a3f W hood: 3D-printed DB25 hood, board outline and fit checks
hardware/enclosure/w_hood.py (CadQuery) models a two-piece printed hood
(61 x 56 x 15 mm) for the wireless board: DB25 flange captured in a slot,
captive Keystone 2400 thumbscrews in finger pockets (4.5 mm engagement),
three M2 self-tapping screws through the board, RM2 at the rear corner
with its 35.5 x 18.5 mm keep-out in air inside the hood, USB-C beside it,
LED light tubes and a pairing pinhole on top. Writes STEP/STL for
printing, an assembly STEP, the board outline and keep-out as DXF, and
placement rules for the layout; refuses on any collision, metal in the
keep-out or short thumbscrew engagement (checked by planting faults).

SPEC-W: the printed hood is the chosen enclosure (section 2.2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-17 18:46:41 +00:00
Claude af99185f0f SPEC-W: enclosure order, avoiding a 3D-printed case
Try the hood with a Pico W range test first, then a DB25-to-RJ45 modular
adapter housing (L-com RBA258F or similar), then a Hammond 1551KBK with a
cut-out; 3D printing only if all fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-17 18:29:27 +00:00
Claude 8caa62c535 Spec: wireless variant (BLE for iPhone, SPP for Android)
SPEC-W.md: Raspberry Pi RM2 (CYW43439) wired exactly like a Pico W so the
SDK's defaults work; its 35.5 x 18.5 mm antenna keep-out doesn't fit a
DB25 hood, so a separate small-case board is proposed. BLE Nordic UART
Service for data (generic iOS apps work, no MFi), a control service for
modem lines/line coding/mode, optional L2CAP channel; classic SPP server
so dmodem-android's existing Bluetooth client mode works unchanged, with
DCD-from-result-codes for Android's missing modem lines; pairing window,
bonding, LE Secure Connections; USB > first wireless link port ownership.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-17 18:21:38 +00:00
Claude c4e745fed9 Schematic: generated from the netlist script, checked against it
hardware/schematic/build_schematic.py draws pico-serial.kicad_sch (KiCad 9
format, one A2 sheet) from hardware/netlist/build_netlist.py: parts
grouped into blocks by function, each pin a short wire to a net label or
power symbol, no-connect flags on unused pins, PWR_FLAGs on GND and VBUS.
It refuses to write unless the connectivity read back from the drawing
matches the netlist exactly and nothing overlaps. The SP3238E and
MAX3243E get their own symbol library (KiCad has neither); other
symbols are cached from kicad-symbols 9.0 so it runs offline.

The netlist now targets KiCad 9.0 libraries: pin names as KiCad 9 has
them (SWD, VREG_IN, GPIO26_ADC0 ...) and the USB-C shield pin S1; it is
checked against kicad-symbols and kicad-footprints 9.0.6. Pin numbers and
nets are unchanged.

Not yet opened in KiCad (not available here); parses with kiutils.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
2026-10-17 09:38:25 +00:00