-/*\r
-\r
- G N O K I I\r
-\r
- A Linux/Unix toolset and driver for Nokia mobile phones.\r
-\r
- Released under the terms of the GNU GPL, see file COPYING for more details.\r
-\r
- This file provides an API for accessing functions on the N3110 and similar\r
- phones.\r
-\r
-*/\r
-\r
-/* "Turn on" prototypes in n-3110.h */\r
-\r
-#define __n_3110_c \r
-\r
-/* System header files */\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include <stdlib.h>\r
-\r
+/*
+
+ G N O K I I
+
+ A Linux/Unix toolset and driver for Nokia mobile phones.
+
+ Released under the terms of the GNU GPL, see file COPYING for more details.
+
+ This file provides an API for accessing functions on the N3110 and similar
+ phones.
+
+*/
+
+/* "Turn on" prototypes in n-3110.h */
+
+#define __n_3110_c
+
+/* System header files */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
#ifdef WIN32
#include "misc_win32.h"
#endif
-/* Various header file */\r
-#ifndef VC6\r
- #include "config.h"\r
-#endif\r
-\r
-#include "misc.h"\r
-#include "gsm-api.h"\r
-#include "gsm-common.h"\r
-#include "files/cfgreader.h"\r
-#include "newmodules/n3110.h"\r
-#include "newmodules/n6110.h"\r
-#include "gsm-networks.h"\r
-\r
-/* Here we initialise model specific functions. */\r
-\r
-GSM_Functions N3110_Functions = {\r
- N3110_Initialise,\r
- N3110_DispatchMessage,\r
- NULL_Terminate,\r
- NULL_KeepAlive,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED, \r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r
- NOTSUPPORTED,\r NOTSUPPORTED,
+/* Various header file */
+#ifndef VC6
+ #include "config.h"
+#endif
+
+#include "misc.h"
+#include "gsm-api.h"
+#include "gsm-common.h"
+#include "files/cfgreader.h"
+#include "newmodules/n3110.h"
+#include "newmodules/n6110.h"
+#include "gsm-networks.h"
+
+/* Here we initialise model specific functions. */
+
+GSM_Functions N3110_Functions = {
+ N3110_Initialise,
+ N3110_DispatchMessage,
+ NULL_Terminate,
+ NULL_KeepAlive,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED,
+ NOTSUPPORTED, NOTSUPPORTED,
NOTSUPPORTED,
NOTSUPPORTED,
NOTSUPPORTED,
NOTSUPPORTED,
NOTSUPPORTED,
NOTSUPPORTED
-};\r
-\r
+};
-/* for all these Phones we support N3110 */\r
-\r
-GSM_Information N3110_Information = {\r
- "", /* Supported models in FBUS */\r
- "",/* Supported models in MBUS */\r
- "",/* Supported models in FBUS over infrared */\r
- "",/* Supported models in FBUS over DLR3 */\r
+
+/* for all these Phones we support N3110 */
+
+GSM_Information N3110_Information = {
+ "", /* Supported models in FBUS */
+ "",/* Supported models in MBUS */
+ "",/* Supported models in FBUS over infrared */
+ "",/* Supported models in FBUS over DLR3 */
"",
"", /* Supported models in FBUS over Irda sockets */
"",
"3110|3810|8110|8110i|8148|8148i", /* FBUS version 1 */
- 4, /* Max RF Level */\r
- 0, /* Min RF Level */\r
- GRF_Arbitrary, /* RF level units */\r
- 4, /* Max Battery Level */\r
- 0, /* Min Battery Level */\r
- GBU_Arbitrary, /* Battery level units */\r
- GDT_None, /* No date/time support */\r
- GDT_None, /* No alarm support */\r
- 0 /* Max alarms = 0 */\r
-};\r
-\r
-/* Initialise variables and state machine. */\r
-GSM_Error N3110_Initialise(char *port_device, char *initlength,\r
- GSM_ConnectionType connection,\r
- void (*rlp_callback)(RLP_F96Frame *frame))\r
-{\r
+ 4, /* Max RF Level */
+ 0, /* Min RF Level */
+ GRF_Arbitrary, /* RF level units */
+ 4, /* Max Battery Level */
+ 0, /* Min Battery Level */
+ GBU_Arbitrary, /* Battery level units */
+ GDT_None, /* No date/time support */
+ GDT_None, /* No alarm support */
+ 0 /* Max alarms = 0 */
+};
+
+/* Initialise variables and state machine. */
+GSM_Error N3110_Initialise(char *port_device, char *initlength,
+ GSM_ConnectionType connection,
+ void (*rlp_callback)(RLP_F96Frame *frame))
+{
u8 init[20]={0x02, 0x01, 0x07, 0xa2, 0x88, 0x81, 0x21, 0x55, 0x63, 0xa8,
0x00, 0x00, 0x07, 0xa3, 0xb8, 0x81, 0x20, 0x15, 0x63, 0x80};
int InitLength;
GSM_Error error;
- \r if (Protocol->Initialise(port_device,initlength,connection,rlp_callback)!=GE_NONE)\r
- {\r
- return GE_NOTSUPPORTED;\r
- }\r
+ if (Protocol->Initialise(port_device,initlength,connection,rlp_callback)!=GE_NONE)
+ {
+ return GE_NOTSUPPORTED;
+ }
InitLength = atoi(initlength);
fprintf(stdout,_("Done\n"));
#endif
- error=NULL_SendMessageSequence (200, &CurrentGetIMEIError, 20, 0x15, init);\r
- if (error!=GE_NONE) return error;\r
-\r
- CurrentLinkOK = true; \r
-\r
- return (GE_NONE);\r
-}\r
-\r
+ error=NULL_SendMessageSequence (200, &CurrentGetIMEIError, 20, 0x15, init);
+ if (error!=GE_NONE) return error;
+
+ CurrentLinkOK = true;
+
+ return (GE_NONE);
+}
+
void N3110_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType)
{