# README # If anyone has access to a /tftpboot/mqam.config configuration script for the D9477 serial devices then please contact me at stoth [at] kernellabs [dot] com Configure the Scientific Atlanta MQAM D9477-1 modulator using the serial port. Currently frequency and power level can be controlled via the tool, but its pretty simple to add other options also. ``` #!python $ sudo ./d9477 Opening device /dev/ttyUSB0 Port1 freq = 91.00(MHz) : 44.0(dBmv) rf:on : ITUB_64 Port2 freq = 512.00(MHz) : 44.0(dBmv) rf:on : ITUB_256 Port3 freq = 597.00(MHz) : 44.0(dBmv) rf:on : ITUB_64 Port4 freq = 273.00(MHz) : 44.0(dBmv) rf:on : ITUB_64 Closing device. $ sudo ./d9477 -p1 -f175000000 -l52 Opening device /dev/ttyUSB0 Port1 freq = 175.00(MHz) : 52.0(dBmv) rf:on : ITUB_64 Port2 freq = 512.00(MHz) : 44.0(dBmv) rf:on : ITUB_256 Port3 freq = 597.00(MHz) : 44.0(dBmv) rf:on : ITUB_64 Port4 freq = 273.00(MHz) : 44.0(dBmv) rf:on : ITUB_64 Closing device. ``` Here are my general notes for configuring via serial: ``` #!python D9477-1 Configuration ********************* # configure rfport 1 for QAM-B-256 and 579MHz modmode 1 itub256 freq 1 579 # enable ASI port 1 asi_enable 1 1 # On the dektec generator, ensure: # Packetsize setting is "188-byte packets" # DVB-ASI Settings Burst Mode and Invert DVB-ASI are unchecked # check the asi port 1 is locked to the input stream: port_status ASI1 INPUT ---------- Port is enable Sync detected Clock detected Carrier detected # Enable ASI passthrough for port 1 pids 0-to-999 pidmode 1 0x0 999 # Pass a specific pid from asi port NR (1-2) to rfoutput (1-4) pass 1 0x31 0x31 2 # Don't pass a specific pid from asi port NR (1-2) to rfoutput (1-4) kill 1 0x31 0x31 2 D9477-1 Command line configuration, four channel generator. ************************************************************* Using a Dektec ASI generator, output a single ASI transport stream (c25.ts) containing four german television programs, configure the D9477 to receive the asi stream and generate four separate frequencies, each containing its own program. In some cases, configuration of the D9477 is sticky and survives a reboot. In other cases (pid mapping), the settings do not survive a reboot. The pids within c25.ts are between 0x0000 and 0x0161 inclusive, see c25-pidmap-chart.png The programs within c25.ts are 16405, 16406, 16411 and 16418 see C25-programs-and-pids.png All programs are transmitting at roughly 3Mbps PID breakdown for the c25.ts stream: 16405: 0x0150 PMT - 0x0151 Video - 0x0152 Audio - 0x0157 Aux / Data - 0x0151 PCR 16406: 0x0160 PMT - 0x0161 Video - 0x0162 Audio - 0x0167 Aux / Data - 0x0161 PCR 16411: 0x01b0 PMT - 0x01b1 Video - 0x01b2 Audio - 0x01b7 Aux / Data - 0x01b1 PCR 16418: 0x0220 PMT - 0x0221 Video - 0x0222 Audio - 0x0227 Aux / Data - 0x0221 PCR PSIP PAT: 0x0000 PSIP CAT: 0x0001 PSIP NIT: 0x0010 PSIP SDT: 0x0011 PSIP TOT: 0x0014 PSIP TDT: 0x0014 This document will use the D9477 ASI port#1 and RFPorts #1-4 ASI port#1 requires no specific configuration or description. RF Output ports will be configured for: 1: QAM 256 579MHz Program 16405 Name RTL 2: QAM 256 585MHz Program 16406 Name RTL2 3: QAM 64 591MHz Program 16411 Name Super RTL 4: QAM 64 597MHz Program 16418 Name VOX The Dektec (DTA-2144) configuration is set to (dektec-configuration.png): 188-Byte packets - Checked DVB-ASI BurstMode - Unchecked Invert DVB-ASI - Unchecked 1. Boot the D9477, if its not already in factory reset mode then perform a factory reset. Using a serial cable between a PC and device, set for 9600 8N1. Power on the D9477. press Enter every few seconds until the "boot>" prompt appears. 2. Set the bootmode to "skip bootp" (standalone operating mode). boot> setbootmode Enter new boot mode: 0 "New boot mode in NVRAM set to 0." boot> exit D9477 will now reboot, the process will take 30 seconds. 3. Configure RF Ports 1-4 RF characteristics > freq 1 579 > modmode 1 itub256 > freq 2 585 > modmode 2 itub256 > freq 3 591 > modmode 3 itub64 > freq 4 597 > modmode 4 itub64 You can use the "freq <1-4>" command to confirm the current frequency. You can use the "modmode" command (no arguments) to check all modulation modes. 4. Check the status of each ASI input and confirm its enabled. > asi_enable ASI1 port is enabled ASI2 port is enabled We'll disable ASI2, we don't need it. > asi_enable 2 0 > asi_enable ASI1 port is enabled ASI2 port is disabled 5. Check the status of each RF Output port and ensure they're all enabled: > qam_enable 1 1 > qam_enable 2 1 > qam_enable 3 1 > qam_enable 4 1 Check the status of all ports > qma_enable QAM output 1 is enabled QAM output 2 is enabled QAM output 3 is enabled QAM output 4 is enabled 6. Unmute each RF Output Port. > rfoutput 1 on > rfoutput 2 on > rfoutput 3 on > rfoutput 4 on 7. Clear any previously defined pidmap, ensure the modulator outputs null packets for testing purposes. > pidmode 0 Turn OFF PID PASSTHRU mode... cleaing all PID routes Turn OFF PID PASSTHRU mode complete 8. Check a Tv Tuner stick is tuning and locking to each frequency. Connect a tv tuner to each RF output port 1-4 in turn. Tune to channels 579MHz through 597MHz with your favorite debug tool. You should see that you are receiving 34Mbps of null packets on 579/585MHz. You should see that you are receiving 27Mbps of null packets on 591/597MHz. See null-packets.png 9. Configure 16405 on RF Output port #1 > pass 1 0x0 0x0 1 (From ASI port #1 map the PAT to rf output port #1) > pass 1 0x150 0x157 1 (From ASI port #1 map pids range inclusive to rf output port #1) 10. Using your favorite TV Debug tool, verify that frequency 579Mhz shows program 16405. See f579-configure.png See f579-playback.png showing tv playback in VLC. 11. Configure 16406 on RF Output port #2 > pass 1 0x0 0x0 2 (From ASI port #1 map the PAT to rf output port #2) > pass 1 0x160 0x167 2 (From ASI port #1 map pids range inclusive to rf output port #2) Check with your favorite tool that 585MHz is mapped correctly: See f585-configure.png See f585-playback.png showing tv playback in VLC. 12. Configure 16411 and 16418 for RF Output Ports #3 and #4 > pass 1 0x0 0x0 3 > pass 1 0x1b0 0x1b7 3 See f591-configure.png See f591-playback.png showing tv playback in VLC. > pass 1 0x0 0x0 4 > pass 1 0x220 0x227 4 See f597-configure.png See f597-playback.png showing tv playback in VLC. 13. Map any other PSIP pids from the PID table above into each RF Output port. PSIP CAT: 0x0001 > pass 1 0x1 0x1 1 > pass 1 0x1 0x1 2 > pass 1 0x1 0x1 3 > pass 1 0x1 0x1 4 PSIP NIT: 0x0010 PSIP SDT: 0x0011 PSIP TOT: 0x0014 PSIP TDT: 0x0014 > pass 1 0x10 0x14 1 > pass 1 0x10 0x14 2 > pass 1 0x10 0x14 3 > pass 1 0x10 0x14 4 Using your favorite TV Tuner debug tool, 579Mhz should now look like this: See f579-configure-with-psip.png 14. If you were to reboot the D9477, all of the above pid mapping would be lost. you would have to re-enter the pass commands. 15. Bonus configuration, convert RF Output #1 to contain all of the programs. Remove all current pid mappings. > kill 1 0x0 0x400 1 (remove pids 0x0 through 0x400 from RF Output #1) > pass 1 0x0 0x400 1 (Add _ALL_ pids 0x0 through 0x400 to RF Output #1) See f579-configured-all-programs.png ```