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