Apply .gitattributes normalization to convert all CRLF line endings inherited from Windows-origin source files to Unix LF. 175 files, zero content changes.
293 lines
9.1 KiB
Text
293 lines
9.1 KiB
Text
---
|
|
title: Tuning Tool
|
|
description: DVB-S tuning, signal monitoring, LNB control, DiSEqC switching, and transport stream capture.
|
|
---
|
|
|
|
import { Tabs, TabItem, Steps, Aside, Badge } from '@astrojs/starlight/components';
|
|
|
|
`tune.py` is the primary user-facing tool for operating the SkyWalker-1 as a satellite receiver. It handles the complete signal chain: powering the demodulator, configuring LNB voltage and tone, sending DiSEqC switch commands, tuning to a transponder, monitoring signal quality, and capturing MPEG-2 transport stream data.
|
|
|
|
```bash
|
|
pip install pyusb
|
|
```
|
|
|
|
## Subcommands
|
|
|
|
| Subcommand | Purpose |
|
|
|------------|---------|
|
|
| `status` | Show device config, firmware version, and signal info |
|
|
| `tune` | Tune to a transponder frequency |
|
|
| `stream` | Capture MPEG-2 transport stream data |
|
|
| `diseqc` | Send DiSEqC switch commands |
|
|
| `lnb` | Control LNB voltage and 22 kHz tone |
|
|
|
|
Running with no subcommand defaults to `status`.
|
|
|
|
## Global Options
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `-v, --verbose` | Show raw USB control transfer traffic |
|
|
| `--json` | Output machine-readable JSON (where supported) |
|
|
|
|
---
|
|
|
|
## status -- Device Information
|
|
|
|
Displays the current device state: firmware version, configuration status flags, signal lock, and SNR.
|
|
|
|
```bash
|
|
sudo python3 tools/tune.py status
|
|
```
|
|
|
|
```
|
|
Genpix SkyWalker-1 Status
|
|
==================================================
|
|
|
|
USB: Bus 1 Addr 12 (VID 0x09C0, PID 0x0203)
|
|
FW: 2.06.4 (built 2007-07-13)
|
|
|
|
Config: 0x07
|
|
[ ON] 8PSK Started
|
|
[ ON] BCM4500 FW Loaded
|
|
[ ON] LNB Power On
|
|
[off] DVB Mode
|
|
[off] 22 kHz Tone
|
|
[off] 18V Selected
|
|
[off] DC Tuned
|
|
[off] Armed (streaming)
|
|
|
|
Signal Lock: LOCKED
|
|
SNR: 8.2 dB (raw 0x0823)
|
|
Quality: [################------------------------] 42.3%
|
|
```
|
|
|
|
Use `--json` for programmatic access to all fields.
|
|
|
|
---
|
|
|
|
## tune -- Transponder Tuning
|
|
|
|
The 8-step tuning sequence: check status, boot demodulator, enable LNB power, set voltage (polarization), set extra voltage, set 22 kHz tone (band), send TUNE_8PSK command, wait for signal lock.
|
|
|
|
### Required Arguments
|
|
|
|
| Argument | Description |
|
|
|----------|-------------|
|
|
| `FREQ` | Transponder downlink frequency in MHz (e.g., `12520`) |
|
|
| `SR` | Symbol rate in ksps (e.g., `27500`) |
|
|
|
|
### Options
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `--pol H/V/L/R` | Polarization: H (horizontal/18V), V (vertical/13V), L (left circular/18V), R (right circular/13V) |
|
|
| `--band low/high` | LNB band: low (tone off, 9750 MHz LO) or high (tone on, 10600 MHz LO) |
|
|
| `--lnb-lo MHZ` | Override LNB local oscillator frequency (default: 9750 low, 10600 high) |
|
|
| `--mod TYPE` | Modulation type (default: `qpsk`) |
|
|
| `--fec RATE` | FEC rate (default: `auto`) |
|
|
| `--timeout SECONDS` | Signal lock timeout (default: `10`) |
|
|
| `--extra-volt` | Enable +1V LNB voltage boost for long cables |
|
|
| `--json` | Output JSON result |
|
|
|
|
### Modulation Types
|
|
|
|
| Name | Description | FEC Group |
|
|
|------|-------------|-----------|
|
|
| `qpsk` | DVB-S QPSK | dvbs |
|
|
| `turbo-qpsk` | Turbo-coded QPSK | turbo |
|
|
| `turbo-8psk` | Turbo-coded 8PSK | turbo |
|
|
| `turbo-16qam` | Turbo-coded 16QAM | turbo-16qam |
|
|
| `dcii-combo` | Digicipher II Combo | dcii |
|
|
| `dcii-i` | Digicipher II I-stream | dcii |
|
|
| `dcii-q` | Digicipher II Q-stream | dcii |
|
|
| `dcii-oqpsk` | Digicipher II Offset QPSK | dcii |
|
|
| `dss` | DSS QPSK | dvbs |
|
|
| `bpsk` | DVB BPSK | dvbs |
|
|
|
|
### FEC Rates by Group
|
|
|
|
| Group | Available Rates |
|
|
|-------|----------------|
|
|
| **dvbs** | `1/2`, `2/3`, `3/4`, `5/6`, `7/8`, `auto`, `none` |
|
|
| **turbo** | `1/2`, `2/3`, `3/4`, `5/6`, `auto` |
|
|
| **turbo-16qam** | `3/4`, `auto` |
|
|
| **dcii** | `1/2`, `2/3`, `6/7`, `3/4`, `5/11`, `1/2+`, `2/3+`, `6/7+`, `3/4+`, `auto` |
|
|
|
|
<Tabs>
|
|
<TabItem label="DVB-S">
|
|
|
|
```bash title="Standard DVB-S QPSK, Ku-band high"
|
|
sudo python3 tools/tune.py tune 12520 27500 --pol H --band high
|
|
```
|
|
|
|
```bash title="DVB-S with explicit FEC"
|
|
sudo python3 tools/tune.py tune 11836 27500 --pol V --band low --fec 3/4
|
|
```
|
|
|
|
```bash title="C-band with custom LNB LO"
|
|
sudo python3 tools/tune.py tune 3960 26667 --pol V --lnb-lo 5150
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem label="Turbo">
|
|
|
|
```bash title="Turbo 8PSK"
|
|
sudo python3 tools/tune.py tune 12224 20000 --pol V --band high --mod turbo-8psk --fec 2/3
|
|
```
|
|
|
|
```bash title="Turbo QPSK with auto FEC"
|
|
sudo python3 tools/tune.py tune 12090 20000 --pol H --band high --mod turbo-qpsk
|
|
```
|
|
|
|
</TabItem>
|
|
<TabItem label="DCII">
|
|
|
|
```bash title="Digicipher II Combo"
|
|
sudo python3 tools/tune.py tune 12224 20000 --pol V --band high --mod dcii-combo --fec auto
|
|
```
|
|
|
|
```bash title="DCII Split I-stream"
|
|
sudo python3 tools/tune.py tune 12224 20000 --pol V --band high --mod dcii-i --fec 6/7
|
|
```
|
|
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
### Tuning Output
|
|
|
|
```
|
|
Tuning SkyWalker-1
|
|
==================================================
|
|
Downlink: 12520 MHz
|
|
LNB LO: 10600 MHz
|
|
IF Frequency: 1920.0 MHz (1920000 kHz)
|
|
Symbol Rate: 27500 ksps (27500000 sps)
|
|
Modulation: DVB-S QPSK (index 0)
|
|
FEC: auto (index 5)
|
|
Polarization: Horizontal (18V)
|
|
Band: high (22kHz on)
|
|
|
|
[1/8] Config status: 0x07
|
|
[2/8] Demodulator already running
|
|
[3/8] LNB power already on
|
|
[4/8] Setting LNB voltage: 18V
|
|
[5/8] Extra voltage: off
|
|
[6/8] 22 kHz tone: ON
|
|
[7/8] Sending TUNE_8PSK...
|
|
[8/8] Waiting for signal lock (timeout 10s)...
|
|
...
|
|
|
|
LOCKED
|
|
SNR: 8.2 dB (raw 0x0823)
|
|
Quality: [################------------------------] 42.3%
|
|
```
|
|
|
|
<Aside type="tip">
|
|
The IF frequency is computed as `downlink - LNB_LO`. It must fall within 950--2150 MHz or the tool will warn. If you see negative IF values, your LNB LO is set higher than the downlink frequency -- check your LNB type.
|
|
</Aside>
|
|
|
|
---
|
|
|
|
## stream -- Transport Stream Capture
|
|
|
|
Captures MPEG-2 transport stream data from EP2 bulk endpoint after the device is tuned and locked. Requires a prior successful `tune` command (signal must be locked).
|
|
|
|
```bash title="Capture to file for 60 seconds"
|
|
sudo python3 tools/tune.py stream -o capture.ts --duration 60
|
|
```
|
|
|
|
```bash title="Pipe directly to VLC"
|
|
sudo python3 tools/tune.py stream --stdout | vlc -
|
|
```
|
|
|
|
```bash title="Pipe to ffmpeg for recording"
|
|
sudo python3 tools/tune.py stream --stdout | ffmpeg -i pipe: -c copy output.mp4
|
|
```
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `-o, --output FILE` | Write TS data to file |
|
|
| `--stdout` | Write TS data to stdout (for piping) |
|
|
| `--duration SECONDS` | Capture duration (default: until Ctrl-C) |
|
|
|
|
The stream status is written to stderr when using `--stdout`, so it does not contaminate the TS data pipe.
|
|
|
|
<Aside type="tip">
|
|
Capture a short sample and analyze it with [ts_analyze.py](/tools/ts-analyzer/) to verify PIDs, check for continuity errors, and identify the programs in the transport stream.
|
|
</Aside>
|
|
|
|
---
|
|
|
|
## diseqc -- Switch Commands
|
|
|
|
Send DiSEqC 1.0 port selection, mini-DiSEqC tone bursts, or raw DiSEqC messages.
|
|
|
|
```bash title="Select DiSEqC 1.0 port 1"
|
|
sudo python3 tools/tune.py diseqc --port 1
|
|
```
|
|
|
|
```bash title="Send tone burst A"
|
|
sudo python3 tools/tune.py diseqc --tone-burst A
|
|
```
|
|
|
|
```bash title="Send raw DiSEqC message"
|
|
sudo python3 tools/tune.py diseqc --raw E0 10 38 F0
|
|
```
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `--port 1-4` | DiSEqC 1.0 committed switch port |
|
|
| `--tone-burst A/B` | Mini-DiSEqC tone burst |
|
|
| `--raw HH HH ...` | Raw DiSEqC bytes in hex (3--6 bytes) |
|
|
|
|
For details on the DiSEqC signaling implementation, see [DiSEqC Protocol](/lnb-diseqc/diseqc-protocol/).
|
|
|
|
---
|
|
|
|
## lnb -- LNB Control
|
|
|
|
Direct control of LNB voltage, 22 kHz tone, and power supply. Running with no flags shows the current LNB state.
|
|
|
|
```bash title="Show LNB status"
|
|
sudo python3 tools/tune.py lnb
|
|
```
|
|
|
|
```bash title="Set voltage and tone"
|
|
sudo python3 tools/tune.py lnb --voltage 18 --tone on
|
|
```
|
|
|
|
```bash title="Power cycle the LNB"
|
|
sudo python3 tools/tune.py lnb --power off
|
|
sudo python3 tools/tune.py lnb --power on
|
|
```
|
|
|
|
| Flag | Description |
|
|
|------|-------------|
|
|
| `--voltage 13/18` | LNB voltage (13V = vertical, 18V = horizontal) |
|
|
| `--tone on/off` | 22 kHz tone (on = high band, off = low band) |
|
|
| `--extra-volt` | Enable +1V boost (13V becomes 14V, 18V becomes 19V) |
|
|
| `--power on/off` | LNB power supply on/off |
|
|
|
|
<Aside type="caution">
|
|
The LNB can supply up to 750 mA non-continuous, but sustained loads should stay below 450 mA to avoid overheating the on-board regulator. Use `--extra-volt` only when needed for long cable runs.
|
|
</Aside>
|
|
|
|
---
|
|
|
|
## Signal Quality Metrics
|
|
|
|
| Metric | Source | Description |
|
|
|--------|--------|-------------|
|
|
| **SNR** | `GET_SIGNAL_STRENGTH` (0x87) | Signal-to-noise ratio in dB, read as 16-bit value (dBu * 256 units) |
|
|
| **Lock** | `GET_SIGNAL_LOCK` (0x90) | BCM4500 register 0xA4, bit 5 indicates signal lock |
|
|
| **Quality %** | Computed | SNR scaled: `snr_raw * 17` maps to 0--100%, saturating at SNR >= `0x0F00` |
|
|
|
|
For details on the signal monitoring protocol, see [Signal Monitoring](/bcm4500/signal-monitoring/).
|
|
|
|
## See Also
|
|
|
|
- [Tuning Protocol](/bcm4500/tuning-protocol/) -- firmware-level TUNE_8PSK command format
|
|
- [LNB Control](/lnb-diseqc/lnb-control/) -- hardware-level voltage and tone control
|
|
- [TS Analyzer](/tools/ts-analyzer/) -- analyze captured transport streams
|
|
- [Vendor Commands](/usb/vendor-commands/) -- complete USB command reference
|