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