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
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
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
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
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
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
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
- 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
- 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
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
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
- 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
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
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
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
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
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
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
hardware/netlist/build_netlist.py defines every part and connection
(SPEC 0.3) and writes a KiCad netlist, a readable net list and a JLC
parts list with LCSC numbers. It refuses to write if a pin is left
unaccounted for, a net has one pin or two outputs, an RS-232 line lacks
one driver and one receiver, or a power pin is off a supply; with KiCad
library checkouts it also checks pin names/numbers against KiCad's
symbols and pads against the footprints. The two RS-232 chips' pin
tables come from their datasheets (KiCad has no symbols for them).
81 parts (69 fitted, 6 LEDs + resistors DNP), 82 nets. Adds a 10k RUN
pull-up. Not yet imported into KiCad (not available here).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
- DCE transceiver: MaxLinear SP3238EEA-L/TR (the only 5T/3R with real
LCSC stock); its STATUS works in shutdown, so auto-detect reads each
chip's status output; TI TRS3238E from DigiKey as the fallback if its
off-state leakage disappoints
- DTE: TI MAX3243EIDBR; USB-C: HRO TYPE-C-31-M-12
- DB25 MHDB25SS solder cup and MHDPPK25-K hood from LCSC (qty 1),
hand-fitted; DigiKey parts kept as backups
- LCSC part numbers and stock for every line; samples to buy first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
- both roles on one female DB25: a TRS3238E (DCE) and a MAX3243E (DTE)
on the same pins, one powered at a time, the role auto-detected from
what's attached (ROUT1B / INVALID still work in shutdown); DTE through
a male-male gender changer
- parts checked stocked and buyable at qty 1 (DigiKey/LCSC), with second
sources and the parts avoided and why
- solder-cup DB25 straddling the board, Adam Tech hood, target outline
- LEDs optional, not fitted by default
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8
Draft spec for a bare-RP2040 board (no Pico module): parts, RP2040
support circuit, USB-C, MAX3238E DCE wiring and DB25 pinout, firmware
signal mapping, dmodem-android compatibility, layout, open questions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PRsUCpxazyipPn5UGGkF8