3 #include <lib/dvb_ci/dvbci_mmi.h>
5 eDVBCIMMISession::eDVBCIMMISession(eDVBCISlot *tslot)
8 slot->mmi_session = this;
11 eDVBCIMMISession::~eDVBCIMMISession()
13 slot->mmi_session = 0;
16 int eDVBCIMMISession::receivedAPDU(const unsigned char *tag, const void *data, int len)
18 printf("SESSION(%d)/MMI %02x %02x %02x: ", session_nb, tag[0], tag[1],tag[2]);
19 for (int i=0; i<len; i++)
20 printf("%02x ", ((const unsigned char*)data)[i]);
23 if ((tag[0]==0x9f) && (tag[1]==0x88))
28 printf("MMI display control\n");
29 if (((unsigned char*)data)[0] != 1)
30 printf("kann ich nicht. aber das sag ich dem modul nicht.\n");
31 state=stateDisplayReply;
36 unsigned char *d=(unsigned char*)data;
37 unsigned char *max=((unsigned char*)d) + len;
38 printf("Tmenu_last\n");
46 printf("%d texts\n", n);
47 for (int i=0; i < (n+3); ++i)
52 printf("text tag: %02x %02x %02x\n", d[0], d[1], d[2]);
54 d+=parseLengthField(d, textlen);
55 printf("%d bytes text\n", textlen);
56 if ((d+textlen) > max)
65 printf("unknown APDU tag 9F 88 %02x\n", tag[2]);
72 int eDVBCIMMISession::doAction()
79 case stateDisplayReply:
81 unsigned char tag[]={0x9f, 0x88, 0x02};
82 unsigned char data[]={0x01, 0x01};
83 sendAPDU(tag, data, 2);
90 unsigned char tag[]={0x9f, 0x88, 0x0b};
91 unsigned char data[]={5};
92 sendAPDU(tag, data, 1);
104 int eDVBCIMMISession::stopMMI()
106 printf("eDVBCIMMISession::stopMMI()\n");
108 unsigned char tag[]={0x9f, 0x88, 0x00};
109 unsigned char data[]={0x00};
110 sendAPDU(tag, data, 1);