Diffstat (limited to 'gammu/emb/common/phone/nokia/dct3/dct3func.c') (more/less context) (show whitespace changes)
-rw-r--r-- | gammu/emb/common/phone/nokia/dct3/dct3func.c | 17 |
1 files changed, 13 insertions, 4 deletions
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 | |||
@@ -1,12 +1,21 @@ | |||
1 | /* (c) 2001-2004 by Marcin Wiacek */ | 1 | /* (c) 2001-2004 by Marcin Wiacek */ |
2 | /* resetting DCT4 phones settings (c) by Walek */ | 2 | /* resetting DCT4 phones settings (c) by Walek */ |
3 | /* based on some Markus Plail, Pavel Janik & others work from Gnokii (www.gnokii.org) | 3 | /* based on some Markus Plail, Pavel Janik & others work from Gnokii (www.gnokii.org) |
4 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot | 4 | * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot |
5 | * GNU GPL version 2 or later | 5 | * GNU GPL version 2 or later |
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 | ||
8 | #include <string.h> /* memcpy only */ | 17 | #include <string.h> /* memcpy only */ |
9 | #include <stdio.h> | 18 | #include <stdio.h> |
10 | #include <ctype.h> | 19 | #include <ctype.h> |
11 | 20 | ||
12 | #include "../../../gsmstate.h" | 21 | #include "../../../gsmstate.h" |
@@ -454,16 +463,16 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s | |||
454 | case 0x04: smprintf(s, "not registered in the network");break; | 463 | case 0x04: smprintf(s, "not registered in the network");break; |
455 | default : smprintf(s, "unknown"); | 464 | default : smprintf(s, "unknown"); |
456 | } | 465 | } |
457 | smprintf(s, "\n"); | 466 | smprintf(s, "\n"); |
458 | smprintf(s, "Network selection : %s\n", msg.Buffer[9]==1?"manual":"automatic"); | 467 | smprintf(s, "Network selection : %s\n", msg.Buffer[9]==1?"manual":"automatic"); |
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); |
465 | 474 | ||
466 | NOKIA_DecodeNetworkCode(msg.Buffer+14,NetInfo.NetworkCode); | 475 | NOKIA_DecodeNetworkCode(msg.Buffer+14,NetInfo.NetworkCode); |
467 | smprintf(s, "Network code : %s\n", NetInfo.NetworkCode); | 476 | smprintf(s, "Network code : %s\n", NetInfo.NetworkCode); |
468 | smprintf(s, "Network name for Gammu : %s ", | 477 | smprintf(s, "Network name for Gammu : %s ", |
469 | DecodeUnicodeString(GSM_GetNetworkName(NetInfo.NetworkCode))); | 478 | DecodeUnicodeString(GSM_GetNetworkName(NetInfo.NetworkCode))); |
@@ -508,14 +517,14 @@ GSM_Error DCT3_ReplyGetNetworkInfo(GSM_Protocol_Message msg, GSM_StateMachine *s | |||
508 | Data->NetworkInfo->NetworkName[0] = 0; | 517 | Data->NetworkInfo->NetworkName[0] = 0; |
509 | memcpy(Data->NetworkInfo->NetworkName+1,msg.Buffer+18,msg.Buffer[17]*2); | 518 | memcpy(Data->NetworkInfo->NetworkName+1,msg.Buffer+18,msg.Buffer[17]*2); |
510 | Data->NetworkInfo->NetworkName[msg.Buffer[17]*2+1]=0x00; | 519 | Data->NetworkInfo->NetworkName[msg.Buffer[17]*2+1]=0x00; |
511 | Data->NetworkInfo->NetworkName[msg.Buffer[17]*2+2]=0x00; | 520 | Data->NetworkInfo->NetworkName[msg.Buffer[17]*2+2]=0x00; |
512 | } | 521 | } |
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 | } |
517 | } | 526 | } |
518 | /* 6210/6250/7110 */ | 527 | /* 6210/6250/7110 */ |
519 | if (Data->RequestID==ID_GetBitmap) { | 528 | if (Data->RequestID==ID_GetBitmap) { |
520 | if (msg.Buffer[4]==0x02) { | 529 | if (msg.Buffer[4]==0x02) { |
521 | smprintf(s, "Operator logo available\n"); | 530 | smprintf(s, "Operator logo available\n"); |