What the firmware's protocol headers define, value by value: the requests, constants and wire structs a host app shares with the boards. PROTOCOL.md says how to use them. Every struct is packed and little-endian.
The DB25 and W boards' control interface: protocol.h.
pico-serial vendor protocol: control requests on the "pico-serial control" interface. Shared by the firmware and any host app; see firmware/PROTOCOL.md.
name
value
PS_PROTOCOL_VERSION
1
USB: vendor interface, class 0xFF, subclass/protocol below; requests are vendor-type, recipient interface, wIndex = that interface's number.
Where the UART's baud rate comes from. AUTO: learned from the far end as DCE (a computer typing at its own speed), the host's as DTE (a modem follows the speed it's spoken to at). HOST: always the host's (SET_LINE_CODING). LEARN: always learned. Data bits, parity and stop bits are always the host's.
name
value
PS_BAUD_AUTO
0
PS_BAUD_HOST
1
PS_BAUD_LEARN
2
Modem lines, 1 = asserted (ON). Which are outputs and which inputs depends on the role: as DCE the board drives DCD DSR RI CTS and reads DTR RTS; as DTE it drives DTR RTS and reads DCD DSR RI CTS.
name
value
PS_LINE_DTR
1
PS_LINE_RTS
2
PS_LINE_DCD
4
PS_LINE_DSR
8
PS_LINE_RI
16 (0x10)
PS_LINE_CTS
32 (0x20)
ps_info_t.flags.
name
value
PS_INFO_CODING_ADJUSTED
1
last SET_LINE_CODING asked for something the UART can't do
PS_INFO_BAUD_OVER_RATING
2
baud above the transceivers' 250 kbit/s rating
PS_INFO_FLOW_ACTIVE
4
hardware CTS flow control currently obeyed
PS_INFO_BAUD_LOCKED
8
the baud rate was learned from the far end
PS_INFO_BAUD_LEARNING
16 (0x10)
learning it now (received data waits until it's known)
pico-serial Line, the phone-line stick: line_proto.h.
The phone-line stick's USB protocol (SPEC-L.md §5, firmware/PROTOCOL.md "Line stick"): what the host's driver (D-Modem's dmodemd) and the firmware share. Little-endian, packed.
name
value
LP_VERSION
1
Interface 0: vendor class, this subclass and protocol. Alternate setting 0 has no endpoints (no bandwidth); alternate setting 1 has the three below, and selecting it starts the samples both ways.
name
value
LP_ITF_SUBCLASS
76 (0x4C)
'L'
LP_ITF_PROTOCOL
1
LP_EP_OUT
1
isochronous, 1 ms: the modem's samples to the line
LP_EP_IN
130 (0x82)
isochronous, 1 ms: the line's samples
LP_EP_EVENT
131 (0x83)
interrupt, 1 ms: lp_event_t when something changes
LP_MAX_SAMPLES
20 (0x14)
per packet: 16 kHz (16 a ms) with room to catch up
The wideband stick's USB protocol (SPEC-WB.md §5, firmware/PROTOCOL.md "WB stick"): what the host's driver (D-Modem's dmodemd) and the firmware share. Shaped as the Line stick's (line_proto.h): the same interface layout and endpoints, other requests. Little-endian, packed.
name
value
WP_VERSION
1
WP_BOARD
4
wp_info_t.board: the WB stick (board_config.h PS_BOARD_ID)
Interface 0: vendor class, this subclass and protocol. Alternate setting 0 has no endpoints (no bandwidth); alternate setting 1 has the three below, and selecting it starts the samples both ways.
name
value
WP_ITF_SUBCLASS
87 (0x57)
'W'
WP_ITF_PROTOCOL
1
WP_EP_OUT
1
isochronous, 1 ms: the modem's samples to the line
WP_EP_IN
130 (0x82)
isochronous, 1 ms: the line's samples
WP_EP_EVENT
131 (0x83)
interrupt, 4 ms: wp_event_t when something changes
WP_MAX_SAMPLES
240 (0xF0)
per packet: 192 kHz (192 a ms) with room to catch up