Motorola QIP-2500

From MythTV Official Wiki
Revision as of 00:14, 11 September 2009 by Rich0 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is apparently a newer model of the DCT-25xx series that Verizon provides as their SD settop box for FIOS subscribers.

General notes: The serial cable you use must have screws on the male end- both of my USB to Serial adapters do not have these, they have a metal screw holes next to the serial port. That kind of adapter will not fit in- the screw holes on the QIP-2500 are on the female (box) side.

Also, changing the channel takes several seconds- if you are watching the screen when the script goes to change the channel, you'll see it punch in each number with a break in between.


As noted on many places on the web, you can get to the diagnostic menu by pressing power, select, select, menu. This houses all sorts of information about the box and the current channel you are on- including it's frequency, encryption status, and PID's.


You can use the same channel changing script as the DCT-25xx family (the archive name should be dct2000serial.tar.gz, extract all of it and use changechannel.py), with the following changes (not mine):

if (not IsAllDigits(cmdarg)):                                     
-       if (len(cmdarg) > 3):                                                                          
+       if (len(cmdarg) > 4):                                                                          
               print "too many chars!"                                                                
       else:
               lenc=len(cmdarg)
-               if (lenc == 3):
+               if (lenc == 4):
                       chanset=cmdarg
               else:
-                       if (lenc == 2):
+                       if (lenc == 3):
                               chanset="0"+cmdarg
                       else:
-                               if (lenc == 1):
+                               if (lenc == 2):
                                       chanset="00"+cmdarg
+                               else:
+                                       if(lenc==1):
+                                               chanset="000"+cmdarg
-       for num in [1,2,3]:
+       for num in [1,2,3,4]:
               CHANKEY=chr(int(chanset[num-1:num]))
               CHANCODE=CHANCODE+CHANKEY

If you want to enable additional remote buttons to be passed in, check the file for the name of the button key you want, then simply apply the changes below, adjusting for your button of choice.

-       if (cmdarg == "l" or cmdarg == "m" or cmdarg == "f" or cmdarg == "u" or cmdarg == "d"):
+       if (cmdarg == "l" or cmdarg == "m" or cmdarg == "f" or cmdarg == "u" or cmdarg == "d"  
+or cmdarg == "p"):                                                                            
               BUTNKEY=                                                                     
               if (cmdarg == "l" ):                                                           
                       BUTNKEY=LAST_CHANNEL                                                   
                                       else:                                                  
                                               if (cmdarg == "d" ):                           
                                                       BUTNKEY=CHAN_DOWN                      
+                                               else:                                          
+                                                       if (cmdarg == "p" ):                   
+                                                               BUTNKEY=ONOFF                                                                                             

There is a somewhat better script for the dct2500 at: http://mythtv.org/pipermail/mythtv-users/attachments/20031007/06661dd7/dct-channel.tar.bin

This script contains bidirectional error checking and is more reliable.

channel.c can be patched as follows:

--- dct-channel/channel.c       2003-10-07 23:10:15.000000000 -0400
+++ dct-channel/channel.c       2009-09-10 20:04:26.000000000 -0400
@@ -116,7 +116,8 @@
        _sPacket p;
        int cur;

-       if((send_keypress(KEY_0+((chan/100)%10)))<0 ||
+       if((send_keypress(KEY_0+((chan/1000)%10)))<0 ||
+          (send_keypress(KEY_0+((chan/100)%10)))<0 ||
           (send_keypress(KEY_0+((chan/10)%10)))<0 ||
           (send_keypress(KEY_0+((chan/1)%10)))<0) {
                debug("error sending channel keypresses\n");
@@ -162,25 +163,25 @@
        int cur=0;
        int newcur;

-       if(argc<1 || argc>2) {
+       if(argc<2 || argc>3) {
        usage:
-               fprintf(stderr,"usage: %s [channel]\n", argv[0]);
-               fprintf(stderr,"   ex: %s 13\n");
+               fprintf(stderr,"usage: %s [port] [channel]\n", argv[0]);
+               fprintf(stderr,"   ex: %s /dev/ttyS0 13\n");
                return -1;
        }

-       if(argc==2) {
+       if(argc==3) {
                char *end;
-               chan = strtol(argv[1],&end,10);
-               if(*end!='\0' || chan<1 || chan>999) {
+               chan = strtol(argv[2],&end,10);
+               if(*end!='\0' || chan<1 || chan>9999) {
                        fprintf(stderr,"Invalid channel: %s\n",argv[1]);
-                       fprintf(stderr,"valid channels are 1 - 999\n");
+                       fprintf(stderr,"valid channels are 1 - 9999\n");
                        goto usage;
                }
        }

-       if((serial_init("/dev/ttyS0"))<0)
-               err(1,"/dev/ttyS0");
+       if((serial_init(argv[1]))<0)
+               err(1,"unable to init serial port");

        atexit(serial_close);