birdcage/docs/g2-nvs-dump.md
Ryan Malloy 6b94f079aa Fix G2 position/RSSI parsers, document motor and DVB test results
Position parser now matches the actual Angle[0]/Angle[1] format
instead of falling back to fragile raw-float extraction. RSSI parser
uses a proper named-group regex matching the real firmware output
format (Reads:<n> RSSI[avg: <v> cur: <v>]) — the old index-based
approach would fail on the actual 5-field response.

Motor test results: both axes move correctly, direction-dependent
overshoot of 0.01-0.06 degrees confirmed. DVB subsystem explored:
BCM4515 Rev B0, firmware v113.37, full command set documented
including DiSEqC 2.x, transponder scanning, and streaming AGC/SNR.
RSSI noise floor is ~500.
2026-02-12 09:34:42 -07:00

300 lines
12 KiB
Markdown

# Carryout G2 NVS Dump
**Firmware:** Version 02.02.48 (Copyright 2013 - Winegard Company)
**Date:** 2026-02-12
**Connection:** DSD TECH SH-U11 USB RS-422 @ 115200 8N1
## NVS Values
```
Num Name Current Saved Default
---- -------------------------- ---------- ---------- ----------
0) Log ID's 0x00000007 0x00000007 0x00000007
1) Log Device 0x00000001 0x00000001 0x00000001
2) Debug 2nd Console Port 0 0 0
3) Debug 2nd Packet Port 0 0 0
4) Debug Port Connection 0 0 0
16) Pitch Deadband 0.00 0.00 0.00
17) Roll Deadband 0.00 0.00 0.00
18) Yaw Deadband 0.00 0.00 0.00
20) Disable Tracker Proc? TRUE TRUE FALSE ← MODIFIED
21) Tracker Proc Run Mode 0 0 0
22) Conical Alpha Az 200 200 200
23) Conical Alpha El 200 200 200
24) Conical Radius 1.00 1.00 1.00
25) Conical Count Max 20 20 20
26) Conical Test Drift +0 +0 +0
27) Circle RPM 120 120 120
28) Circle Pts/Rev 6 6 6
32) Conical Az Clamp 8.00 8.00 8.00
33) Conical El Clamp 8.00 8.00 8.00
35) Motor Pts/Rev 72 72 72
36) Circle Az Radius 1.00 1.00 1.00
37) Circle El Radius 1.00 1.00 1.00
38) Sleep Mode Timer Secs 420 420 420
40) Motor Type 0 0 0
41) Satellite Scan Velocity 55.00 55.00 55.00
48) Motor Spiral Velocity 55.00 55.00 55.00
49) Motor Gear Ratio 0x00000000 0x00000000 0x00000000
63) GPS Heading Threshold 1.00 1.00 1.00
64) GPS Moving Threshold 5.00 MPH 5.00 MPH 5.00 MPH
66) Spiral Signal In A Row Min +3 +3 +3
67) Spiral Signal In A Row Max +20 +20 +20
68) Signal Odd to Even Offset +0 +0 +0
69) Signal Offset 80 80 80
70) Signal Baseline Angle 65.00 65.00 65.00
71) Signal Re-Peak Degrade Percent 25 25 25
72) Gyro Sensitivity +1110 +1110 +1110
73) Gyro Filter Size +1 +1 +1
74) Gyro Calib Readings 100 100 100
75) Gyro Mount Type 1 1 1
76) Gyro Velocity Offset 4 4 4
77) Gyro Max Accel 600 600 600
80) AZ Max Vel 65.00 65.00 65.00
81) AZ Max Accel 400.00 400.00 400.00
82) AZ Home Velocity 55.00 55.00 55.00
83) AZ Steps/Rev 40000 40000 40000
84) AZ Direction +1 +1 +1
85) EL Max Vel 45.00 45.00 45.00
86) EL Max Accel 400.00 400.00 400.00
87) EL Home Velocity 45.00 45.00 45.00
88) EL Steps/Rev 24960 24960 24960
89) EL Direction +1 +1 +1
95) AZ Low current limit 0x0000ff0c 0x0000ff0c 0x0000ff0c
96) AZ High current limit 0x0000ff30 0x0000ff30 0x0000ff30
97) EL Low current limit 0x0000ff0c 0x0000ff0c 0x0000ff0c
98) EL High current limit 0x0000ff40 0x0000ff40 0x0000ff40
101) Minimum Elevation Angle 18.00 18.00 18.00
102) Maximum Elevation Angle 65.00 65.00 65.00
103) Elevation Home Angle 65.00 65.00 65.00
106) Az Stall Detect 78 78 78
107) El Stall Detect 75 75 75
108) Az Stall Samples 100 100 100
109) El Stall Samples 100 100 100
110) EL Home Current Limit 0x0000ff28 0x0000ff28 0x0000ff28
111) AZ Home Current Limit 0x0000ff40 0x0000ff40 0x0000ff40
112) Disable Dipswitch? FALSE FALSE FALSE
113) Dipswitch Value 101 101 101
114) Dipswitch Front/Rear Mount 0 0 0
115) Mount Offset Angle +0 +0 +0
118) Signal Use LNB Clamp FALSE FALSE FALSE
128) AZ PID Kp +600 +600 +600
129) AZ PID Kv +60 +60 +60
130) AZ PID Ki +1 +1 +1
131) EL PID Kp +250 +250 +250
132) EL PID Kv +50 +50 +50
133) EL PID Ki +1 +1 +1
136) AZ PWM Stall Cnt 6 6 6
137) EL PWM Stall Cnt 5 5 5
143) Tracking Number 0 0 0
```
## Key Parameters for Satellite Tracking
| NVS | Name | Value | Notes |
|-----|------|-------|-------|
| 20 | Disable Tracker Proc? | TRUE | Prevents TV satellite search on boot |
| 83 | AZ Steps/Rev | 40000 | Centidegrees per revolution (400.00°) |
| 88 | EL Steps/Rev | 24960 | ~249.60° per revolution |
| 80 | AZ Max Vel | 65.00 | °/s azimuth max velocity |
| 85 | EL Max Vel | 45.00 | °/s elevation max velocity |
| 101 | Min Elevation | 18.00 | Firmware floor (degrees) |
| 102 | Max Elevation | 65.00 | Firmware ceiling (degrees) |
| 103 | EL Home Angle | 65.00 | Where EL homes to on startup |
| 128-133 | PID Gains | varies | AZ/EL motor PID tuning parameters |
## Boot Sequence Observed
```
Version 02.02.48
Copyright 2013 - Winegard Company
Boot Complete
Loc Startup: IDU NOT Present
app_dipswitch:101
Primary Update: 10100
Alternate Update: 11900
Toggle Ability Update: 0
Alternate2 Update: 0
Sat Provider Update: 1
DVB: id:0000, lon:101.00E
Tuner = WIDE
Signal offset = 80
Signal baseline angle = 6500
Signal Re-Peak Pct = 25
NVS Status: 0 Sleep: 420 Dipswitch: 101
Sleep: 420 NVS: 420
NoGpsStartUp: 721
STATIONARY MODE
Enabled LNB ODU 18V
GPS Not Found
```
## Homing Sequence
After boot, the dish homes both motors (EL first, then AZ) using stall detection:
```
MotorHome:1 timeout:2000 ← EL motor homing
Home TwelInch El Velocity: 4500
EL Stall Timeout
El Home Angle: 6500
MotorHome:0 timeout:8000 ← AZ motor homing
Home TwelInch Az
End MotorAzStall:part1
Antenna Facing Front
home:0 wrap_pos:0 wrap_min:-42333 wrap_max:2333
```
## Cable Wrap Limits
From homing output: `wrap_min:-42333 wrap_max:2333`
- In centidegrees: -423.33° to +23.33° from home position
- Total range: 446.66° (~1.24 full rotations)
## Motor Control
### Position Query
In the `MOT>` submenu, `a` returns position with 4-space indentation:
```
a
Angle[0] = 180.00 ← AZ (degrees)
Angle[1] = 45.00 ← EL (degrees)
MOT>
```
### Move Command
`a <id> <deg>` returns a confirmation (no array index) and the prompt immediately
while the motor moves in the background:
```
a 1 46
Angle = 46.00
MOT>
```
### Observed Motor Behavior
| Test | Command | Target | Actual | Overshoot |
|------|---------|--------|--------|-----------|
| EL move out | `a 1 46` | 46.00 | 46.05 | +0.05° |
| AZ move out | `a 0 181` | 181.00 | 181.01 | +0.01° |
| EL return | `a 1 45` | 45.00 | 44.94 | -0.06° |
| AZ return | `a 0 180` | 180.00 | 179.98 | -0.02° |
Direction-dependent overshoot: the motor consistently overshoots in the
direction of travel, undershooting on return. This is classic stepper
backlash + PID settling behavior and is what the leapfrog algorithm
compensates for.
## DVB Subsystem (BCM4515)
### Hardware
```
BCM Hardware= ID: 0x4515 VER: 0xB0
BCM Firmware= MAJOR VER: 0x71 (113) MINOR VER: 0x25 (37)
BCM Strap Config: 0x25018
```
### Channel Parameters (`dis`)
```
Power Mode: ON
Search Transponders: ON
Auto Search Mode: 1
Shuffle Mode: ON
Frequency List: Non-Stacked
Num Parameter Current Default
1 Frequency 1090640 (kHz) 974000 (kHz)
2 Symbol Rate 0 (PeakScanEnabled) 20000 (ksps)
3 Trans_Mod_CRate blind_scan blind_scan
4 Blind Scan Mode ___trb_dvb_dss_____ ___trb_dvb_dss_____
5 LNB Polarity ODU:13V ---
6 LNB Tone (ODU) off off
7 Roll-off 0.35 0.35
8 LPF Cutoff 0 (auto) 0 (MHz)
9 Carrier Offset 0 (kHz) 0 (kHz)
10 FreqSearchRange 5000 (kHz) 5000 (kHz)
11 DCII Mode dcii_qpsk_comb dcii_qpsk_comb
12 Spectral Inv scan scan
13 PScnSymRtRngMin 18000 (ksps) 18000 (ksps)
14 PScnSymRtRngMax 24000 (ksps) 24000 (ksps)
15 SignalDetectMode off off
```
### RSSI Response Format
```
rssi 5
iterations:5 interval(msec):20
Reads:5 RSSI[avg: 500 cur: 500]
DVB>
```
500 is the noise floor (no signal lock, dish pointed at arbitrary sky).
### LNB Voltage
`lnbdc odu` enables LNA at 13V. `lnbv` streams continuous voltage readings:
```
Reads:1 LNB Voltage (mV): 13239 ( ADC value: 119 )
Reads:2 LNB Voltage (mV): 13182 ( ADC value: 118 )
...
```
Stable at ~13.11V (ADC 117). Boot default is 18V; `lnbdc odu` switches to 13V.
13V = vertical polarization, 18V = horizontal polarization on a standard LNB.
### AGC (Streaming)
`agc` streams RF and IF automatic gain control plus SNR/NID:
```
Reads:1 RF_AGC[avg: 1327353088 cur: 1327353088] IF_AGC[avg: 2684354560 cur: 2684354560] SNR: 0.0 NID: FFFF/none
```
- RF_AGC values are raw BCM4515 32-bit register values
- IF_AGC constant at 0xA0000000 (fixed IF gain)
- SNR: 0.0 when no signal lock
- NID: FFFF/none = no DVB network ID detected
### DVB Command Reference
| Command | Type | Description |
|---------|------|-------------|
| `rssi <n>` | One-shot | Average signal strength over n samples |
| `snr` | Unknown | SNR level |
| `agc` | Streaming | RF/IF AGC + SNR + NID (runs until interrupted) |
| `lnbdc odu` | One-shot | Enable LNB in ODU mode (13V) |
| `lnbv` | Streaming | Continuous LNB voltage monitoring |
| `ls` | Unknown | Lock status |
| `qls` | Unknown | Quick lock status |
| `config` | One-shot | BCM hardware/firmware version |
| `dis` | One-shot | Display channel parameters |
| `freqs` | One-shot | Tuner frequency list |
| `diag` | Unknown | Diagnostic data |
| `t <n>` | One-shot | Select transponder |
| `table` | One-shot | Generate transponder table |
| `e <n> <v>` | One-shot | Edit channel parameter |
| `di2*` | One-shot | DiSEqC 2.x LNB commands |
| `send <hex>` | One-shot | Raw DiSEqC packet (max 6 bytes) |
Streaming commands (`agc`, `lnbv`) run until a new command or `q` interrupts them.
## Satellite Configuration
```
DVB: id:0000, lon:101.00E ← DirecTV 101°W (stored as East longitude)
Primary Update: 10100 ← 101.00° in centidegrees
Alternate Update: 11900 ← 119.00°
Sat Provider Update: 1 ← Provider ID
Dipswitch Value: 101 ← DirecTV configuration
```