\r\n -> \n
[gnokii.git] / Docs / developers / other / dmcp / readme
1
2 1.see Smart Messaging 2.0 for info, what the DMCP is
3
4 2.I didn't have success in changing menus via cable (without sending SMS).
5   Here is example foogle funtion. You will see only "Nokia service update failed"
6 ------------------------------------
7 int foogle(char *argv[])
8 {
9   GSM_NetworkInfo NetworkInfo;
10   int i;
11
12   char buffer[100]= { 0x0c, 0x01,
13                             0x06,  /* User Data Header Length */
14                             0x05,  /* IEI: application port addressing scheme, 16 bit address */
15                             0x04,  /* IEDL (IED length ?) */
16                             0x15,  /* destination address: high byte */
17                             0x84,  /* destination address: low byte */
18                             0x00,  /* originator address: high byte */
19                             0x00}; /* originator address: low byte */
20
21   int MSGLEN=9;
22
23   /* Initialise the code for the GSM interface. */     
24
25   fbusinit(NULL);
26
27   buffer[MSGLEN++]='B';
28   buffer[MSGLEN++]='O';     
29   buffer[MSGLEN++]='D';
30   buffer[MSGLEN++]='Y';
31   buffer[MSGLEN++]=':';
32   buffer[MSGLEN++]=10;
33   buffer[MSGLEN++]='I';
34   buffer[MSGLEN++]='A';
35   buffer[MSGLEN++]=':';
36   buffer[MSGLEN++]=10;
37   buffer[MSGLEN++]='O';
38   buffer[MSGLEN++]='P';
39   buffer[MSGLEN++]='E';
40   buffer[MSGLEN++]='R';
41   buffer[MSGLEN++]=' ';
42   buffer[MSGLEN++]='a';
43   buffer[MSGLEN++]='l';
44   buffer[MSGLEN++]=10;
45   buffer[MSGLEN++]='L';
46   buffer[MSGLEN++]='i';
47   buffer[MSGLEN++]='n';
48   buffer[MSGLEN++]='k';
49   buffer[MSGLEN++]=10;
50   buffer[MSGLEN++]='N';
51   buffer[MSGLEN++]=10;
52   buffer[MSGLEN++]=10;
53   buffer[MSGLEN++]='M';
54   buffer[MSGLEN++]=' ';
55   buffer[MSGLEN++]='S';
56   buffer[MSGLEN++]='M';
57   buffer[MSGLEN++]='S';
58   buffer[MSGLEN++]=10;
59   buffer[MSGLEN++]='+';
60   buffer[MSGLEN++]='4';
61   buffer[MSGLEN++]='8';
62   buffer[MSGLEN++]='6';
63   buffer[MSGLEN++]='0';
64   buffer[MSGLEN++]='2';
65   buffer[MSGLEN++]='9';
66   buffer[MSGLEN++]='5';
67   buffer[MSGLEN++]='1';
68   buffer[MSGLEN++]='1';
69   buffer[MSGLEN++]='1';
70   buffer[MSGLEN++]='1';
71   buffer[MSGLEN++]='/';
72   buffer[MSGLEN++]='+';
73   buffer[MSGLEN++]='4';
74   buffer[MSGLEN++]='8';
75   buffer[MSGLEN++]='6';
76   buffer[MSGLEN++]='0';
77   buffer[MSGLEN++]='2';
78   buffer[MSGLEN++]='9';
79   buffer[MSGLEN++]='5';
80   buffer[MSGLEN++]='1';
81   buffer[MSGLEN++]='1';
82   buffer[MSGLEN++]='1';
83   buffer[MSGLEN++]='1';
84
85   for (i=0;i<MSGLEN;i++) {
86     fprintf(stdout,_("%c"),buffer[i]);
87   }
88
89   Protocol->SendMessage(MSGLEN, 0x12, buffer);
90   GSM->GetNetworkInfo(&NetworkInfo); //need to make something
91
92   
93   GSM->Terminate();
94
95   return 0;
96 }
97 -----------------------------------
98 3.to change via SMS - read parts of email sent by Martin Lucina [mato@kotelna.sk]
99 -----------------------------------
100
101 1. First of all, use the OPER (Operator) services rather than the Nokia
102    services. There's probably no reason why you couldn't use either but
103    there may be extra hooks in the phone firmware regarding Nokia
104    services that I don't know about.
105
106 2. Make sure that "Operator access number 1" and "Operator access number
107    2" are set correctly in the services menu. The former should be set
108    to the SMS centre the messages you send are going to come from
109    (important, send yourself a test message and check it's details, some
110    operators set the sending SMSC number to one different from the one
111    you originally sent the message to). The latter should be the number
112    of the MS you are sending the SMS from.
113
114 3. Don't send the messages as binary NBS messsages using the UDH. I
115    haven't been able to get this method to work and besides, the //SCK
116    compatibility header works just fine. 
117    
118    Also, while I haven't seen this, it's possible that if you send a
119    message in binary format, the destination MS will reply in binary
120    format. This makes the reply useless if you are sending from another
121    NBS-aware phone, since the NBS router will most likely silently
122    discard it (or try to forward it to the phones TTML/DMCP server,
123    which won't help either). 
124    
125    If you send the messages as text, the replies I've seen also come
126    back as text so you can retrieve them from the phone in the normal
127    fashion.
128
129 One caveat I've noticed with sending NBS messages using the //SCK
130 compatibility header is that the NBS grammar in the Nokia SM spec
131 version 2 contradicts the grammar in the original Intel NBS spec. Nokia
132 says you can using either a newline or space as the delimiter after
133 "//SCK", it turns out that you _must_ use a space (as stated in the
134 Intel spec). Of course you can still stick a newline in afterwards.
135
136 I have attached a test file that will add two menu items that send SMS
137 messages to your services menu. I send this to the phone using
138
139 $ sendsms +6421XXXXXX < addsms
140
141 [...]
142
143 Cheers,
144
145 -- 
146 Martin Lucina http://www.kotelna.sk/mato/ Wellington, New Zealand             
147 I've always been mad I know I've been mad like the most of us are             
148 Pretty hard to explain why you're a madman even if you're not mad