summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common
authorzautrix <zautrix>2004-10-25 08:56:23 (UTC)
committer zautrix <zautrix>2004-10-25 08:56:23 (UTC)
commit62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3 (patch) (unidiff)
treec2b7a41b0c8fffdc0786b84ff86724ea8f08d6a1 /gammu/emb/common
parentfeff0930372dd51af24dc3b46697e70838277ea5 (diff)
downloadkdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.zip
kdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.tar.gz
kdepimpi-62e92aa86b6281b4e4c2a2bdb57f3ceb5a87f4e3.tar.bz2
gammu updates
Diffstat (limited to 'gammu/emb/common') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/common.pro22
-rw-r--r--gammu/emb/common/commonE.pro14
-rw-r--r--gammu/emb/common/device/serial/ser_djg.c399
-rw-r--r--gammu/emb/common/device/serial/ser_djg.h37
-rw-r--r--gammu/emb/common/device/serial/ser_unx.c27
-rw-r--r--gammu/emb/common/device/serial/ser_w32.c9
-rw-r--r--gammu/emb/common/gsmstate.c7
-rw-r--r--gammu/emb/common/gsmstate.h30
-rw-r--r--gammu/emb/common/phone/alcatel/alcatel.c6
-rw-r--r--gammu/emb/common/phone/at/atgen.c8
-rw-r--r--gammu/emb/common/phone/at/sonyeric.c19
-rw-r--r--gammu/emb/common/phone/nokia/dct3/dct3func.c17
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n0650.c150
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n0650.h18
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n6110.c17
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n7110.c15
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n9210.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3320.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n3650.c6
-rw-r--r--gammu/emb/common/phone/nokia/dct4/n6510.c142
-rw-r--r--gammu/emb/common/phone/nokia/nauto.c6
-rw-r--r--gammu/emb/common/phone/obex/obexgen.c6
-rw-r--r--gammu/emb/common/phone/pfunc.c1
-rw-r--r--gammu/emb/common/phone/symbian/mroutgen.c6
-rw-r--r--gammu/emb/common/protocol/nokia/fbus2.c10
-rw-r--r--gammu/emb/common/protocol/nokia/fbus2.h9
-rw-r--r--gammu/emb/common/protocol/nokia/phonet.c9
-rw-r--r--gammu/emb/common/protocol/nokia/phonet.h9
-rw-r--r--gammu/emb/common/service/backup/backgen.h2
-rw-r--r--gammu/emb/common/service/backup/backtext.c12
-rw-r--r--gammu/emb/common/service/gsmring.h2
31 files changed, 948 insertions, 79 deletions
diff --git a/gammu/emb/common/common.pro b/gammu/emb/common/common.pro
index 797199b..af45382 100644
--- a/gammu/emb/common/common.pro
+++ b/gammu/emb/common/common.pro
@@ -73,3 +73,2 @@ HEADERS += config.h \
73 device/bluetoth/affix.h \ 73 device/bluetoth/affix.h \
74 device/bluetoth/blue_w32.h \
75 device/bluetoth/bluetoth.h \ 74 device/bluetoth/bluetoth.h \
@@ -77,7 +76,3 @@ HEADERS += config.h \
77 device/irda/irda.h \ 76 device/irda/irda.h \
78 device/irda/irda_unx.h \
79 device/irda/irda_w32.h \
80 device/serial/ser_djg.h \ 77 device/serial/ser_djg.h \
81 device/serial/ser_unx.h \
82 device/serial/ser_w32.h \
83 misc/coding/coding.h \ 78 misc/coding/coding.h \
@@ -113,2 +108,3 @@ HEADERS += config.h \
113 phone/nokia/dct3/n7110.h \ 108 phone/nokia/dct3/n7110.h \
109 phone/nokia/dct3/n0650.h \
114 phone/nokia/dct3/n9210.h \ 110 phone/nokia/dct3/n9210.h \
@@ -143,3 +139,2 @@ device/bluetoth/affix.c \
143device/bluetoth/bluez.c \ 139device/bluetoth/bluez.c \
144device/bluetoth/blue_w32.c \
145device/bluetoth/bluetoth.c \ 140device/bluetoth/bluetoth.c \
@@ -163,2 +158,3 @@ phone/nokia/dct3/n6110.c \
163phone/nokia/dct3/n7110.c \ 158phone/nokia/dct3/n7110.c \
159phone/nokia/dct3/n0650.c \
164phone/nokia/dct3/n9210.c \ 160phone/nokia/dct3/n9210.c \
@@ -183,6 +179,16 @@ MOC_DIR = moc/unix
183unix: { 179unix: {
184SOURCES += device/serial/ser_unx.c 180HEADERS += device/serial/ser_unx.h \
181 device/irda/irda_unx.h
182
183SOURCES += device/serial/ser_unx.c \
184
185} 185}
186win32:{ 186win32:{
187SOURCES += device/serial/ser_w32.c 187
188HEADERS += device/serial/ser_w32.h \
189 device/irda/irda_w32.h \
190 device/bluetoth/blue_w32.h
191
192SOURCES += device/serial/ser_w32.c \
193 device/bluetoth/blue_w32.c
188} 194}
diff --git a/gammu/emb/common/commonE.pro b/gammu/emb/common/commonE.pro
index f5b559d..1512814 100644
--- a/gammu/emb/common/commonE.pro
+++ b/gammu/emb/common/commonE.pro
@@ -73,3 +73,2 @@ HEADERS += config.h \
73 device/bluetoth/affix.h \ 73 device/bluetoth/affix.h \
74 device/bluetoth/blue_w32.h \
75 device/bluetoth/bluetoth.h \ 74 device/bluetoth/bluetoth.h \
@@ -78,6 +77,4 @@ HEADERS += config.h \
78 device/irda/irda_unx.h \ 77 device/irda/irda_unx.h \
79 device/irda/irda_w32.h \
80 device/serial/ser_djg.h \ 78 device/serial/ser_djg.h \
81 device/serial/ser_unx.h \ 79 device/serial/ser_unx.h \
82 device/serial/ser_w32.h \
83 misc/coding/coding.h \ 80 misc/coding/coding.h \
@@ -116,2 +113,3 @@ HEADERS += config.h \
116 phone/nokia/dct4/n3320.h \ 113 phone/nokia/dct4/n3320.h \
114 phone/nokia/dct3/n0650.h \
117 phone/nokia/dct4/n3650.h \ 115 phone/nokia/dct4/n3650.h \
@@ -143,3 +141,2 @@ device/bluetoth/affix.c \
143device/bluetoth/bluez.c \ 141device/bluetoth/bluez.c \
144device/bluetoth/blue_w32.c \
145device/bluetoth/bluetoth.c \ 142device/bluetoth/bluetoth.c \
@@ -169,2 +166,3 @@ phone/nokia/dct4/n3650.c \
169phone/nokia/dct4/n6510.c \ 166phone/nokia/dct4/n6510.c \
167phone/nokia/dct3/n0650.c \
170phone/nokia/dct4/dct4func.c \ 168phone/nokia/dct4/dct4func.c \
@@ -181 +179,9 @@ MOC_DIR = moc/$(PLATFORM)
181 CONFIG = warn_off release console 179 CONFIG = warn_off release console
180
181
182
183
184 # device/bluetoth/blue_w32.h \
185 # device/irda/irda_w32.h \
186 # device/serial/ser_w32.h \
187 # device/bluetoth/blue_w32.c \ \ No newline at end of file
diff --git a/gammu/emb/common/device/serial/ser_djg.c b/gammu/emb/common/device/serial/ser_djg.c
index 2524187..609deb8 100644
--- a/gammu/emb/common/device/serial/ser_djg.c
+++ b/gammu/emb/common/device/serial/ser_djg.c
@@ -1 +1,6 @@
1/* Some sources from SVAsync (c) 1996, 1997, Samuel Vincent
2 * 7337 Carioca Ct, Rohnert Park, Ca 94928
3 * "you may freely use it in your programs without paying me anything"
4 */
5/* Some sources from DZCOMM */
1 6
@@ -7,9 +12,190 @@
7#include "../../gsmcomon.h" 12#include "../../gsmcomon.h"
13#include "../../misc/coding/coding.h"
8#include "ser_djg.h" 14#include "ser_djg.h"
9 15
16#include <stdlib.h>
17#include <stdio.h>
18#include <string.h>
19#include <dos.h>
20#include <dpmi.h>
21#include <pc.h>
22#include <go32.h>
23#include <sys/farptr.h>
24#include <sys/movedata.h>
25#include <conio.h>
26
27extern unsigned short __djgpp_ds_alias;
28extern void SVAsyncProtISR(void);
29
30static unsigned char SVAsyncStatus=0;
31
32static void lock_interrupt_memory(void);
33static void unlock_interrupt_memory(void);
34
35 #define Ctrl8259_0 0x020 /* 8259 port */
36 #define Ctrl8259_1 0x021 /* 8259 port (Masks) */
37 #define BufSize 32768 /* Buffer Size */
38
39static unsigned char VectorNum; /* Vector Number */
40static unsigned char EnableIRQ; /* Mask to enable 8259 IRQ */
41static unsigned char DisableIRQ; /* Mask to disable 8259 IRQ */
42static _go32_dpmi_seginfo ProtVector; /* Old Protmode Vector */
43static _go32_dpmi_seginfo info; /* New Protmode Vector */
44
45/* Register Addresses for the UART */
46static unsigned short Port; /* Port Base Address */
47unsigned short THR; /* Transmitter Holding Register */
48unsigned short RDR; /* Reciever Data Register */
49unsigned short BRDL; /* Baud Rate Divisor, Low byte */
50unsigned short BRDH; /* Baud Rate Divisor, High Byte */
51unsigned short IER; /* Interupt Enable Register */
52unsigned short IIR; /* Interupt Identification Register */
53unsigned short FCR; /* FIFO Control Register */
54unsigned short LCR; /* Line Control Register */
55unsigned short MCR; /* Modem Control Register */
56unsigned short LSR; /* Line Status Register */
57unsigned short MSR; /* Modem Status Register */
58unsigned short SCR; /* SCR Register */
59
60/* Data Buffer */
61 unsigned volatile char RecBuffer[BufSize] = { 0 };
62 unsigned volatile int RecHead, RecTail;
63
64/* This uninstalls the ISR and resets the serial port. */
65static void SVAsyncStop(void)
66{
67 if(!SVAsyncStatus) return;
68 SVAsyncStatus = 0;
69
70 /***** Mask (disable) 8259 IRQ Interrupt */
71 outportb(Ctrl8259_1, (inportb(Ctrl8259_1) | DisableIRQ));
72
73 /***** Disable 8250 interrupt */
74 outportb(LCR, (inportb(LCR) & 0x7F));
75 outportb(IER, 0);
76
77 /***** Set bit 3 in MCR to 0 */
78 outportb(MCR, (inportb(MCR) & 0xF7));
79
80 /***** Interrupts are disabled. Restore saved interrupt vector. */
81 _go32_dpmi_set_protected_mode_interrupt_vector(VectorNum, &ProtVector);
82}
83
84/* This will empty the receive buffer */
85static void SVAsyncClear(void)
86{
87 disable();
88 RecHead = 0;
89 RecTail = 0;
90 enable();
91}
92
93
94/* Sets communication parameters
95 * Baud = 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 28800, 38400, 57600
96 * Control = The value to place in the LCR
97 */
98void SVAsyncSet(unsigned int Baud, unsigned int Control)
99{
100 int divisor;
101 unsigned char divlow, divhigh;
102
103 if (!Baud) return;
104
105 divisor = 115200 / Baud;
106
107 disable();
108
109 outportb(LCR, Control | 0x80); /* Set Port Toggle to BRDL/BRDH registers */
110 divlow = divisor & 0x000000ff;
111 divhigh = (divisor >> 8) & 0x000000ff;
112 outportb(BRDL, divlow); /* Set Baud Rate */
113 outportb(BRDH, divhigh);
114
115 outportb(LCR, Control & 0x007F); /* Set LCR and Port Toggle */
116
117 enable();
118}
119
120/* Sets various handshaking lines */
121void SVAsyncHand(unsigned int Hand)
122{
123 outportb(MCR, Hand | 0x08); /* Keep interrupt enable ON */
124}
125
126static void lock_interrupt_memory(void)
127{
128 int errval;
129 __dpmi_meminfo info;
130 unsigned long address;
131
132 __dpmi_get_segment_base_address(_my_ds(), &address);
133
134 info.address = (int) address + (int) &RDR;
135 info.size = sizeof(RDR);
136 errval = __dpmi_lock_linear_region(&info);
137 if(errval == -1) printf("Error in locking memory\n!");
138
139 info.address = (int) address + (int) &LSR;
140 info.size = sizeof(LSR);
141 errval = __dpmi_lock_linear_region(&info);
142 if(errval == -1) printf("Error in locking memory\n!");
143
144 info.address = (int) address + (int) &RecHead;
145 info.size = sizeof(RecHead);
146 errval = __dpmi_lock_linear_region(&info);
147 if(errval == -1) printf("Error in locking memory\n!");
148
149 info.address = (int) address + (int) &RecBuffer;
150 info.size = sizeof(RecBuffer);
151 errval = __dpmi_lock_linear_region(&info);
152 if(errval == -1) printf("Error in locking memory\n!");
153
154 info.address = (int) address + (int) RecBuffer;
155 info.size = BufSize;
156 errval = __dpmi_lock_linear_region(&info);
157 if(errval == -1) printf("Error in locking memory\n!");
158
159 __dpmi_get_segment_base_address(_my_cs(), &address);
160
161 info.address = (int) address + (int) SVAsyncProtISR;
162 info.size = 4096; /* 4096 bytes is probably overkill. */
163 errval = __dpmi_lock_linear_region(&info);
164 if(errval == -1) printf("Error in locking memory\n!");
165}
166
167static void unlock_interrupt_memory(void)
168{
169 __dpmi_meminfo info;
170 unsigned long address;
171
172 __dpmi_get_segment_base_address(_my_ds(), &address);
173 info.address = (int) address + (int) &RDR;
174 info.size = sizeof(RDR);
175 __dpmi_unlock_linear_region(&info);
176 info.address = (int) address + (int) &LSR;
177 info.size = sizeof(LSR);
178 __dpmi_unlock_linear_region(&info);
179 info.address = (int) address + (int) &RecHead;
180 info.size = sizeof(RecHead);
181 __dpmi_unlock_linear_region(&info);
182 info.address = (int) address + (int) &RecBuffer;
183 info.size = sizeof(RecBuffer);
184 __dpmi_unlock_linear_region(&info);
185 info.address = (int) address + (int) RecBuffer;
186 info.size = BufSize;
187 __dpmi_unlock_linear_region(&info);
188
189 __dpmi_get_segment_base_address(_my_cs(), &address);
190
191 info.address = (int) address + (int) SVAsyncProtISR;
192 info.size = 4096; /* probably overkill */
193 __dpmi_unlock_linear_region(&info);
194}
195
10static GSM_Error serial_close(GSM_StateMachine *s) 196static GSM_Error serial_close(GSM_StateMachine *s)
11{ 197{
12 GSM_Device_SerialData *d = &s->Device.Data.Serial; 198 SVAsyncStop();
13 199
14 return ERR_NOTIMPLEMENTED; 200 return ERR_NONE;
15} 201}
@@ -18,5 +204,154 @@ static GSM_Error serial_open (GSM_StateMachine *s)
18{ 204{
19 GSM_Device_SerialData *d = &s->Device.Data.Serial; 205 GSM_Device_SerialData *d = &s->Device.Data.Serial;
20 206 unsigned char temp;
21 return ERR_NOTIMPLEMENTED; 207 int i;
208
209 /**** Set various things according to com port number */
210 if (mystrncasecmp(s->CurrentConfig->Device,"com1:",0)) {
211 Port = 0x03F8;
212 VectorNum = 0x0C;
213 EnableIRQ = 0xEF;
214 DisableIRQ = 0x10;
215 } else if (mystrncasecmp(s->CurrentConfig->Device,"com2:",0)) {
216 Port = 0x02F8;
217 VectorNum = 0x0B;
218 EnableIRQ = 0xF7;
219 DisableIRQ = 0x08;
220 } else if (mystrncasecmp(s->CurrentConfig->Device,"com3:",0)) {
221 Port = 0x03E8;
222 VectorNum = 0x0C;
223 EnableIRQ = 0xEF;
224 DisableIRQ = 0x10;
225 } else if (mystrncasecmp(s->CurrentConfig->Device,"com4:",0)) {
226 Port = 0x02E8;
227 VectorNum = 0x0B;
228 EnableIRQ = 0xF7;
229 DisableIRQ = 0x08;
230 } else return ERR_NOTSUPPORTED;
231
232 /**** Compute Register locations */
233 THR = Port;
234 RDR = Port;
235 BRDL = Port;
236 BRDH = 1 + Port;
237 IER = 1 + Port;
238 IIR = 2 + Port;
239 FCR = 2 + Port;
240 LCR = 3 + Port;
241 MCR = 4 + Port;
242 LSR = 5 + Port;
243 MSR = 6 + Port;
244 SCR = 7 + Port;
245
246 /***** Initalize Buffer */
247 SVAsyncClear();
248
249 lock_interrupt_memory();
250 atexit(unlock_interrupt_memory);
251 /***** Set bit 3 in MCR to 0 */
252 outportb(MCR, (inportb(MCR) & 0xF7));
253
254 /*** Save and reassign interrupt vectors */
255
256 _go32_dpmi_get_protected_mode_interrupt_vector(VectorNum, &ProtVector);
257
258 info.pm_offset = (int) SVAsyncProtISR;
259 info.pm_selector = _my_cs();
260 _go32_dpmi_set_protected_mode_interrupt_vector(VectorNum, &info);
261
262 atexit(SVAsyncStop);
263
264 /***** Enable 8259 interrupt (IRQ) line for this async adapter */
265 outportb(Ctrl8259_1, (inportb(Ctrl8259_1) & EnableIRQ));
266
267 /***** Enable 8250 Interrupt-on-data-ready */
268 outportb(LCR, (inportb(LCR) & 0x7F));
269
270 outportb(IER, 0);
271 if (inportb(IER)) {
272 SVAsyncStatus = 0;
273 return ERR_UNKNOWN;
274 }
275 outportb(IER, 0x01);
276
277 /***** Clear 8250 Status and data registers */
278 do {
279 temp=inportb(RDR);
280 temp=inportb(LSR);
281 temp=inportb(MSR);
282 temp=inportb(IIR);
283 } while(!(temp & 1));
284
285 /***** Set Bit 3 of MCR -- Enable interupts */
286 outportb(MCR, (inportb(MCR) | 0x08));
287
288 SVAsyncStatus = 1;
289 /***** Clear Buffer Just in case */
290 SVAsyncClear();
291
292 /* Code based on stuff from SVAsync lib.
293 * Clear UART Status and data registers
294 * setting up FIFO if possible
295 */
296 outportb(SCR, 0x55);
297 if (inportb(SCR) == 0x55) {
298 /* On the off chance that SCR is actually hardwired to 0x55,
299 * do the same check with a different value.
300 */
301 outportb(SCR, 0xAA);
302 if (inportb(SCR) == 0xAA) {
303 /* The chip is better than an 8250 - it has a scratch pad */
304 outportb(SCR, i); /* Set SCR back to what it was before */
305 inportb(SCR); /* Give slow motherboards a chance */
306
307 /* Is there a FIFO ? - go through twice for slow motherboards */
308 outportb(FCR, 0x01);
309 i = inportb(FCR);
310 outportb(FCR, 0x01);
311 i = inportb(FCR);
312
313 /* Some old stuff relies on this (no idea why) */
314 outportb(FCR, 0x00);
315 inportb(FCR); /* Give slow motherboards a chance */
316
317 if ((i&0x80) == 0) {
318 smprintf(s,"UART 16450 or UART 8250 with scratch pad\n");
319 } else if ((i&0x40) == 0) {
320 smprintf(s,"UART 16550 - broken FIFO\n");
321 } else {
322 /* It's a 16450A series : try and start the FIFO.
323 * It appears that some chips need a two call protocol, but
324 * those that don't seem to work even if you do start it
325 * twice. The first call is simply to start it, the second
326 * starts it and sets an 8 byte FIFO trigger level.
327 */
328 outportb(FCR, 0x01);
329 inportb(FCR); /* Give slow motherboards a chance */
330 outportb(FCR, 0x87);
331 inportb(FCR); /* Give slow motherboards a chance */
332
333 /* Check that the FIFO initialised */
334 if ((inportb(IIR) & 0xc0) != 0xc0) {
335 /*
336 * It didn't so we assume it isn't there but disable it to
337 * be on the safe side.
338 */
339 outportb(IIR, 0xfe);
340 inportb(IIR); /* Give slow motherboards a chance */
341 smprintf(s,"UART 16450A - FIFO disabled\n");
342 } else {
343 smprintf(s,"UART 16450A - FIFO enabled\n");
344 }
345 }
346 } else {
347 smprintf(s,"UART 8250\n");
348 }
349 }
350
351 d->Control = BITS_8 | STOP_1;
352 d->Parity = false;
353 d->Speed = 9600;
354 SVAsyncSet(d->Speed,d->Control | NO_PARITY);
355
356 return ERR_NONE;
22} 357}
@@ -27,3 +362,11 @@ static GSM_Error serial_setparity(GSM_StateMachine *s, bool parity)
27 362
28 return ERR_NOTIMPLEMENTED; 363 d->Parity = parity;
364
365 if (parity) {
366 SVAsyncSet(d->Speed, d->Control | ODD_PARITY);
367 } else {
368 SVAsyncSet(d->Speed, d->Control | NO_PARITY);
369 }
370
371 return ERR_NONE;
29} 372}
@@ -32,5 +375,13 @@ static GSM_Error serial_setdtrrts(GSM_StateMachine *s, bool dtr, bool rts)
32{ 375{
33 GSM_Device_SerialData *d = &s->Device.Data.Serial; 376 if (dtr && rts) {
377 SVAsyncHand(DTR | RTS);
378 } else if (dtr) {
379 SVAsyncHand(DTR);
380 } else if (rts) {
381 SVAsyncHand(RTS);
382 } else {
383 SVAsyncHand(0);
384 }
34 385
35 return ERR_NOTIMPLEMENTED; 386 return ERR_NONE;
36} 387}
@@ -41,17 +392,35 @@ static GSM_Error serial_setspeed(GSM_StateMachine *s, int speed)
41 392
42 return ERR_NOTIMPLEMENTED; 393 d->Speed = speed;
394
395 if (d->Parity) {
396 SVAsyncSet(d->Speed, d->Control | ODD_PARITY);
397 } else {
398 SVAsyncSet(d->Speed, d->Control | NO_PARITY);
399 }
400
401 return ERR_NONE;
43} 402}
44 403
45static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) 404static int serial_read(GSM_StateMachine *s, char *buf, size_t nbytes)
46{ 405{
47 GSM_Device_SerialData *d = &s->Device.Data.Serial; 406 if(RecTail == RecHead) return 0;
407
408 disable();
409 buf[0] = RecBuffer[RecTail++];
410 if(RecTail >= BufSize) RecTail = 0;
411 enable();
48 412
49 return 0; 413 return 1;
50} 414}
51 415
52static int serial_write(GSM_StateMachine *s, void *buf, size_t nbytes) 416static int serial_write(GSM_StateMachine *s, char *buf, size_t nbytes)
53{ 417{
54 GSM_Device_SerialData *d = &s->Device.Data.Serial; 418 int i;
419
420 for (i=0;i<nbytes;i++) {
421 while(~inportb(LSR) & 0x20);
422 outportb(THR, buf[i]);
423 }
55 424
56 return 0; 425 return i;
57} 426}
diff --git a/gammu/emb/common/device/serial/ser_djg.h b/gammu/emb/common/device/serial/ser_djg.h
index b35b282..3bb2a5b 100644
--- a/gammu/emb/common/device/serial/ser_djg.h
+++ b/gammu/emb/common/device/serial/ser_djg.h
@@ -1 +1,5 @@
1/* Some sources from SVAsync (c) 1996, 1997, Samuel Vincent
2 * 7337 Carioca Ct, Rohnert Park, Ca 94928
3 * "you may freely use it in your programs without paying me anything"
4 */
1 5
@@ -6,5 +10,36 @@
6typedef struct { 10typedef struct {
7 int hPhone; 11 int hPhone;
12 int Speed;
13 unsigned int Control;
14 bool Parity;
8} GSM_Device_SerialData; 15} GSM_Device_SerialData;
9 16
17/* Defines for Com Port Paramaters, the second paramater to SVAsyncSet() */
18#define BITS_8 0x03
19#define BITS_7 0x02
20#define STOP_1 0x00
21#define STOP_2 0x04
22#define EVEN_PARITY 0x18
23#define ODD_PARITY 0x08
24#define NO_PARITY 0x00
25
26/* Defines for SVAsyncHand() */
27#define DTR 0x01
28#define RTS 0x02
29#define USER 0x04
30#define LOOPBACK 0x10
31
32/* Defines for SVAsyncStat() */
33 #define D_CTS 0x0100
34 #define D_DSR 0x0200
35#define D_RI 0x0400
36 #define D_DCD 0x0800
37#define CTS 0x1000
38#define DSR 0x2000
39#define RI 0x4000
40#define DCD 0x8000
41 #define PARITY 0x0004
42#define THREMPTY 0x0020
43#define BREAKDET 0x1000
44
10#endif 45#endif
diff --git a/gammu/emb/common/device/serial/ser_unx.c b/gammu/emb/common/device/serial/ser_unx.c
index 69c7515..18b5f6f 100644
--- a/gammu/emb/common/device/serial/ser_unx.c
+++ b/gammu/emb/common/device/serial/ser_unx.c
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
@@ -62,4 +71,4 @@ static GSM_Error serial_open (GSM_StateMachine *s)
62 GSM_Device_SerialData *d = &s->Device.Data.Serial; 71 GSM_Device_SerialData *d = &s->Device.Data.Serial;
63 struct termios t; 72 struct termios t;
64 int i; 73 int i;
65 74
@@ -126,3 +135,3 @@ static GSM_Error serial_setparity(GSM_StateMachine *s, bool parity)
126 GSM_Device_SerialData *d = &s->Device.Data.Serial; 135 GSM_Device_SerialData *d = &s->Device.Data.Serial;
127 struct termios t; 136 struct termios t;
128 137
@@ -152,4 +161,4 @@ static GSM_Error serial_setdtrrts(GSM_StateMachine *s, bool dtr, bool rts)
152 GSM_Device_SerialData *d = &s->Device.Data.Serial; 161 GSM_Device_SerialData *d = &s->Device.Data.Serial;
153 struct termios t; 162 struct termios t;
154 unsigned int flags; 163 unsigned int flags;
155 164
@@ -266,4 +275,4 @@ static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes)
266 struct timeval timeout2; 275 struct timeval timeout2;
267 fd_set readfds; 276 fd_set readfds;
268 int actual = 0; 277 int actual = 0;
269 278
@@ -285,4 +294,4 @@ static int serial_write(GSM_StateMachine *s, void *buf, size_t nbytes)
285 GSM_Device_SerialData *d = &s->Device.Data.Serial; 294 GSM_Device_SerialData *d = &s->Device.Data.Serial;
286 int ret; 295 int ret;
287 size_t actual = 0; 296 size_t actual = 0;
288 297
diff --git a/gammu/emb/common/device/serial/ser_w32.c b/gammu/emb/common/device/serial/ser_w32.c
index 7d88fc7..a7919fe 100644
--- a/gammu/emb/common/device/serial/ser_w32.c
+++ b/gammu/emb/common/device/serial/ser_w32.c
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
diff --git a/gammu/emb/common/gsmstate.c b/gammu/emb/common/gsmstate.c
index 31e365d..c65dc01 100644
--- a/gammu/emb/common/gsmstate.c
+++ b/gammu/emb/common/gsmstate.c
@@ -556,3 +556,3 @@ static GSM_Error CheckReplyFunctions(GSM_StateMachine *s, GSM_Reply_Function *Re
556 int i = 0; 556 int i = 0;
557 //int j; 557 // int j;
558 558
@@ -872,2 +872,3 @@ static OnePhoneModel allmodels[] = {
872 {"3100b","RH-50" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}},//fixme 872 {"3100b","RH-50" ,"", {F_PBKTONEGAL,F_PBKSMSLIST,0}},//fixme
873 {"3105" ,"RH-48" ,"Nokia 3105",{F_PBKTONEGAL,F_PBKSMSLIST,F_VOICETAGS,0}},//fixme
873 {"3108", "RH-6", "Nokia 3108",{0}}, //does it have irda ? 874 {"3108", "RH-6", "Nokia 3108",{0}}, //does it have irda ?
@@ -956,4 +957,4 @@ static OnePhoneModel allmodels[] = {
956 {"6800" ,"NHL-6" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}}, 957 {"6800" ,"NHL-6" ,"Nokia 6800", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}},
957 {"6810" ,"RM-2" ,"Nokia 6810", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}},//quess 958 {"6810" ,"RM-2" ,"Nokia 6810", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,F_NOTES,0}},//quess
958 {"6820" ,"NHL-9" ,"Nokia 6820", {F_PBKTONEGAL,F_TODO66,F_RADIO,F_PBKSMSLIST,0}},//quess 959 {"6820" ,"NHL-9" ,"Nokia 6820", {F_PBKTONEGAL,F_TODO66,F_PBKSMSLIST,F_NOTES,0}},//quess
959#endif 960#endif
diff --git a/gammu/emb/common/gsmstate.h b/gammu/emb/common/gsmstate.h
index 2b4806c..6861fbc 100644
--- a/gammu/emb/common/gsmstate.h
+++ b/gammu/emb/common/gsmstate.h
@@ -380,2 +380,3 @@ typedef enum {
380 ID_GetNote, 380 ID_GetNote,
381 ID_SetNote,
381 ID_GetSignalQuality, 382 ID_GetSignalQuality,
@@ -1292,5 +1293,30 @@ typedef struct {
1292 /** 1293 /**
1293 * Gets note. 1294 * Retrieves notes status (number of used entries).
1294 */ 1295 */
1295 GSM_Error (*GetNextNote)(GSM_StateMachine *s, GSM_NoteEntry *Note, bool refresh); 1296 GSM_Error (*GetNotesStatus) (GSM_StateMachine *s, GSM_ToDoStatus *status);
1297 /**
1298 * Retrieves notes entry.
1299 */
1300 GSM_Error (*GetNote) (GSM_StateMachine *s, GSM_NoteEntry *Note);
1301 /**
1302 * Retrieves note entry. This is useful for continuous reading of all
1303 * notes entries.
1304 */
1305 GSM_Error (*GetNextNote) (GSM_StateMachine *s, GSM_NoteEntry *Note, bool start);
1306 /**
1307 * Sets note entry
1308 */
1309 GSM_Error (*SetNote) (GSM_StateMachine *s, GSM_NoteEntry *Note);
1310 /**
1311 * Adds note entry.
1312 */
1313 GSM_Error (*AddNote) (GSM_StateMachine *s, GSM_NoteEntry *Note);
1314 /**
1315 * Deletes note entry.
1316 */
1317 GSM_Error (*DeleteNote) (GSM_StateMachine *s, GSM_NoteEntry *Note);
1318 /**
1319 * Deletes all notes entries.
1320 */
1321 GSM_Error (*DeleteAllNotes) (GSM_StateMachine *s);
1296 /** 1322 /**
diff --git a/gammu/emb/common/phone/alcatel/alcatel.c b/gammu/emb/common/phone/alcatel/alcatel.c
index 3821f13..b75077f 100644
--- a/gammu/emb/common/phone/alcatel/alcatel.c
+++ b/gammu/emb/common/phone/alcatel/alcatel.c
@@ -3981,3 +3981,9 @@ GSM_Phone_Functions ALCATELPhone = {
3981 NOTSUPPORTED, /* SetCalendarSettings*/ 3981 NOTSUPPORTED, /* SetCalendarSettings*/
3982 NOTSUPPORTED, /* GetNoteStatus */
3983 NOTSUPPORTED, /* GetNote */
3982 NOTSUPPORTED, /* GetNextNote */ 3984 NOTSUPPORTED, /* GetNextNote */
3985 NOTSUPPORTED, /* SetNote */
3986 NOTSUPPORTED, /* AddNote */
3987 NOTSUPPORTED, /* DeleteNote */
3988 NOTSUPPORTED, /* DeleteAllNotes */
3983 NOTSUPPORTED, /* GetProfile */ 3989 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/at/atgen.c b/gammu/emb/common/phone/at/atgen.c
index ba23eb2..a875f0a 100644
--- a/gammu/emb/common/phone/at/atgen.c
+++ b/gammu/emb/common/phone/at/atgen.c
@@ -698,3 +698,3 @@ GSM_Error ATGEN_SetSMSC(GSM_StateMachine *s, GSM_SMSC *smsc)
698 698
699 if (smsc->Location!=1) return ERR_NOTSUPPORTED; 699 if (smsc->Location!=1) return ERR_INVALIDLOCATION;
700 700
@@ -3841,3 +3841,9 @@ GSM_Phone_Functions ATGENPhone = {
3841 NOTSUPPORTED, /* SetCalendarSettings*/ 3841 NOTSUPPORTED, /* SetCalendarSettings*/
3842 NOTSUPPORTED, /* GetNoteStatus */
3843 NOTSUPPORTED, /* GetNote */
3842 NOTSUPPORTED, /* GetNextNote */ 3844 NOTSUPPORTED, /* GetNextNote */
3845 NOTSUPPORTED, /* SetNote */
3846 NOTSUPPORTED, /* AddNote */
3847 NOTSUPPORTED, /* DeleteNote */
3848 NOTSUPPORTED, /* DeleteAllNotes */
3843 NOTSUPPORTED, /* GetProfile */ 3849 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/at/sonyeric.c b/gammu/emb/common/phone/at/sonyeric.c
index 8eeb39b..363e043 100644
--- a/gammu/emb/common/phone/at/sonyeric.c
+++ b/gammu/emb/common/phone/at/sonyeric.c
@@ -16,3 +16,3 @@
16 16
17#ifdef GSM_ENABLE_OBEXGEN 17#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
18 18
@@ -20,2 +20,3 @@
20 20
21 extern GSM_Protocol_Functions OBEXProtocol;
21 extern GSM_Reply_FunctionOBEXGENReplyFunctions[]; 22 extern GSM_Reply_FunctionOBEXGENReplyFunctions[];
@@ -126,3 +127,3 @@ GSM_Error SONYERIC_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note,
126{ 127{
127#ifdef GSM_ENABLE_OBEXGEN 128#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
128 GSM_Error error; 129 GSM_Error error;
@@ -162,3 +163,3 @@ GSM_Error SONYERIC_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, bool st
162{ 163{
163#ifdef GSM_ENABLE_OBEXGEN 164#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
164 GSM_Error error; 165 GSM_Error error;
@@ -201,3 +202,3 @@ GSM_Error SONYERIC_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
201{ 202{
202#ifdef GSM_ENABLE_OBEXGEN 203#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
203 GSM_Error error; 204 GSM_Error error;
@@ -232,3 +233,3 @@ GSM_Error SONYERIC_AddCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry *Note)
232{ 233{
233#ifdef GSM_ENABLE_OBEXGEN 234#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
234 unsigned char req[5000]; 235 unsigned char req[5000];
@@ -248,3 +249,3 @@ GSM_Error SONYERIC_AddToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
248{ 249{
249#ifdef GSM_ENABLE_OBEXGEN 250#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
250 GSM_Phone_ATGENData*Priv = &s->Phone.Data.Priv.ATGEN; 251 GSM_Phone_ATGENData*Priv = &s->Phone.Data.Priv.ATGEN;
@@ -267,3 +268,3 @@ GSM_Error SONYERIC_DeleteAllToDo(GSM_StateMachine *s)
267{ 268{
268#ifdef GSM_ENABLE_OBEXGEN 269#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
269 GSM_Error error; 270 GSM_Error error;
@@ -319,3 +320,3 @@ GSM_Error SONYERIC_DelCalendarNote(GSM_StateMachine *s, GSM_CalendarEntry *Note)
319{ 320{
320#ifdef GSM_ENABLE_OBEXGEN 321#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
321 GSM_Error error; 322 GSM_Error error;
@@ -374,3 +375,3 @@ GSM_Error SONYERIC_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *St
374{ 375{
375#ifdef GSM_ENABLE_OBEXGEN 376#if defined(GSM_ENABLE_BLUEOBEX) || defined(GSM_ENABLE_IRDAOBEX)
376 GSM_Error error; 377 GSM_Error error;
diff --git a/gammu/emb/common/phone/nokia/dct3/dct3func.c b/gammu/emb/common/phone/nokia/dct3/dct3func.c
index 17cd0a4..9810a35 100644
--- a/gammu/emb/common/phone/nokia/dct3/dct3func.c
+++ b/gammu/emb/common/phone/nokia/dct3/dct3func.c
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
@@ -459,6 +468,6 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s
459 if (msg.Buffer[8]<0x03) { 468 if (msg.Buffer[8]<0x03) {
460 sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[10], msg.Buffer[11]); 469 sprintf(NetInfo.CID, "%02X%02X", msg.Buffer[10], msg.Buffer[11]);
461 smprintf(s, "CID : %s\n", NetInfo.CID); 470 smprintf(s, "CID : %s\n", NetInfo.CID);
462 471
463 sprintf(NetInfo.LAC, "%02x%02x", msg.Buffer[12], msg.Buffer[13]); 472 sprintf(NetInfo.LAC, "%02X%02X", msg.Buffer[12], msg.Buffer[13]);
464 smprintf(s, "LAC : %s\n", NetInfo.LAC); 473 smprintf(s, "LAC : %s\n", NetInfo.LAC);
@@ -513,4 +522,4 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s
513 NOKIA_DecodeNetworkCode(msg.Buffer+14,Data->NetworkInfo->NetworkCode); 522 NOKIA_DecodeNetworkCode(msg.Buffer+14,Data->NetworkInfo->NetworkCode);
514 sprintf(Data->NetworkInfo->CID, "%02x%02x", msg.Buffer[10], msg.Buffer[11]); 523 sprintf(Data->NetworkInfo->CID, "%02X%02X", msg.Buffer[10], msg.Buffer[11]);
515 sprintf(Data->NetworkInfo->LAC, "%02x%02x", msg.Buffer[12], msg.Buffer[13]); 524 sprintf(Data->NetworkInfo->LAC, "%02X%02X", msg.Buffer[12], msg.Buffer[13]);
516 } 525 }
diff --git a/gammu/emb/common/phone/nokia/dct3/n0650.c b/gammu/emb/common/phone/nokia/dct3/n0650.c
new file mode 100644
index 0000000..3899a16
--- a/dev/null
+++ b/gammu/emb/common/phone/nokia/dct3/n0650.c
@@ -0,0 +1,150 @@
1/* (c) 2004 by Marcin Wiacek */
2
3#include <string.h>
4#include <time.h>
5
6#include "../../../gsmcomon.h"
7#include "../../../gsmstate.h"
8#include "../nfunc.h"
9
10#ifdef GSM_ENABLE_NOKIA650
11
12static GSM_Reply_Function N650ReplyFunctions[] = {
13 {DCT3DCT4_ReplyGetModelFirmware,"\xD2",0x02,0x00,ID_GetModel },
14 {DCT3DCT4_ReplyGetModelFirmware,"\xD2",0x02,0x00,ID_GetFirmware },
15
16 {NULL, "\x00",0x00,0x00,ID_None }
17};
18
19GSM_Phone_Functions N650Phone = {
20 "0650",
21 N650ReplyFunctions,
22 NONEFUNCTION, /* Initialise */
23 NONEFUNCTION, /* Terminate */
24 GSM_DispatchMessage,
25 NOTSUPPORTED, /* ShowStartInfo */
26 NOKIA_GetManufacturer,
27 DCT3DCT4_GetModel,
28 DCT3DCT4_GetFirmware,
29 NOTSUPPORTED, /* GetIMEI */
30 NOTSUPPORTED, /* GetOriginalIMEI */
31 NOTSUPPORTED, /* GetManufactureMonth*/
32 NOTSUPPORTED, /* GetProductCode */
33 NOTSUPPORTED, /* GetHardware */
34 NOTSUPPORTED, /* GetPPM */
35 NOTSUPPORTED, /* GetSIMIMSI */
36 NOTSUPPORTED, /* GetDateTime */
37 NOTSUPPORTED, /* SetDateTime */
38 NOTSUPPORTED, /* GetAlarm */
39 NOTSUPPORTED, /* SetAlarm */
40 NOTSUPPORTED, /* GetLocale */
41 NOTSUPPORTED, /* SetLocale */
42 NOTSUPPORTED, /* PressKey */
43 NOTSUPPORTED, /* Reset */
44 NOTSUPPORTED, /* ResetPhoneSettings*/
45 NOTSUPPORTED, /* EnterSecurityCode*/
46 NOTSUPPORTED, /* GetSecurityStatus*/
47 NOTSUPPORTED, /* GetDisplayStatus*/
48 NOTSUPPORTED, /* SetAutoNetworkLogin*/
49 NOTSUPPORTED, /* GetBatteryCharge*/
50 NOTSUPPORTED, /* GetSignalQuality*/
51 NOTSUPPORTED, /* GetNetworkInfo */
52 NOTSUPPORTED, /* GetCategory */
53 NOTSUPPORTED, /* AddCategory */
54 NOTSUPPORTED, /* GetCategoryStatus */
55 NOTSUPPORTED, /* GetMemoryStatus */
56 NOTSUPPORTED, /* GetMemory */
57 NOTSUPPORTED, /* GetNextMemory */
58 NOTSUPPORTED, /* SetMemory */
59 NOTSUPPORTED, /* AddMemory */
60 NOTSUPPORTED, /* DeleteMemory */
61 NOTIMPLEMENTED, /* DeleteAllMemory */
62 NOTSUPPORTED, /* GetSpeedDial */
63 NOTSUPPORTED, /* SetSpeedDial */
64 NOTSUPPORTED, /* GetSMSC */
65 NOTSUPPORTED, /* SetSMSC */
66 NOTSUPPORTED, /* GetSMSStatus */
67 NOTSUPPORTED, /* GetSMS */
68 NOTSUPPORTED, /* GetNextSMS */
69 NOTSUPPORTED, /* SetSMS */
70 NOTSUPPORTED, /* AddSMS */
71 NOTSUPPORTED, /* DeleteSMS */
72 NOTSUPPORTED, /* SendSMSMessage */
73 NOTSUPPORTED, /* SendSavedSMS */
74 NOTSUPPORTED, /* SetIncomingSMS */
75 NOTSUPPORTED, /* SetIncomingCB */
76 NOTSUPPORTED, /* GetSMSFolders */
77 NOTSUPPORTED, /* AddSMSFolder */
78 NOTSUPPORTED, /* DeleteSMSFolder */
79 NOTSUPPORTED, /* DialVoice */
80 NOTSUPPORTED, /* AnswerCall */
81 NOTSUPPORTED, /* CancelCall */
82 NOTSUPPORTED, /* HoldCall */
83 NOTSUPPORTED, /* UnholdCall */
84 NOTSUPPORTED, /* ConferenceCall */
85 NOTSUPPORTED, /* SplitCall */
86 NOTSUPPORTED, /* TransferCall */
87 NOTSUPPORTED, /* SwitchCall */
88 NOTSUPPORTED, /* GetCallDivert */
89 NOTSUPPORTED, /* SetCallDivert */
90 NOTSUPPORTED, /* CancelAllDiverts*/
91 NOTSUPPORTED, /* SetIncomingCall */
92 NOTSUPPORTED, /* SetIncomingUSSD */
93 NOTSUPPORTED, /* SendDTMF */
94 NOTSUPPORTED, /* GetRingtone */
95 NOTSUPPORTED, /* SetRingtone */
96 NOTSUPPORTED, /* GetRingtonesInfo*/
97 NOTSUPPORTED, /* DeleteUserRingtones*/
98 NOTSUPPORTED, /* PlayTone */
99 NOTSUPPORTED, /* GetWAPBookmark */
100 NOTSUPPORTED, /* SetWAPBookmark */
101 NOTSUPPORTED, /* DeleteWAPBookmark */
102 NOTSUPPORTED, /* GetWAPSettings */
103 NOTSUPPORTED, /* SetWAPSettings */
104 NOTSUPPORTED, /* GetMMSSettings */
105 NOTSUPPORTED, /* SetMMSSettings */
106 NOTSUPPORTED, /* GetBitmap */
107 NOTSUPPORTED, /* SetBitmap */
108 NOTSUPPORTED, /* GetToDoStatus */
109 NOTSUPPORTED, /* GetToDo */
110 NOTSUPPORTED, /* GetNextToDo */
111 NOTSUPPORTED, /* SetToDo */
112 NOTSUPPORTED, /* AddToDo */
113 NOTSUPPORTED, /* DeleteToDo */
114 NOTSUPPORTED, /* DeleteAllToDo */
115 NOTSUPPORTED, /* GetCalendarStatus*/
116 NOTSUPPORTED, /* GetCalendar */
117 NOTSUPPORTED, /* GetNextCalendar */
118 NOTSUPPORTED, /* SetCalendar */
119 NOTSUPPORTED, /* AddCalendar */
120 NOTSUPPORTED, /* DeleteCalendar */
121 NOTSUPPORTED, /* DeleteAllCalendar*/
122 NOTSUPPORTED, /* GetCalendarSettings*/
123 NOTSUPPORTED, /* SetCalendarSettings*/
124 NOTSUPPORTED, /* GetNoteStatus */
125 NOTSUPPORTED, /* GetNote */
126 NOTSUPPORTED, /* GetNextNote */
127 NOTSUPPORTED, /* SetNote */
128 NOTSUPPORTED, /* AddNote */
129 NOTSUPPORTED, /* DeleteNote */
130 NOTSUPPORTED, /* DeleteAllNotes */
131 NOTSUPPORTED, /* GetProfile */
132 NOTSUPPORTED, /* SetProfile */
133 NOTSUPPORTED, /* GetFMStation */
134 NOTSUPPORTED, /* SetFMStation */
135 NOTSUPPORTED, /* ClearFMStations */
136 NOTSUPPORTED, /* GetNextFileFolder*/
137 NOTSUPPORTED, /* GetFilePart */
138 NOTSUPPORTED, /* AddFilePart */
139 NOTSUPPORTED, /* GetFileSystemStatus*/
140 NOTSUPPORTED, /* DeleteFile */
141 NOTSUPPORTED, /* AddFolder */
142 NOTSUPPORTED, /* GetGPRSAccessPoint*/
143 NOTSUPPORTED /* SetGPRSAccessPoint*/
144};
145
146#endif
147
148/* How should editor hadle tabs in this file? Add editor commands here.
149 * vim: noexpandtab sw=8 ts=8 sts=8:
150 */
diff --git a/gammu/emb/common/phone/nokia/dct3/n0650.h b/gammu/emb/common/phone/nokia/dct3/n0650.h
new file mode 100644
index 0000000..be491eb
--- a/dev/null
+++ b/gammu/emb/common/phone/nokia/dct3/n0650.h
@@ -0,0 +1,18 @@
1/* (c) 2004 by Marcin Wiacek */
2
3#ifndef n650_h
4#define n650_h
5
6typedef struct {
7 int fake;
8} GSM_Phone_N650Data;
9
10#ifndef GSM_USED_MBUS2
11# define GSM_USED_MBUS2
12#endif
13
14#endif
15
16/* How should editor hadle tabs in this file? Add editor commands here.
17 * vim: noexpandtab sw=8 ts=8 sts=8:
18 */
diff --git a/gammu/emb/common/phone/nokia/dct3/n6110.c b/gammu/emb/common/phone/nokia/dct3/n6110.c
index dac6c12..c3ddfb6 100644
--- a/gammu/emb/common/phone/nokia/dct3/n6110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n6110.c
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
@@ -2870,3 +2879,9 @@ GSM_Phone_Functions N6110Phone = {
2870 NOTSUPPORTED, /* SetCalendarSettings */ 2879 NOTSUPPORTED, /* SetCalendarSettings */
2871 NOTSUPPORTED, /* GetNextNote */ 2880 NOTSUPPORTED, /* GetNoteStatus */
2881 NOTSUPPORTED, /* GetNote */
2882 NOTSUPPORTED, /* GetNextNote */
2883 NOTSUPPORTED, /* SetNote */
2884 NOTSUPPORTED, /* AddNote */
2885 NOTSUPPORTED, /* DeleteNote */
2886 NOTSUPPORTED, /* DeleteAllNotes */
2872 N6110_GetProfile, 2887 N6110_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/dct3/n7110.c b/gammu/emb/common/phone/nokia/dct3/n7110.c
index b597f9b..a8e0545 100644
--- a/gammu/emb/common/phone/nokia/dct3/n7110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n7110.c
@@ -5,2 +5,11 @@
5 */ 5 */
6/* Due to a problem in the source code management, the names of some of
7 * the authors have unfortunately been lost. We do not mean to belittle
8 * their efforts and hope they will contact us to see their names
9 * properly added to the Copyright notice above.
10 * Having published their contributions under the terms of the GNU
11 * General Public License (GPL) [version 2], the Copyright of these
12 * authors will remain respected by adhering to the license they chose
13 * to publish their code under.
14 */
6 15
@@ -1708,3 +1717,9 @@ GSM_Phone_Functions N7110Phone = {
1708 NOTSUPPORTED, /* SetCalendarSettings*/ 1717 NOTSUPPORTED, /* SetCalendarSettings*/
1718 NOTSUPPORTED, /* GetNoteStatus */
1719 NOTSUPPORTED, /* GetNote */
1709 NOTSUPPORTED, /* GetNextNote */ 1720 NOTSUPPORTED, /* GetNextNote */
1721 NOTSUPPORTED, /* SetNote */
1722 NOTSUPPORTED, /* AddNote */
1723 NOTSUPPORTED, /* DeleteNote */
1724 NOTSUPPORTED, /* DeleteAllNotes */
1710 N7110_GetProfile, 1725 N7110_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/dct3/n9210.c b/gammu/emb/common/phone/nokia/dct3/n9210.c
index ff71ad3..f535c2a 100644
--- a/gammu/emb/common/phone/nokia/dct3/n9210.c
+++ b/gammu/emb/common/phone/nokia/dct3/n9210.c
@@ -376,3 +376,9 @@ GSM_Phone_Functions N9210Phone = {
376 NOTSUPPORTED, /* SetCalendarSettings*/ 376 NOTSUPPORTED, /* SetCalendarSettings*/
377 NOTSUPPORTED, /* GetNoteStatus */
378 NOTSUPPORTED, /* GetNote */
377 NOTSUPPORTED, /* GetNextNote */ 379 NOTSUPPORTED, /* GetNextNote */
380 NOTSUPPORTED, /* SetNote */
381 NOTSUPPORTED, /* AddNote */
382 NOTSUPPORTED, /* DeleteNote */
383 NOTSUPPORTED, /* DeleteAllNotes */
378 NOTIMPLEMENTED, /* GetProfile */ 384 NOTIMPLEMENTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3320.c b/gammu/emb/common/phone/nokia/dct4/n3320.c
index 9b1d6cd..9dd9ffb 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3320.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3320.c
@@ -251,3 +251,9 @@ GSM_Phone_Functions N3320Phone = {
251 NOTSUPPORTED, /* SetCalendarSettings*/ 251 NOTSUPPORTED, /* SetCalendarSettings*/
252 NOTSUPPORTED, /* GetNoteStatus */
253 NOTSUPPORTED, /* GetNote */
252 NOTSUPPORTED, /* GetNextNote */ 254 NOTSUPPORTED, /* GetNextNote */
255 NOTSUPPORTED, /* SetNote */
256 NOTSUPPORTED, /* AddNote */
257 NOTSUPPORTED, /* DeleteNote */
258 NOTSUPPORTED, /* DeleteAllNotes */
253 NOTSUPPORTED, /* GetProfile */ 259 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n3650.c b/gammu/emb/common/phone/nokia/dct4/n3650.c
index d4746a7..f1fa826 100644
--- a/gammu/emb/common/phone/nokia/dct4/n3650.c
+++ b/gammu/emb/common/phone/nokia/dct4/n3650.c
@@ -372,3 +372,9 @@ GSM_Phone_Functions N3650Phone = {
372 NOTSUPPORTED, /* SetCalendarSettings*/ 372 NOTSUPPORTED, /* SetCalendarSettings*/
373 NOTSUPPORTED, /* GetNoteStatus */
374 NOTSUPPORTED, /* GetNote */
373 NOTSUPPORTED, /* GetNextNote */ 375 NOTSUPPORTED, /* GetNextNote */
376 NOTSUPPORTED, /* SetNote */
377 NOTSUPPORTED, /* AddNote */
378 NOTSUPPORTED, /* DeleteNote */
379 NOTSUPPORTED, /* DeleteAllNotes */
374 NOTSUPPORTED, /* GetProfile */ 380 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/nokia/dct4/n6510.c b/gammu/emb/common/phone/nokia/dct4/n6510.c
index 2208def..c481863 100644
--- a/gammu/emb/common/phone/nokia/dct4/n6510.c
+++ b/gammu/emb/common/phone/nokia/dct4/n6510.c
@@ -6,2 +6,11 @@
6/* function for making CRC for filesystem (c) 2003 by Michael Schroeder */ 6/* function for making CRC for filesystem (c) 2003 by Michael Schroeder */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
@@ -288,6 +297,6 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa
288 297
289 sprintf(NetInfo.LAC,"%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]); 298 sprintf(NetInfo.LAC,"%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]);
290 smprintf(s, "LAC : %s\n", NetInfo.LAC); 299 smprintf(s, "LAC : %s\n", NetInfo.LAC);
291 300
292 sprintf(NetInfo.CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]); 301 sprintf(NetInfo.CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]);
293 smprintf(s, "CID : %s\n", NetInfo.CID); 302 smprintf(s, "CID : %s\n", NetInfo.CID);
@@ -313,4 +322,4 @@ static GSM_Error N6510_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMa
313 NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,Data->NetworkInfo->NetworkName,true); 322 NOKIA_GetUnicodeString(s, &tmp, msg.Buffer,Data->NetworkInfo->NetworkName,true);
314 sprintf(Data->NetworkInfo->LAC, "%02x%02x", msg.Buffer[current+1], msg.Buffer[current+2]); 323 sprintf(Data->NetworkInfo->LAC, "%02X%02X", msg.Buffer[current+1], msg.Buffer[current+2]);
315 sprintf(Data->NetworkInfo->CID, "%02x%02x", msg.Buffer[current+5], msg.Buffer[current+6]); 324 sprintf(Data->NetworkInfo->CID, "%02X%02X", msg.Buffer[current+5], msg.Buffer[current+6]);
316 NOKIA_DecodeNetworkCode(msg.Buffer + (current+7),Data->NetworkInfo->NetworkCode); 325 NOKIA_DecodeNetworkCode(msg.Buffer + (current+7),Data->NetworkInfo->NetworkCode);
@@ -1129,6 +1138,4 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
1129 int Width, Height, i, count; 1138 int Width, Height, i, count;
1130#ifdef DEVELOP
1131 unsigned char folderid; 1139 unsigned char folderid;
1132 int location; 1140 int location;
1133#endif
1134 GSM_NetworkInfo NetInfo; 1141 GSM_NetworkInfo NetInfo;
@@ -1257,3 +1264,2 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
1257 if (error == ERR_NONE) { 1264 if (error == ERR_NONE) {
1258#ifdef DEVELOP
1259 sms.Folder = 0; 1265 sms.Folder = 0;
@@ -1267,5 +1273,2 @@ static GSM_Error N6510_SetBitmap(GSM_StateMachine *s, GSM_Bitmap *Bitmap)
1267 reqPicture[7]=location; 1273 reqPicture[7]=location;
1268#else
1269 return ERR_NOTSUPPORTED;
1270#endif
1271 } 1274 }
@@ -2421,2 +2424,5 @@ static GSM_Error N6510_ReplySaveSMSMessage(GSM_Protocol_Message msg, GSM_StateMa
2421 return ERR_INVALIDLOCATION; 2424 return ERR_INVALIDLOCATION;
2425 case 0x03:
2426 printf("Memory full (for example no empty space in SIM)\n");
2427 return ERR_FULL;
2422 case 0x05: 2428 case 0x05:
@@ -2678,2 +2684,4 @@ static GSM_Error N6510_ReplyGetRingtonesInfo(GSM_Protocol_Message msg, GSM_State
2678 Data->RingtonesInfo->Number = msg.Buffer[4] * 256 + msg.Buffer[5]; 2684 Data->RingtonesInfo->Number = msg.Buffer[4] * 256 + msg.Buffer[5];
2685 // allocate array of ringtones based on number
2686 Data->RingtonesInfo->Ringtone = calloc(Data->RingtonesInfo->Number, sizeof(GSM_RingtoneInfo));
2679 tmp = 6; 2687 tmp = 6;
@@ -2756,3 +2764,3 @@ static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
2756{ 2764{
2757 GSM_AllRingtonesInfo Info; 2765 GSM_AllRingtonesInfo Info = {0, NULL};
2758 GSM_Error error; 2766 GSM_Error error;
@@ -2776,3 +2784,5 @@ static GSM_Error N6510_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone,
2776 smprintf(s, "Getting binary ringtone\n"); 2784 smprintf(s, "Getting binary ringtone\n");
2777 return GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone); 2785 error = GSM_WaitFor (s, req2, 6, 0x1f, 4, ID_GetRingtone);
2786 if (Info.Ringtone) free(Info.Ringtone);
2787 return error;
2778 case RING_MIDI: 2788 case RING_MIDI:
@@ -4056,2 +4066,93 @@ GSM_Error N6510_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, bool start
4056 4066
4067static GSM_Error N6510_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Not)
4068{
4069 GSM_Error error;
4070 GSM_NOKIACalToDoLocations *LastNote = &s->Phone.Data.Priv.N6510.LastNote;
4071 GSM_CalendarEntry Note;
4072
4073 if (!IsPhoneFeatureAvailable(s->Phone.Data.ModelInfo, F_NOTES)) return ERR_NOTSUPPORTED;
4074
4075 error=N6510_GetCalendarInfo3(s,LastNote,2);
4076 if (error!=ERR_NONE) return error;
4077
4078 smprintf(s, "Deleting Note\n");
4079
4080 if (Not->Location > LastNote->Number || Not->Location == 0) return ERR_INVALIDLOCATION;
4081
4082 Note.Location = LastNote->Location[Not->Location-1];
4083 return N71_65_DelCalendar(s,&Note);
4084}
4085
4086static GSM_Error N6510_ReplyGetNoteFirstLoc(GSM_Protocol_Message msg, GSM_StateMachine *s)
4087{
4088 smprintf(s, "First Note location: %i\n",msg.Buffer[8]*256+msg.Buffer[9]);
4089 s->Phone.Data.Note->Location = msg.Buffer[8]*256+msg.Buffer[9];
4090 return ERR_NONE;
4091}
4092
4093static GSM_Error N6510_ReplyAddNote(GSM_Protocol_Message msg, GSM_StateMachine *s)
4094{
4095 smprintf(s, "ToDo added\n");
4096 return ERR_NONE;
4097}
4098
4099static GSM_Error N6510_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Not)
4100{
4101 GSM_Error error;
4102 int count=54;
4103 unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95,
4104 0x02};/* 1 = todo, 2 = note */
4105 unsigned char req[5000] = {
4106 N6110_FRAME_HEADER, 0x65,
4107 0x02, /* 0 = calendar, 1 = todo, 2 = note */
4108 0x00, 0x00, 0x00,
4109 0x00, 0x00, /* location */
4110 0x00, 0x00, 0x00, 0x00,
4111 0xFF, 0xFF, 0xFF, 0xFF, /* alarm */
4112 0x80, 0x00, 0x00,
4113 0xA9, /* note icon */
4114 0x00, 0x00, 0x00, 0x00, /* alarm type */
4115 0x00, /* 0x02 or 0x00 */
4116 0x80, /* note type */
4117 0x07, 0xD2, 0x01, 0x01, 0x00, 0x00, /* start date/time */
4118 0x07, 0xD2, 0x01, 0x11, 0x00, 0x00, /* end date/time */
4119 0x00, 0x00, /* recurrance */
4120 0xFF, 0xFF, /* birth year */
4121 0x00, /* ToDo priority */
4122 0x00, /* ToDo completed ? */
4123 0x00, 0x00, 0x00,
4124 0x00, /* note text length */
4125 0x00, /* phone length/meeting place */
4126 0x00, 0x00, 0x00};
4127
4128 s->Phone.Data.Note = Not;
4129
4130 smprintf(s, "Getting first free Note location\n");
4131 error = GSM_WaitFor (s, reqLoc, 5, 0x13, 4, ID_SetNote);
4132 if (error!=ERR_NONE) return error;
4133 req[8] = Not->Location/256;
4134 req[9] = Not->Location%256;
4135
4136 req[49] = UnicodeLength(Not->Text);
4137 CopyUnicodeString(req+54,Not->Text);
4138 count+= req[49]*2;
4139
4140 req[count++] = 0x00;
4141
4142 smprintf(s, "Adding Note\n");
4143 return GSM_WaitFor (s, req, count, 0x13, 4, ID_SetNote);
4144}
4145
4146static GSM_Error N6510_GetNoteStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
4147{
4148 GSM_NOKIACalToDoLocations*LastNote = &s->Phone.Data.Priv.N6510.LastNote;
4149 GSM_Error error;
4150
4151 error = N6510_GetCalendarInfo3(s,LastNote,2);
4152 if (error!=ERR_NONE) return error;
4153
4154 status->Used = LastNote->Number;
4155 return ERR_NONE;
4156}
4157
4057static int N6510_FindFileCheckSum(unsigned char *ptr, int len) 4158static int N6510_FindFileCheckSum(unsigned char *ptr, int len)
@@ -5191,3 +5292,3 @@ static GSM_Error N6510_ReplyGetToDoFirstLoc2(GSM_Protocol_Message msg, GSM_State
5191 smprintf(s, "First ToDo location method 2: %i\n",msg.Buffer[8]*256+msg.Buffer[9]); 5292 smprintf(s, "First ToDo location method 2: %i\n",msg.Buffer[8]*256+msg.Buffer[9]);
5192 s->Phone.Data.ToDo->Location = msg.Buffer[9]; 5293 s->Phone.Data.ToDo->Location = msg.Buffer[8]*256+msg.Buffer[9];
5193 return ERR_NONE; 5294 return ERR_NONE;
@@ -5203,3 +5304,4 @@ static GSM_Error N6510_AddToDo2(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
5203 int Text, Alarm, EndTime, Completed, count=54, Phone; 5304 int Text, Alarm, EndTime, Completed, count=54, Phone;
5204 unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95, 0x01}; 5305 unsigned char reqLoc[] = {N6110_FRAME_HEADER, 0x95,
5306 0x01};/* 1 = todo, 2 = note */
5205 unsigned char req[5000] = { 5307 unsigned char req[5000] = {
@@ -5587,2 +5689,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
5587 {N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo }, 5689 {N6510_ReplyAddToDo2, "\x13",0x03,0x66,ID_SetToDo },
5690 {N6510_ReplyAddNote, "\x13",0x03,0x66,ID_SetNote },
5588 {N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/ 5691 {N6510_ReplyGetCalendar3, "\x13",0x03,0x7E,ID_GetCalendarNote },/*method 3*/
@@ -5595,2 +5698,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
5595 {N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo }, 5698 {N6510_ReplyGetToDoFirstLoc2, "\x13",0x03,0x96,ID_SetToDo },
5699 {N6510_ReplyGetNoteFirstLoc, "\x13",0x03,0x96,ID_SetNote },
5596 {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/ 5700 {N6510_ReplyGetCalendarInfo, "\x13",0x03,0x9F,ID_GetCalendarNotesInfo},/*method 3*/
@@ -5734,3 +5838,3 @@ static GSM_Reply_Function N6510ReplyFunctions[] = {
5734GSM_Phone_Functions N6510Phone = { 5838GSM_Phone_Functions N6510Phone = {
5735 "1100|1100a|1100b|3100|3100b|3108|3200|3200a|3300|3510|3510i|3530|3589i|3590|3595|5100|5140|6100|6200|6220|6230|6310|6310i|6385|6510|6610|6610i|6800|6810|6820|7210|7250|7250i|7600|8310|8390|8910|8910i", 5839 "1100|1100a|1100b|3100|3100b|3105|3108|3200|3200a|3300|3510|3510i|3530|3589i|3590|3595|5100|5140|6100|6200|6220|6230|6310|6310i|6385|6510|6610|6610i|6800|6810|6820|7210|7250|7250i|7600|8310|8390|8910|8910i",
5736 N6510ReplyFunctions, 5840 N6510ReplyFunctions,
@@ -5843,3 +5947,9 @@ GSM_Phone_Functions N6510Phone = {
5843 NOTSUPPORTED, /* SetCalendarSettings*/ 5947 NOTSUPPORTED, /* SetCalendarSettings*/
5948 N6510_GetNoteStatus,
5949 NOTIMPLEMENTED, /* GetNote */
5844 N6510_GetNextNote, 5950 N6510_GetNextNote,
5951 NOTIMPLEMENTED, /* SetNote */
5952 N6510_AddNote,
5953 N6510_DeleteNote,
5954 NOTSUPPORTED, /* DeleteAllNotes */
5845 N6510_GetProfile, 5955 N6510_GetProfile,
diff --git a/gammu/emb/common/phone/nokia/nauto.c b/gammu/emb/common/phone/nokia/nauto.c
index 3bb53ec..3c7f2cd 100644
--- a/gammu/emb/common/phone/nokia/nauto.c
+++ b/gammu/emb/common/phone/nokia/nauto.c
@@ -123,3 +123,9 @@ GSM_Phone_Functions NAUTOPhone = {
123 NOTSUPPORTED, /* SetCalendarSettings*/ 123 NOTSUPPORTED, /* SetCalendarSettings*/
124 NOTSUPPORTED, /* GetNoteStatus */
125 NOTSUPPORTED, /* GetNote */
124 NOTSUPPORTED, /* GetNextNote */ 126 NOTSUPPORTED, /* GetNextNote */
127 NOTSUPPORTED, /* SetNote */
128 NOTSUPPORTED, /* AddNote */
129 NOTSUPPORTED, /* DeleteNote */
130 NOTSUPPORTED, /* DeleteAllNotes */
125 NOTSUPPORTED, /* GetProfile */ 131 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/obex/obexgen.c b/gammu/emb/common/phone/obex/obexgen.c
index 3106369..b91afac 100644
--- a/gammu/emb/common/phone/obex/obexgen.c
+++ b/gammu/emb/common/phone/obex/obexgen.c
@@ -831,3 +831,9 @@ GSM_Phone_Functions OBEXGENPhone = {
831 NOTSUPPORTED, /* SetCalendarSettings*/ 831 NOTSUPPORTED, /* SetCalendarSettings*/
832 NOTSUPPORTED, /* GetNoteStatus */
833 NOTSUPPORTED, /* GetNote */
832 NOTSUPPORTED, /* GetNextNote */ 834 NOTSUPPORTED, /* GetNextNote */
835 NOTSUPPORTED, /* SetNote */
836 NOTSUPPORTED, /* AddNote */
837 NOTSUPPORTED, /* DeleteNote */
838 NOTSUPPORTED, /* DeleteAllNotes */
833 NOTIMPLEMENTED, /* GetProfile */ 839 NOTIMPLEMENTED, /* GetProfile */
diff --git a/gammu/emb/common/phone/pfunc.c b/gammu/emb/common/phone/pfunc.c
index a03a81d..fe890fc 100644
--- a/gammu/emb/common/phone/pfunc.c
+++ b/gammu/emb/common/phone/pfunc.c
@@ -63,2 +63,3 @@ GSM_Error PHONE_EncodeSMSFrame(GSM_StateMachine *s, GSM_SMSMessage *SMS, unsigne
63 if (SMS->SMSC.Number[0] == 0x00 && SMS->SMSC.Number[1] == 0x00) { 63 if (SMS->SMSC.Number[0] == 0x00 && SMS->SMSC.Number[1] == 0x00) {
64 smprintf(s,"No SMSC in SMS Deliver\n");
64 return ERR_EMPTYSMSC; 65 return ERR_EMPTYSMSC;
diff --git a/gammu/emb/common/phone/symbian/mroutgen.c b/gammu/emb/common/phone/symbian/mroutgen.c
index a7382cf..63d26cf 100644
--- a/gammu/emb/common/phone/symbian/mroutgen.c
+++ b/gammu/emb/common/phone/symbian/mroutgen.c
@@ -200,3 +200,9 @@ GSM_Phone_Functions MROUTERGENPhone = {
200 NOTSUPPORTED, /* SetCalendarSettings*/ 200 NOTSUPPORTED, /* SetCalendarSettings*/
201 NOTSUPPORTED, /* GetNoteStatus */
202 NOTSUPPORTED, /* GetNote */
201 NOTSUPPORTED, /* GetNextNote */ 203 NOTSUPPORTED, /* GetNextNote */
204 NOTSUPPORTED, /* SetNote */
205 NOTSUPPORTED, /* AddNote */
206 NOTSUPPORTED, /* DeleteNote */
207 NOTSUPPORTED, /* DeleteAllNotes */
202 NOTSUPPORTED, /* GetProfile */ 208 NOTSUPPORTED, /* GetProfile */
diff --git a/gammu/emb/common/protocol/nokia/fbus2.c b/gammu/emb/common/protocol/nokia/fbus2.c
index 2b41f8b..967eaa4 100644
--- a/gammu/emb/common/protocol/nokia/fbus2.c
+++ b/gammu/emb/common/protocol/nokia/fbus2.c
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
@@ -147,2 +156,3 @@ static GSM_Error FBUS2_StateMachine(GSM_StateMachine *s, unsigned char rx_char)
147 } 156 }
157 free(d->Msg.Buffer);
148 158
diff --git a/gammu/emb/common/protocol/nokia/fbus2.h b/gammu/emb/common/protocol/nokia/fbus2.h
index 8dbcb07..3d31006 100644
--- a/gammu/emb/common/protocol/nokia/fbus2.h
+++ b/gammu/emb/common/protocol/nokia/fbus2.h
@@ -6,2 +6,11 @@
6 */ 6 */
7/* Due to a problem in the source code management, the names of some of
8 * the authors have unfortunately been lost. We do not mean to belittle
9 * their efforts and hope they will contact us to see their names
10 * properly added to the Copyright notice above.
11 * Having published their contributions under the terms of the GNU
12 * General Public License (GPL) [version 2], the Copyright of these
13 * authors will remain respected by adhering to the license they chose
14 * to publish their code under.
15 */
7 16
diff --git a/gammu/emb/common/protocol/nokia/phonet.c b/gammu/emb/common/protocol/nokia/phonet.c
index db5bd72..495a1bf 100644
--- a/gammu/emb/common/protocol/nokia/phonet.c
+++ b/gammu/emb/common/protocol/nokia/phonet.c
@@ -5,2 +5,11 @@
5 */ 5 */
6/* Due to a problem in the source code management, the names of some of
7 * the authors have unfortunately been lost. We do not mean to belittle
8 * their efforts and hope they will contact us to see their names
9 * properly added to the Copyright notice above.
10 * Having published their contributions under the terms of the GNU
11 * General Public License (GPL) [version 2], the Copyright of these
12 * authors will remain respected by adhering to the license they chose
13 * to publish their code under.
14 */
6 15
diff --git a/gammu/emb/common/protocol/nokia/phonet.h b/gammu/emb/common/protocol/nokia/phonet.h
index e750bbd..7626c23 100644
--- a/gammu/emb/common/protocol/nokia/phonet.h
+++ b/gammu/emb/common/protocol/nokia/phonet.h
@@ -5,2 +5,11 @@
5 */ 5 */
6/* Due to a problem in the source code management, the names of some of
7 * the authors have unfortunately been lost. We do not mean to belittle
8 * their efforts and hope they will contact us to see their names
9 * properly added to the Copyright notice above.
10 * Having published their contributions under the terms of the GNU
11 * General Public License (GPL) [version 2], the Copyright of these
12 * authors will remain respected by adhering to the license they chose
13 * to publish their code under.
14 */
6 15
diff --git a/gammu/emb/common/service/backup/backgen.h b/gammu/emb/common/service/backup/backgen.h
index 9a930fc..9d97954 100644
--- a/gammu/emb/common/service/backup/backgen.h
+++ b/gammu/emb/common/service/backup/backgen.h
@@ -66,3 +66,3 @@ typedef struct {
66extern GSM_Error GSM_ReadSMSBackupFile(char *FileName, GSM_SMS_Backup *backup); 66extern GSM_Error GSM_ReadSMSBackupFile(char *FileName, GSM_SMS_Backup *backup);
67extern GSM_Error GSM_SaveSMSBackupFile(char *FileName, GSM_SMS_Backup *backup); 67extern GSM_Error GSM_AddSMSBackupFile (char *FileName, GSM_SMS_Backup *backup);
68 68
diff --git a/gammu/emb/common/service/backup/backtext.c b/gammu/emb/common/service/backup/backtext.c
index 4cb1bb7..07a3b22 100644
--- a/gammu/emb/common/service/backup/backtext.c
+++ b/gammu/emb/common/service/backup/backtext.c
@@ -2998,3 +2998,3 @@ GSM_Error GSM_ReadSMSBackupFile(char *FileName, GSM_SMS_Backup *backup)
2998 2998
2999GSM_Error SaveSMSBackupTextFile(FILE *file, GSM_SMS_Backup *backup) 2999static GSM_Error SaveSMSBackupTextFile(FILE *file, GSM_SMS_Backup *backup)
3000{ 3000{
@@ -3006,3 +3006,7 @@ GSM_Error SaveSMSBackupTextFile(FILE *file, GSM_SMS_Backup *backup)
3006 GSM_GetCurrentDateTime (&DT); 3006 GSM_GetCurrentDateTime (&DT);
3007 fprintf(file,"# Saved %s\n\n",OSDateTime(DT,false)); 3007 fprintf(file,"# Saved ");
3008 fprintf(file, "%04d%02d%02dT%02d%02d%02d",
3009 DT.Year, DT.Month, DT.Day,
3010 DT.Hour, DT.Minute, DT.Second);
3011 fprintf(file," (%s)\n\n",OSDateTime(DT,false));
3008 3012
@@ -3090,3 +3094,3 @@ GSM_Error SaveSMSBackupTextFile(FILE *file, GSM_SMS_Backup *backup)
3090 3094
3091GSM_Error GSM_SaveSMSBackupFile(char *FileName, GSM_SMS_Backup *backup) 3095GSM_Error GSM_AddSMSBackupFile(char *FileName, GSM_SMS_Backup *backup)
3092{ 3096{
@@ -3094,3 +3098,3 @@ GSM_Error GSM_SaveSMSBackupFile(char *FileName, GSM_SMS_Backup *backup)
3094 3098
3095 file = fopen(FileName, "wb"); 3099 file = fopen(FileName, "ab");
3096 if (file == NULL) return(ERR_CANTOPENFILE); 3100 if (file == NULL) return(ERR_CANTOPENFILE);
diff --git a/gammu/emb/common/service/gsmring.h b/gammu/emb/common/service/gsmring.h
index 2d2dd7a..33e5424 100644
--- a/gammu/emb/common/service/gsmring.h
+++ b/gammu/emb/common/service/gsmring.h
@@ -173,3 +173,3 @@ typedef struct {
173 int Number; 173 int Number;
174 GSM_RingtoneInfo Ringtone[100]; 174 GSM_RingtoneInfo *Ringtone;
175} GSM_AllRingtonesInfo; 175} GSM_AllRingtonesInfo;