Linux Kernel Driver
The dvb_usb_gp8psk module is a Linux kernel DVB-USB driver supporting multiple Genpix satellite receiver models. It communicates with the FX2 microcontroller via USB vendor control requests to manage tuning, demodulation, LNB control, DiSEqC switching, and transport stream capture.
Source files: drivers/media/usb/dvb-usb/gp8psk.c, gp8psk.h, gp8psk-fe.c
USB Device Table
Section titled “USB Device Table”| USB ID | Device Name | cold_ids | warm_ids | FW01 Needed? |
|---|---|---|---|---|
v09C0p0200 | Rev.1 Cold | Yes | — | Yes |
v09C0p0201 | Rev.1 Warm | — | Yes | No (FW02 needed) |
v09C0p0202 | Rev.2 | — | Yes | No |
v09C0p0203 | SkyWalker-1 | — | Yes | No |
v09C0p0204 | SkyWalker-1 (alt) | — | Yes | No |
v09C0p0206 | SkyWalker CW3K | — | Yes | No |
Driver Architecture
Section titled “Driver Architecture”The driver consists of three source files:
| File | Purpose |
|---|---|
gp8psk.c | USB device management, firmware loading, power control, vendor command wrappers |
gp8psk.h | Vendor command constants, firmware version thresholds, USB PID definitions |
gp8psk-fe.c | DVB frontend implementation: tuning, signal monitoring, LNB/DiSEqC callbacks |
The driver registers with the DVB-USB framework (dvb_usb_device_properties) which handles:
- USB device enumeration and firmware download (for cold devices)
- DVB adapter and frontend creation
- URB management for bulk transport stream capture
- Power management callbacks
USB Transfer Parameters
Section titled “USB Transfer Parameters”gp8psk_properties { .usb_ctrl = CYPRESS_FX2; .firmware = "dvb-usb-gp8psk-01.fw"; .num_adapters = 1; .generic_bulk_ctrl_endpoint = 0x01; // Streaming: .endpoint = 0x82; // IN bulk .stream = USB_BULK; .count = 7; // URBs .buffersize = 8192; // bytes per URB}The driver allocates 7 URBs of 8192 bytes each (56 KB total) for transport stream reception on endpoint 0x82 (IN bulk). Vendor commands use endpoint 0x01 with a 2000 ms timeout.
Retry Logic
Section titled “Retry Logic”IN operations retry up to 3 times if partial data is received. The command buffer is 80 bytes maximum:
static int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen){ int ret; int try; for (try = 0; try < 3; try++) { ret = usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, USB_TYPE_VENDOR | USB_DIR_IN, value, index, b, blen, 2000); if (ret == blen) break; } return ret;}Complete Vendor Command Map
Section titled “Complete Vendor Command Map”| Cmd | Name | Dir | wValue | wLength | Purpose |
|---|---|---|---|---|---|
0x80 | GET_8PSK_CONFIG | IN | 0x0000 | 1 | Read config status byte |
0x81 | SET_8PSK_CONFIG | OUT | varies | 0 | STALL (not implemented) |
0x83 | I2C_WRITE | OUT | dev_addr | N | Write to BCM4500 via I2C |
0x84 | I2C_READ | IN | dev_addr | N | Read from BCM4500 via I2C |
0x85 | ARM_TRANSFER | OUT | 0/1 | 0 | Start/stop TS streaming |
0x86 | TUNE_8PSK | OUT | 0x0000 | 10 | Send tuning parameters |
0x87 | GET_SIGNAL_STRENGTH | IN | 0x0000 | 6 | Read SNR values |
0x88 | LOAD_BCM4500 | OUT | 1 | 0 | Initiate demod FW download |
0x89 | BOOT_8PSK | IN | 0/1 | 1 | Power on/off demodulator |
0x8A | START_INTERSIL | IN | 0/1 | 1 | Enable/disable LNB supply |
0x8B | SET_LNB_VOLTAGE | OUT | 0/1 | 0 | Set 13V (0) or 18V (1) |
0x8C | SET_22KHZ_TONE | OUT | 0/1 | 0 | Enable/disable 22 kHz tone |
0x8D | SEND_DISEQC | OUT | msg[0] | 3-6 | Send DiSEqC message |
0x8E | SET_DVB_MODE | OUT | 1 | 0 | Enable DVB-S mode |
0x8F | SET_DN_SWITCH | OUT | cmd | 0 | Legacy Dish switch command |
0x90 | GET_SIGNAL_LOCK | IN | 0x0000 | 1 | Read lock status |
0x92 | GET_FW_VERS | IN | 0x0000 | 6 | Read firmware version |
0x94 | USE_EXTRA_VOLT | OUT | 0/1 | 0 | Enable +1V LNB boost |
0x95 | GET_FPGA_VERS | IN | 0x0000 | 1 | Read hardware platform ID |
0x99 | GET_DEMOD_STATUS | IN | 0x0000 | 1 | Read BCM4500 reg 0xF9 (v2.13+) |
0x9A | INIT_DEMOD | OUT | 0x0000 | 0 | Re-init demodulator (v2.13+) |
0x9C | DELAY_COMMAND | OUT | param | 0 | Tuning delay with polling (v2.13+) |
0x9D | CW3K_INIT | OUT | 0/1 | 0 | CW3K model initialization |
Configuration Status Byte
Section titled “Configuration Status Byte”GET_8PSK_CONFIG (0x80) returns a bit-mapped status register:
Bit 0 (0x01): bm8pskStarted - Device booted and runningBit 1 (0x02): bm8pskFW_Loaded - BCM4500 firmware loadedBit 2 (0x04): bmIntersilOn - LNB power supply enabledBit 3 (0x08): bmDVBmode - DVB mode enabledBit 4 (0x10): bm22kHz - 22 kHz tone activeBit 5 (0x20): bmSEL18V - 18V LNB voltage selectedBit 6 (0x40): bmDCtuned - DC offset tuning completeBit 7 (0x80): bmArmed - MPEG-2 stream transfer armedBoot Sequence
Section titled “Boot Sequence”-
Read config (
GET_8PSK_CONFIG 0x80): Check bit 0 (bm8pskStarted) -
Boot device if not started: Send
BOOT_8PSK 0x89withwValue=1, then read firmware version viaGET_FW_VERS 0x92 -
Load BCM4500 firmware if bit 1 not set: Only for Rev.1 Warm (PID
0x0201). SendLOAD_BCM4500 0x88followed by firmware chunks. Skipped for SkyWalker-1 (bit already set from EEPROM boot). -
Enable LNB if bit 2 not set: Send
START_INTERSIL 0x8AwithwValue=1 -
Set DVB mode: Send
SET_DVB_MODE 0x8EwithwValue=1(STALL on some revisions) -
Cancel pending stream: Send
ARM_TRANSFER 0x85withwValue=0 -
Ready for tuning
Tuning Flow
Section titled “Tuning Flow”Bytes 0-3: Symbol Rate (u32 LE, in sps)Bytes 4-7: Frequency (u32 LE, in kHz)Byte 8: Modulation (0-9, see modulation types)Byte 9: FEC Rate (index into firmware FEC table)Modulation Types
Section titled “Modulation Types”| Value | Constant | Mode |
|---|---|---|
| 0 | ADV_MOD_DVB_QPSK | DVB-S QPSK |
| 1 | ADV_MOD_TURBO_QPSK | Turbo QPSK |
| 2 | ADV_MOD_TURBO_8PSK | Turbo 8PSK |
| 3 | ADV_MOD_TURBO_16QAM | Turbo 16QAM |
| 4 | ADV_MOD_DCII_C_QPSK | Digicipher II Combo |
| 5 | ADV_MOD_DCII_I_QPSK | Digicipher II I-stream |
| 6 | ADV_MOD_DCII_Q_QPSK | Digicipher II Q-stream |
| 7 | ADV_MOD_DCII_C_OQPSK | Digicipher II Offset QPSK |
| 8 | ADV_MOD_DSS_QPSK | DSS/DIRECTV QPSK |
| 9 | ADV_MOD_DVB_BPSK | DVB-S BPSK |
Signal Quality
Section titled “Signal Quality”GET_SIGNAL_STRENGTH (0x87) returns 6 bytes:
Bytes 0-1: SNR value (u16 LE, in dBu*256 units)Bytes 2-5: Reserved / diagnosticsSNR scaling in the kernel: snr_value * 17 maps to the 0—65535 range. 100% signal quality corresponds to SNR >= 0x0F00.
Firmware Version Handling
Section titled “Firmware Version Handling”The driver defines two version constants in gp8psk-fe.h:
#define GP8PSK_FW_REV1 0x020604 // v2.06.4#define GP8PSK_FW_REV2 0x020704 // v2.07.4Oldest firmware. No extended commands available.
v2.06.4 baseline. All standard commands operational. Uses GET_SIGNAL_STRENGTH for BER monitoring.
v2.07.4+. Enables additional code paths:
GET_DEMOD_STATUS(0x99) for demod health checkINIT_DEMOD(0x9A) for demod re-initializationDELAY_COMMAND(0x9C) for tuning acquisition delays- Different signal quality calculation
Command Correlation with Firmware
Section titled “Command Correlation with Firmware”Not all vendor commands work on all firmware versions. The STALL behavior varies:
| Command | v2.06 FW | v2.13 FW | Rev.2 FW | Custom v3.01 |
|---|---|---|---|---|
0x80 GET_8PSK_CONFIG | OK | OK | OK | OK |
0x86 TUNE_8PSK | OK | OK | OK | OK |
0x87 GET_SIGNAL_STRENGTH | OK | Changed | OK | OK |
0x88 LOAD_BCM4500 | STALL | STALL | STALL | STALL |
0x99 GET_DEMOD_STATUS | STALL | OK | Proto | N/A |
0x9A INIT_DEMOD | STALL | OK | Proto | N/A |
0x9C DELAY_COMMAND | STALL | OK | N/A | N/A |
Kernel Module Parameters
Section titled “Kernel Module Parameters”The gp8psk module inherits standard DVB-USB parameters:
| Parameter | Default | Description |
|---|---|---|
debug | 0 | Enable debug logging (bitmask) |
force_pid_filter | 0 | Force PID filtering on/off |
generic_bulk_ctrl_endpoint | 0x01 | Control endpoint |
Enable verbose logging with:
modprobe dvb_usb_gp8psk debug=0xffOr at runtime:
echo 0xff > /sys/module/dvb_usb_gp8psk/parameters/debugDVB Frontend Properties
Section titled “DVB Frontend Properties”The gp8psk frontend (gp8psk-fe.c) registers with the following capabilities:
.name = "Genpix 8psk-to-USB2 DVB-S".frequency_min_hz = 800 * MHz.frequency_max_hz = 2250 * MHz.frequency_stepsize_hz = 100 * kHz.symbol_rate_min = 256000 // 256 Ksps.symbol_rate_max = 30000000 // 30 Msps.caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSKRelated Pages
Section titled “Related Pages”- Vendor Commands — Complete command reference
- Kernel FW01 — Firmware format and loading analysis
- DVB-S2 Investigation — Why DVB-S2 cannot be added
- Custom Firmware v3.01 — Open-source replacement with extended commands