GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
-
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-
+
Preamble
-
+
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
-
+
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
-
+
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
-
+
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
-
+
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
-
+
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
-
+
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
-
+
The precise terms and conditions for copying, distribution and
modification follow.
\f
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
+
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
-
+
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
-
+
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
-
+
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
-
+
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
-
+
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
-
+
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
-
+
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
-
+
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
-
+
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
-
+
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
-
+
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
-
+
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
-
+
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
-
+
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
-
+
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
-
+
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
-
+
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
-
+
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
-
+
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
-
+
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
-
+
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
\f
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
-
+
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
-
+
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
-
+
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
-
+
NO WARRANTY
-
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
-
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
-
+
END OF TERMS AND CONDITIONS
\f
How to Apply These Terms to Your New Programs
-
+
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
-
+
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
-
+
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
+
+
Also add information on how to contact you by electronic and paper mail.
-
+
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
-
+
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
-
+
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
-
+
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
-
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
-
+
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
-
+
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
* unlimited check sim bug is fixed.
* add CRSM param get command for mo sms.
- * modified ss.db for support query of video call
+ * modified ss.db for support query of video call
* Git: slp/pkgs/v/vmodem-daemon-emulator
* Tag: vmodemd-emul_0.2.8
Package: vmodemd-emul
Architecture: i386
-Depends:
+Depends:
Description: Modem Emulator
#!/usr/bin/make -f
-package=vmodemd-emul
+package=vmodemd-emul
SRCDIR = .
CC = gcc
binary-arch: install
dh_testdir
dh_testroot
-# dh_installchangelogs
+# dh_installchangelogs
# dh_installdocs
# dh_installexamples
dh_install --sourcedir=debian/tmp
* @param org path to change (C:\\test\\test\\test)
* @return changed path (C:/test/test/test)
* @date Nov 19. 2009
- * */
+ * */
gchar *change_path_to_slash(gchar *org_path)
{
if (!org_path || strlen(org_path) < 1)
* @brief make pid directory
* @param pidfname : pid file name
* @date Nov 25. 2008
- * */
+ * */
static int make_pid_path(const char *pidfname)
{
return -1;
}
#ifdef _WIN32
- if (dir != NULL && strlen (dir) > 0)
+ if (dir != NULL && strlen (dir) > 0)
#endif
strcat(dir, "/");
strcat(dir, lptr);
- if (access(dir, R_OK) != 0)
+ if (access(dir, R_OK) != 0)
#ifndef _WIN32
mkdir(dir, S_IRWXU | S_IRWXG);
#else
{
int fd = -1;
char buf[128] = "";
- char pidfname[512] = "";
+ char pidfname[512] = "";
// sprintf (pidfname, "%s%s.pid", PID_DIR, filename);
#ifndef _WIN32
int remove_pidfile(const char *filename)
{
- char pidfname[512] = "";
+ char pidfname[512] = "";
if (filename == NULL) {
return -1;
return 0;
}
- FILE *
+ FILE *
popen_target(const char *cmdstring, const char *type)
{
FILE *fp;
}NumberingPlan;
-typedef struct
+typedef struct
{
NumberType ton;
==================================================================================================*/
// ETSI GSM 03.38 7-bit default alphabet -> Unicode scalar value (UCS2)
// index : gsm 7bit char value
-static const unsigned short g_GSM7BitToUCS2Table[] =
+static const unsigned short g_GSM7BitToUCS2Table[] =
{
- 0x40/*@*/, 0xA3, 0x24, 0xA5, 0xE8, 0xE9, 0xF9, 0xEC, 0xF2, 0xC7/*0xE7*/, 0x0A, 0xD8, 0xF8, 0x0D, 0xC5, 0xE5,
+ 0x40/*@*/, 0xA3, 0x24, 0xA5, 0xE8, 0xE9, 0xF9, 0xEC, 0xF2, 0xC7/*0xE7*/, 0x0A, 0xD8, 0xF8, 0x0D, 0xC5, 0xE5,
0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x039E, 0x0000, 0x00C6, 0x00E6, 0x00DF, 0x00C9,
- 0x20/*space*/, 33, 34, 35, 164, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 0x20/*space*/, 33, 34, 35, 164, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 161, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+ 161, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 209, 220, 167,
- 191, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 191, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 241, 252, 224
/*
'@', 0xa3, '$', 0xa5, 0xe8, 0xe9, 0xf9, 0xec,0xf2, 0xc7, '\n', 0xd8, 0xf8, '\r', 0xc5, 0xe5,
*/
};
-static const char g_UCS2ToGSM7BitTable[] =
+static const char g_UCS2ToGSM7BitTable[] =
{
0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x0a, 0x1b, 0x1b, 0x0d, 0x1b, 0x1b,
0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b,
0x1b, 0x7d, 0x08, 0x1b, 0x1b, 0x1b, 0x7C, 0x1b, 0x0c, 0x06, 0x1b, 0x1b, 0x7e, 0x1b, 0x1b, 0x1b
};
-static const unsigned short g_GSM7BitToUCS2TableExt[] =
+static const unsigned short g_GSM7BitToUCS2TableExt[] =
{ // 0x20 -> for invalid code
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 12/**/, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 12/**/, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 94/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 123/**/, 125/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 92/**/,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 123/**/, 125/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 92/**/,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 91/**/, 126/**/, 93/**/, 0x20, //64
- 124/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 124/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //104
0x20, 0x20, 0x20, 0x20, 0x20, 0x20AC/**/, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
-static const char g_UCS2ToGSM7BitTableExt[] =
+static const char g_UCS2ToGSM7BitTableExt[] =
{ // 0x1b -> for invalid code
0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x0a/**/, 0x1b, 0x1b, 0x1b, //16
0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, //32
const unsigned char *pSrcText : source text (gsm7bit)
int maxLength : max destination buffer size
int srcTextLen : byte length of source text (gsm7bit)
-return :
+return :
byte length of converted UCS2 characters
-1 : The alpha isn't the gsm 7bit code
*/
if ( upperByte == 0x00 )
{ // 0x00XX -> converts with mapping table
if( g_UCS2ToGSM7BitTable[ lowerByte ] == 0x1b/*27*/ )
- {
+ {
if(g_UCS2ToGSM7BitTableExt[ lowerByte ] == 0x1b)
{ // unknown character
pDestText[outTextLen++] = 0x20;
{
int i;
- for (i = 0; i < in_len; i ++) {
+ for (i = 0; i < in_len; i ++) {
szData [i] = pIn [i];
- }
+ }
return szData;
}
int i;
int pos = 0;
- for (i = 0; i < in_len; i ++) {
+ for (i = 0; i < in_len; i ++) {
pOut[i] = szData [i];
pos++;
- }
+ }
return pos;
}
{
if ( dialnumLen % 2 )
{
- pAddrField[index++] = dialnumLen / 2 + 1 + 1;
+ pAddrField[index++] = dialnumLen / 2 + 1 + 1;
}
else
{
- pAddrField[index++] = dialnumLen / 2 + 1;
+ pAddrField[index++] = dialnumLen / 2 + 1;
}
}
else
SET_TON_NPI( pAddrField[index], ton, npi );
- index++;
+ index++;
if ( ton != SIM_TON_ALPHA_NUMERIC )
{
#define SIM_TON_RESERVED_FOR_EXT 7 //reserved for extension
-#define MAX_UDH_LEN 137
+#define MAX_UDH_LEN 137
#define UDH_MAX 7
#define SMDATA_SIZE_MAX 160
#define FAIL 0x00
#define SUCCESS 0x01
//////////////////////////////////TPDU type////////////////////////////////
-typedef enum
+typedef enum
{
SMS_TPDU_DELIVER = 0x00, // sc -> ms
SMS_TPDU_DELIVER_REPORT = 0x00, // ms -> sc
// protocol identifier [M]
BYTE pId;
- // data coding scheme
+ // data coding scheme
TapiNetTextCodingScheme dcs;
// user data length [M]
/************HEADER************/
SmsTPDUType msgType; //bit 0 ,1
- BOOL mms; // bit 2
+ BOOL mms; // bit 2
- BOOL rp; // bit 7
+ BOOL rp; // bit 7
BOOL udhi; //bit 6
int vgsm_display_icon_information(LXT_HANDLE* handle, disp_icon_info_t info)
{
int nretn = 0;
- int length = 5;
+ int length = 5;
if( handle == NULL )
return -1;
//if(is_inet_mode()) //FALSE
if(1) // 090501 prevent segfault in qemu
{
- //printf("[VGSM] INET MODE : LINUX TAPI with coruscant on i819 : [%s][%s]\n", __DATE__, __TIME__);
- LIBVGSM_DEBUG("INET MODE : LINUX VGSM\n");
+ //printf("[VGSM] INET MODE : LINUX TAPI with coruscant on i819 : [%s][%s]\n", __DATE__, __TIME__);
+ LIBVGSM_DEBUG("INET MODE : LINUX VGSM\n");
if((sockfd = connect_af_inet("127.0.0.1")) == -1)
{
LIBVGSM_DEBUG("LINUX VGSM : connect to target failed");
int vgsm_release(LXT_HANDLE* handle)
{
int rc = -1;
- int exit_status;
+ int exit_status;
// check handle
if (handle == NULL)
LXT_ID_CLIENT_PHONE_SETUP = 0x0A, // ID of Phone setup
LXT_ID_CLIENT_CARD_MANAGER = 0x0B, // ID of CARD Manager
LXT_ID_CLIENT_SMS_DAEMON = 0x0C, // ID of SMS Daemon
- LXT_ID_CLIENT_GPS = 0x0D, // ID of GPS
- LXT_ID_CLIENT_SECURITY_SETUP = 0x0E, // ID of Security Setup
- LXT_ID_CLIENT_SAT = 0x0F, // ID of sim application toolkit
- LXT_ID_CLIENT_DATA_1 = 0x10, // ID of data 1
- LXT_ID_CLIENT_DATA_2 = 0x11, // ID of data 2
- LXT_ID_CLIENT_DATA_3 = 0x12, // ID of data 3
- LXT_ID_CLIENT_DATA_4 = 0x13, // ID of data 4
- LXT_ID_CLIENT_DATA_5 = 0x14, // ID of data 5
+ LXT_ID_CLIENT_GPS = 0x0D, // ID of GPS
+ LXT_ID_CLIENT_SECURITY_SETUP = 0x0E, // ID of Security Setup
+ LXT_ID_CLIENT_SAT = 0x0F, // ID of sim application toolkit
+ LXT_ID_CLIENT_DATA_1 = 0x10, // ID of data 1
+ LXT_ID_CLIENT_DATA_2 = 0x11, // ID of data 2
+ LXT_ID_CLIENT_DATA_3 = 0x12, // ID of data 3
+ LXT_ID_CLIENT_DATA_4 = 0x13, // ID of data 4
+ LXT_ID_CLIENT_DATA_5 = 0x14, // ID of data 5
LXT_ID_CLIENT_DATA_6 = 0x15, // ID of data 6
- LXT_ID_CLIENT_EVENT_INJECTOR = 0x16, //ID of event injector
- LXT_ID_CLIENT_EVENT_MANAGER_RX = 0x17, //ID of event injector
- LXT_ID_CLIENT_EVENT_MANAGER_TX = 0x18, //ID of event injector
+ LXT_ID_CLIENT_EVENT_INJECTOR = 0x16, //ID of event injector
+ LXT_ID_CLIENT_EVENT_MANAGER_RX = 0x17, //ID of event injector
+ LXT_ID_CLIENT_EVENT_MANAGER_TX = 0x18, //ID of event injector
LXT_ID_CLIENT_EVENT_MANAGER = 0x19, //ID of event manager
LXT_ID_CLIENT_INVALID = 0x39, // ID of invalid
LXT_ID_CLIENT_ANY = 0xff
LXT_GRP_RESPONSE = 0x5F, // response
LXT_GRP_PHONE_BOOK = 0x61, // phone book
LXT_GRP_CARD_SMS = 0x62, // card sms
- LXT_GRP_GPS = 0x63, // GPS
+ LXT_GRP_GPS = 0x63, // GPS
LXT_GRP_EOT = 0x80 // eot
};
LXT_PHN_INTERNAL_SERVER_SIM_COVER_OPENED = 0x50,
LXT_PHN_INTERNAL_SERVER_SIM_COVER_CLOSED = 0x51,
LXT_PHN_INTERNAL_SERVER_PHONE_REBUILD_START = 0x52,
- LXT_PHN_INTERNAL_SERVER_PHONE_REBUILD_END = 0x53,
+ LXT_PHN_INTERNAL_SERVER_PHONE_REBUILD_END = 0x53,
LXT_PHN_INTERNAL_SERVER_PHONE_FATAL_ERROR = 0x54,
LXT_PHN_INTERNAL_SERVER_PHONE_NV_BACKUP_NOTIFICATION = 0x55,
LXT_PHN_INTERNAL_PHONEBOOK_LOADING_COMPLETION_NOTIFICATION = 0x56,
LXT_PDA_CALL_CALL_ORIGINATION2_REQUEST = 0x51,
LXT_PDA_CALL_GET_VOICE_PRIVACY_OPTION_REQUEST = 0x52,
LXT_PDA_CALL_SET_VOICE_PRIVACY_OPTION_REQUEST = 0x53,
- LXT_PDA_CALL_CURRENT_VOICE_PRIVACY_STATUS_REQUEST = 0x54,
+ LXT_PDA_CALL_CURRENT_VOICE_PRIVACY_STATUS_REQUEST = 0x54,
LXT_PDA_CALL_SOS_CALL_REQUEST = 0x55,
- LXT_PDA_CALL_REJECT_CALL_REQUEST = 0x56
+ LXT_PDA_CALL_REJECT_CALL_REQUEST = 0x56
};
enum LXT_PHN_CALL
LXT_PHN_CARD_SMS_DELETE_RESPONSE = 0x44,
LXT_PHN_CARD_SMS_SET_TAG_RESPONSE = 0x45,
LXT_PHN_CARD_SMS_CLEAR_RESPONSE = 0x46,
- LXT_PHN_CARD_SMS_MESSAGE_READY_NOTIFICATION = 0x47,
+ LXT_PHN_CARD_SMS_MESSAGE_READY_NOTIFICATION = 0x47,
LXT_PHN_CARD_SMS_COMPLETE_NOTIFICATION = 0x48,
// GSM
typedef enum{
GSM_DATA_TE2_STATUS_DETACHED,
GSM_DATA_TE2_STATUS_ATTACHED
-} gsm_data_te2_status_e_type;
+} gsm_data_te2_status_e_type;
typedef struct tagDataBytesCounter {
int cur_rx_bytes;
GSM_DATA_TE2_DATA_CALL_RESULT_NO_DIALTONE, /* 0x05 : NO DIALTONE (maybe not use) */
GSM_DATA_TE2_DATA_CALL_RESULT_BUSY, /* 0x06 : BUSY (maybe not use)*/
GSM_DATA_TE2_DATA_CALL_RESULT_NO_ANSWER, /* 0x07 : NO ANSWER */
- GSM_DATA_TE2_DATA_CALL_RESULT_FDN, /* 0x08 : FDN */
+ GSM_DATA_TE2_DATA_CALL_RESULT_FDN, /* 0x08 : FDN */
GSM_DATA_TE2_DATA_CALL_RESULT_MAX
} gsm_data_te2_data_call_result_e_type;
GSM_DATA_CALL_REASON_REGULAR_DEACTIVATION,
GSM_DATA_CALL_REASON_LLC_SNDCP_FAILURE,
GSM_DATA_CALL_REASON_INSUFFICIENT_RESOURCES,
- GSM_DATA_CALL_REASON_MISSING_OR_UNKNOWN_APN,
+ GSM_DATA_CALL_REASON_MISSING_OR_UNKNOWN_APN,
GSM_DATA_CALL_REASON_UNKNOWN_PDP_ADDRESS_OR_TYPE,
GSM_DATA_CALL_REASON_USER_AUTHENTICATION_FAILED,
GSM_DATA_CALL_REASON_ACTIVATION_REJECTED_BY_GGSN,
GSM_DATA_CALL_REASON_ACTIVATION_REJECTED_UNSPECIFIED,
GSM_DATA_CALL_REASON_SERVICE_OPTION_NOT_SUPPORTED,
- GSM_DATA_CALL_REASON_SERVICE_NOT_SUBSCRIBED,
+ GSM_DATA_CALL_REASON_SERVICE_NOT_SUBSCRIBED,
GSM_DATA_CALL_REASON_SERVICE_OUT_OR_ORDER,
GSM_DATA_CALL_REASON_NSAPI_ALREADY_USED,
GSM_DATA_CALL_REASON_QOS_NOT_ACCEPTED,
#include "vgsm.h"
-// nsclass
+// nsclass
typedef struct tagHDLCFrame {
unsigned char m_StartMagicCode;
unsigned short m_Length;
} gsm_pb_sub_cmd_type;
-#if 0
+#if 0
/*
typedef struct tagPB2G {
unsigned char num_type;
typedef struct {
GSM_PB_ACCESS_MODE mode;
unsigned short index;
- unsigned short next_idx;
+ unsigned short next_idx;
GSM_PB_CARD pb_type;
unsigned char len_number;
unsigned char record_type;
GSM_PhoneBookGroupName* grp_name_list;
} GSM_PhoneBookGroupNameList;
-#endif
+#endif
#ifdef __cplusplus
}
#ifndef _vgsm_phone_h_
#define _vgsm_phone_h_
-/*
+/*
* additional explanation of I858 TAPI
*
* I858 TAPI API is not much different from I519/I819. Also
*
*/
-/*
+/*
* Main command group
*/
#define GSM_CALL 0x01
#define FUNC_SINGLEDB_IND 0x02
/* --------------------------------------------------------------------------
-GSM_CLIENT :
+GSM_CLIENT :
--------------------------------------------------------------------------*/
#define GSM_CLIENT_RELEASE_NOTI 0x01
#define GSM_CLIENT_RELEASE_NOTI_ACK 0x02
/*
* Length : Caller ID length (VAR)
- * Data :
- * - Caller ID
+ * Data :
+ * - Caller ID
*/
#define GSM_CALL_MAKE_REQ 0x21
/*
* Length : 2bytes
- * Data :
- * - NUM Calls (1byte)
+ * Data :
+ * - NUM Calls (1byte)
* - Call ID (1byte)
*/
#define GSM_CALL_HANGUP_REQ 0x22
*/
#define GSM_CALL_GENERATE_DTMF_REQ 0x27
-// EMTRACE_I878 [
+// EMTRACE_I878 [
// Testing purpose
#define GSM_CALL_GET_FAKE_CALLLIST_REQ 0x28
// EMTRACE_I878, civily 20051014 ]
/*
* Length : Caller ID length (VAR)
- * Data :
- * - Caller ID
+ * Data :
+ * - Caller ID
*/
#define GSM_CALL_MAKE_TO_DEVICE_REQ 0x2C
#define GSM_CALL_TO_DEVICE_CFRM 0x2D
*/
#define GSM_CALL_STATUS_NOTI 0x22
/*
- * Length : VAR 1byte(Reserved1) + 1byte(Reserved2) +
+ * Length : VAR 1byte(Reserved1) + 1byte(Reserved2) +
* 1byte(Call Count) + (Call Count) * 5 (Call Data)
* DATA :
* - Reserved1 (1byte)
#define GSM_CALL_LIST_RES 0x23
/*
- * Length : VAR 1byte(result) + 1byte(Operation) + 1byte(call Id) +
+ * Length : VAR 1byte(result) + 1byte(Operation) + 1byte(call Id) +
* (Call Count) + VAR(Call Count * 1)
* DATA :
- * - result (1byte)
+ * - result (1byte)
* - GSM_MPTY_OPERATION (1byte) see mzgsmcall.h
* - GSM_MPTY_PARAM_ID (1byte) see mzgsmcall.h
* - active call count (1byte)
* Length : 2
* Data :
* - call id (1byte)
- * - status (1byte)
- * 0x01 : waiting »óÅÂ GSM_Call_Dialing, GSM_Call_Alerting, GSM_Call_Incoming
- * 0x00 : not waiting »óÅÂ GSM_Call_Active, GSM_Call_Release
+ * - status (1byte)
+ * 0x01 : waiting state (GSM_Call_Dialing, GSM_Call_Alerting, GSM_Call_Incoming)
+ * 0x00 : not waiting state (GSM_Call_Active, GSM_Call_Release)
*/
#define GSM_CALL_WAITING_STATUS_IND 0x25
/*
* Length : 2
- * - Result : 1 byte
- * - ALS value : 1 byte
+ * - Result : 1 byte
+ * - ALS value : 1 byte
*/
#define GSM_CALL_GET_AUTO_REDIAL_RES 0x28
// sunnyfan ]
#define GSM_CALL_STATE 0x61
-#define GSM_CALL_ALERT_IND 0x62
+#define GSM_CALL_ALERT_IND 0x62
/* --------------------------------------------------------------------------
GSM_NETWORK : Network Functions
/*
* Length : 1
- * - Band value : 1 byte
+ * - Band value : 1 byte
*/
#define GSM_NETWORK_SET_BAND_REQ 0x37
/*
* Length : 2
- * - Result : 1 byte
- * - Band value: 1 byte
+ * - Result : 1 byte
+ * - Band value: 1 byte
*/
#define GSM_NETWORK_GET_BAND_RES 0x37
/*
* Length : 2
- * - Result : 1 byte
- * - Band value: 1 byte
+ * - Result : 1 byte
+ * - Band value: 1 byte
*/
#define GSM_NETWORK_SET_BAND_RES 0x38
--------------------------------------------------------------------------*/
/*
* Length : MMI String length
- * Data :
+ * Data :
* - MMI String
*/
#define GSM_SUPS_MMI_REQ 0x41
/*
* Length : 1(CW_Notify) + 1(GSM_CW_Mode) + 1(GSM_ClassX)
* Data :
- * - CW_Notify : (1byte)
+ * - CW_Notify : (1byte)
* - CW_Mode : (1byte)
* - GSM_ClassX (1byte)
*/
/*
* Length : 1(CW_Notify) + 1(GSM_CW_Mode) + 1(GSM_ClassX)
* Data :
- * - CW_Notify : (1byte)
+ * - CW_Notify : (1byte)
* - CW_Mode : (1byte)
* - GSM_ClassX (1byte)
*/
#define GSM_SUPS_SET_ACM_MAX_REQ 0x4C
/*
- * Length :
+ * Length :
* Data :
* - AOC_CURRENCY_Code (1byte)
* - length (1byte)
/*
* Length : USSD String length
- * Data :
+ * Data :
* - USSD String
*/
#define GSM_SUPS_USSD_SEND_REQ 0x4E
/*
* Length : 0
- * Data :
+ * Data :
* - None
*/
#define GSM_SUPS_USSD_CANCEL_REQ 0x4F
/*
* Length : 1
- * Data :
+ * Data :
* - Barring Facility
*/
#define GSM_SUPS_CB_STATUS_REQ 0x56
/*
* Length : 0
- * Data :
+ * Data :
* - None
*/
#define GSM_SUPS_GET_PPU_REQ 0x57
/*
* Length : 1(status) + 1(fac value) + 1(class)
* Data :
- * - status (1byte) 0x00 : not active, 0x01 : active
+ * - status (1byte) 0x00 : not active, 0x01 : active
* - fac value (1byte) see mzgsmsups.h
* - class value (1byte) see mzgsmsups.h
*/
/*
* Length : 1(fac value) + 1(class) + 1(mode)
* Data :
- * - result (1byte)
+ * - result (1byte)
* - fac (1byte) see mzgsmsups.h
* - remain (1byte)
*/
*/
#define GSM_SUPS_GET_PPU_RES 0x55
-#define GSM_SUPS_STATE 0x56
-#define GSM_SUPS_CONFERENCE 0x57
-#define GSM_SUPS_HOLD 0x58
-#define GSM_SUPS_UNHOLD 0x59
-#define GSM_SUPS_AOC_SET 0x5a
-#define GSM_SUPS_AOC_GET 0x5b
-#define GSM_SUPS_CW_SET 0xe0
-#define GSM_SUPS_CW_GET 0xe1
-#define GSM_SUPS_CF_SET 0xe2
-#define GSM_SUPS_CF_GET 0xe3
-#define GSM_SUPS_CB_SET 0xe4
-#define GSM_SUPS_CB_GET 0xe5
-#define GSM_SUPS_USSD_GET 0xe6
-#define GSM_SUPS_USSD_SET 0xe7
+#define GSM_SUPS_STATE 0x56
+#define GSM_SUPS_CONFERENCE 0x57
+#define GSM_SUPS_HOLD 0x58
+#define GSM_SUPS_UNHOLD 0x59
+#define GSM_SUPS_AOC_SET 0x5a
+#define GSM_SUPS_AOC_GET 0x5b
+#define GSM_SUPS_CW_SET 0xe0
+#define GSM_SUPS_CW_GET 0xe1
+#define GSM_SUPS_CF_SET 0xe2
+#define GSM_SUPS_CF_GET 0xe3
+#define GSM_SUPS_CB_SET 0xe4
+#define GSM_SUPS_CB_GET 0xe5
+#define GSM_SUPS_USSD_GET 0xe6
+#define GSM_SUPS_USSD_SET 0xe7
/* --------------------------------------------------------------------------
GSM_MISC : misc Functions
* Length : 2bytes
* Data :
* - Indicator (1byte) see mzgsmmisc.h
- * - Value (1byte)
+ * - Value (1byte)
*/
#define GSM_DISPLAY_INDICATOR_NOTI 0x71
--------------------------------------------------------------------------*/
/*
* Length : IMEI length
- * Data :
+ * Data :
* - IMEI Value
*/
#define GSM_EXT_SET_IMEI_REQ 0xB1
/*
* Length : BTMAC length
- * Data :
+ * Data :
* - BTMAC Value
*/
#define GSM_EXT_SET_BTMAC_REQ 0xB2
/*
* Length : 0
- * Data :
+ * Data :
* - None
*/
#define GSM_EXT_GET_BTMAC_REQ 0xB3
/*
* Length : 1
- * Data :
+ * Data :
* - mode : up Or down
*/
#define GSM_EXT_SET_VOICE_VOL_REQ 0xB4
/*
* Length : 1
- * Data :
+ * Data :
* - path : Audio path
*/
#define GSM_EXT_SET_AUDIO_PATH_REQ 0xB5
/*
* Length : 1
- * Data :
+ * Data :
* - path : Phone State
*/
#define GSM_EXT_SET_INTERNAL_STATE_REQ 0xB6
--------------------------------------------------------------------------*/
/*
* Length : 1
- * Data :
+ * Data :
* - result
*/
#define GSM_EXT_SET_IMEI_RES 0xB1
/*
* Length : 1
- * Data :
+ * Data :
* - result
*/
#define GSM_EXT_SET_BTMAC_RES 0xB2
/*
* Length : 1 + VAR
- * Data :
+ * Data :
* - mac length
* - mac value
*/
/*
* Length : 1
- * Data :
+ * Data :
* - result
*/
#define GSM_EXT_BATT_INFO_NOTI 0xB4
/*
* Length : 1
- * Data :
+ * Data :
* - result
*/
#define GSM_EXT_PHONE_POWER_ON_RES 0xB5
*/
/////////////////////////////////////////////////////////////////////
-//
+//
#ifndef __vgsm_sat_h__
#define __vgsm_sat_h__
/* LOCK_TYPE field */
typedef enum{
GSM_SEC_LOCK_TYPE_READY, /* 0x00 : ME is not locked */
- GSM_SEC_LOCK_TYPE_PS, /* 0x01 : PH-SIM, Lock Phone to SIM/UICC card
- ( MT asks password when other than current SIM/UICC card inserted;
- MT may remember certain amount of previously used cards thus not
- requiring password when they are inserted ) */
+ GSM_SEC_LOCK_TYPE_PS, /* 0x01 : PH-SIM, Lock Phone to SIM/UICC card
+ ( MT asks password when other than current SIM/UICC card inserted;
+ MT may remember certain amount of previously used cards thus not
+ requiring password when they are inserted ) */
GSM_SEC_LOCK_TYPE_PF, /* 0x02 : PH-FSIM, Lock Phone to the very First inserted SIM/UICC card
( MT asks password when other than the first SIM/UICC card is inserted ) */
GSM_SEC_LOCK_TYPE_SC, /* 0x03 : Lock SIM/UICC card ( SIM asks password in ME power-up and when this command is issued ) */
GSM_SEC_EFILE_USIM_PHONEBOOK_GAS = 0x4F0E, /**< Additional Number */
GSM_SEC_EFILE_USIM_PHONEBOOK_GAS1 = 0x4F0F, /**< Second Name Entry */
- GSM_SEC_EFILE_USIM_PHONEBOOK_ANR = 0x4FF4, /**< Additional Number */
+ GSM_SEC_EFILE_USIM_PHONEBOOK_ANR = 0x4FF4, /**< Additional Number */
GSM_SEC_EFILE_USIM_PHONEBOOK_SNE = 0x4FF9, /**< Second Name Entry */
GSM_SEC_EFILE_USIM_PHONEBOOK_EMAIL = 0x4FFA, /**< e-mail address */
#if 1
{
int type1; // info : 0, data : 1
int type2;
- // info -> 0:usim_li, 1:ecc, 2:sst, 3:est, 4:cphs, 5:spn, 6:imsi
- // data -> 0:iccid, 1:usim_li, 2:ecc, 3:sst, 4:est, 5:spn, 6:imsi
+ // info -> 0:usim_li, 1:ecc, 2:sst, 3:est, 4:cphs, 5:spn, 6:imsi
+ // data -> 0:iccid, 1:usim_li, 2:ecc, 3:sst, 4:est, 5:spn, 6:imsi
int size;
unsigned char tmp[50];
}_SIMD_t;
GSM_CMD_CFRM, /* 0x04 : Response of the INDICATION */
GSM_CMD_EVENT, /* 0x05 : Notify the status of PDA */
GSM_PDA_MAX
-} gsm_pda_cmd_e_type;
+} gsm_pda_cmd_e_type;
/*********************************************************************************/
GSM_SEC_CHANGE_LOCKING_PW, /* 0x03 : Change Locking Password Message */
GSM_SEC_SIM_LANG, /* 0x04 : SIM Language Message */
GSM_SEC_RSIM_ACCESS, /* 0x05 : +CRSM, Restricted SIM Access Message */
- GSM_SEC_GSIM_ACCESS, /* 0x06 : +CSIM, General SIM Access Message */
+ GSM_SEC_GSIM_ACCESS, /* 0x06 : +CSIM, General SIM Access Message */
GSM_SEC_SIM_ICC_TYPE, /* 0x07 : SIM ICC Type Message*/
GSM_SEC_LOCK_INFO, /* 0x08 : Lock Information Message*/
GSM_SEC_ISIM_AUTH, /* 0x9 : ISIM Authentication Message */
GSM_SEC_MAX
-} gsm_sec_sub_cmd_type;
+} gsm_sec_sub_cmd_type;
/*********************************************************************************/
#endif
// actually, this data structures is used at db.
typedef enum {
- SS_CMD_CW = 1,
+ SS_CMD_CW = 1,
SS_CMD_CB,
SS_CMD_CF
} ss_cmd_e_type;
unsigned char CharTypeOfCurrency; /**< Specifies the Char type of currency. */
unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX]; /**< Specifies the Currency characters. */
} TelCallAocInfo_t;
-#endif
+#endif
// 090213 090330//////////////////////////////////////////////
typedef struct
{
Summary: Virtual Modem
Group: System/ModemEmulator
License: GNU
+ExclusiveArch: %{ix86}
Source0: %{name}-%{version}.tar.gz
Source1001: packaging/vmodemd-emul.manifest
BuildRequires: pkgconfig(glib-2.0)
CFLAGS += -Wpointer-arith
CFLAGS += -Wp,-MD,$(dir $@).$(notdir $@).d -Wp,-MT,$@
# for bypass __stack_chk_fail
-CFLAGS +=-fno-stack-protector
+CFLAGS +=-fno-stack-protector
CC = @CC@
LD = @LD@
*
* Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
*
- * Contact:
+ * Contact:
* Sooyoung Ha <yoosah.ha@samsung.com>
* YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
*
* Contributors:
* - S-Core Co., Ltd
- *
+ *
*/
/*
else
{
// find new line
- while (*ptr != '\0' && *ptr != '\r' && *ptr != '\n')
+ while (*ptr != '\0' && *ptr != '\r' && *ptr != '\n')
{
ptr++;
}
int start_pduIndex = 0;
// empty data
- if (*s_at_data_ptr == '\0')
+ if (*s_at_data_ptr == '\0')
{
s_at_data_ptr = s_at_data;
*s_at_data_ptr = '\0';
data_read = s_at_data;
- }
- else
- {
+ }
+ else
+ {
while(*s_at_data_ptr == '\r' || *s_at_data_ptr == '\n')
{
s_at_data_ptr++;
data_eol = find_new_line(s_at_data_ptr, sms);
- if (data_eol == NULL)
+ if (data_eol == NULL)
{
unsigned int data_len;
data_len = strlen(s_at_data_ptr);
}
}
- while (data_eol == NULL)
+ while (data_eol == NULL)
{
int data_size = MAX_DATA_RESPONSE - (data_read - s_at_data);
- if(data_size == 0)
+ if(data_size == 0)
{
s_at_data_ptr = s_at_data;
*s_at_data_ptr = '\0';
start_pduIndex = (strlen(ATCMGS) + strlen(length) + strlen(token) + 1);
sca_length = hexCharToInt(data_read[start_pduIndex]);
- total_data_length = (pdu_length + sca_length + 1) * 2; // 1: byte of sca length
+ total_data_length = (pdu_length + sca_length + 1) * 2; // 1: byte of sca length
sms_data_len = start_pduIndex + total_data_length;
TRACE(MSGL_VGSM_INFO, "sca_length:%d, total_data_length: %d, cnt: %d\n", sca_length, total_data_length, cnt);
}
TRACE(MSGL_VGSM_INFO, "atmsg length: %d\n", strlen(atmsg));
- // set default value
+ // set default value
frame.m_StartMagicCode = 0x7F;
frame.m_EndMagicCode = 0x7E;
frame.m_CtrlInfo = 0x7F;
{
return at_rx_ss_cb_get(data);
}
- else
- {
+ else
+ {
NOT_SUPPORTED_AT(atmsg);
return -1;
}
/*
- The only one entry could get on one time, in these times vmodem code,
+ The only one entry could get on one time, in these times vmodem code,
so Phonebook is implemented to 2G feature.
*/
int at_rx_sim_pb_access(char* atmsg)
TRACE(MSGL_VGSM_SIM, "\n");
return oem_rx_sim_sec_check_password_req(atmsg, strlen(atmsg));
-}
+}
int at_rx_sim_sec_change_password(char* atmsg)
{
{
if( !strcmp(ret, origPwd) )
return at_gen_resp_send(AT_GEN_ERR_NO_ERROR);
- else
+ else
return at_gen_resp_send(AT_CME_ERR_INCORRECT_PWD);
}
else
0x62, 0x25, 0x82, 0x02, 0x41, 0x21, 0x83, 0x02,
0x6f, 0x46, 0xa5, 0x06, 0x80, 0x01, 0x31, 0xc0,
0x01, 0x00, 0x8a, 0x01, 0x05, 0x8b, 0x06, 0x6f,
- 0x06, 0x01, 0x06, 0x00, 0x06, 0x80, 0x02, 0x00,
- 0x11, 0x81, 0x02, 0x00, 0x25, 0x88, 0x00
+ 0x06, 0x01, 0x06, 0x00, 0x06, 0x80, 0x02, 0x00,
+ 0x11, 0x81, 0x02, 0x00, 0x25, 0x88, 0x00
};
const unsigned char at_g_gsm_efile_imsi_info[] = {
else if(p1 == 2)
{
ptr = at_g_gsm_efile_smsp2_data;
- len = sizeof at_g_gsm_efile_smsp2_data;
+ len = sizeof at_g_gsm_efile_smsp2_data;
}
}
- else
+ else
{
TRACE(MSGL_VGSM_INFO, "access type [%02x] file id [%x] (%s)\n", access_cmd, file_id, get_sim_filename(file_id));
#include "at_func.h"
/* temporarily vconf setup */
-//#define SMS_PARAM_SET_VCONF
+//#define SMS_PARAM_SET_VCONF
#ifdef SMS_PARAM_SET_VCONF
#include <vconf/vconf.h>
#include <vconf/vconf-keys.h>
int pdu_len = 0;
ret = strtok(tdata+1, token);
if(ret)
- pdu_len = atoi(ret);
+ pdu_len = atoi(ret);
else
return 0;
//Alpha-Id
g_record[n++] = '1';
g_record[n++] = '2';
- g_record[n++] = '3';
+ g_record[n++] = '3';
g_record[n++] = '4';
g_record[n++] = '5';
- for(i=0; i<(24-5);i++){
- g_record[n++] = 0x00;
- }
+ for(i=0; i<(24-5);i++){
+ g_record[n++] = 0x00;
+ }
// parameter indicator
- g_record[n++] = 0xe9;
+ g_record[n++] = 0xe9;
// TP-Destination Addr.
- for(i=0; i<12;i++){
- g_record[n++] = 0xff;
- }
+ for(i=0; i<12;i++){
+ g_record[n++] = 0xff;
+ }
//TP-SC addr. // this is raw g_record. +8210911111
- g_record[n++] = 0x06;
- g_record[n++] = 0x91;
- g_record[n++] = 0x28;
- g_record[n++] = 0x01;
+ g_record[n++] = 0x06;
+ g_record[n++] = 0x91;
+ g_record[n++] = 0x28;
+ g_record[n++] = 0x01;
g_record[n++] = 0x19;
g_record[n++] = 0x11;
g_record[n++] = 0x11;
#define nVPOffset 27
#define TAPI_SIM_SMSP_ADDRESS_LEN 20
-#define MAX_GSM_SMS_PARAM_RECORD_SIZE 156
+#define MAX_GSM_SMS_PARAM_RECORD_SIZE 156
/* msg-service/include/common/MsgSettingTypes.h */
MSG_PID_ERMES, /**< Ermes */
MSG_PID_EMAIL, /**< Email */
MSG_PID_MAX /**< Default */
-};
+};
/* msg-service/plugin/sms_plugin/include/SmsPluginTypes.h */
enum _SMS_TON_E
-{
+{
SMS_TON_UNKNOWN = 0, /* unknown */
SMS_TON_INTERNATIONAL, /* international */
SMS_TON_NATIONAL, /* national */
{
SMS_PID_NORMAL = 0x00,
- SMS_PID_TELEX = 0x21,
+ SMS_PID_TELEX = 0x21,
SMS_PID_GROUP3_TELEX = 0x22,
SMS_PID_GROUP4_TELEX = 0x23,
SMS_PID_VOICE = 0x24,
SMS_PID_ERMES = 0x25,
SMS_PID_NPS = 0x26,
- SMS_PID_VIDEO = 0x27,
+ SMS_PID_VIDEO = 0x27,
SMS_PID_TELETEX_UNSPEC = 0x28,
SMS_PID_TELETEX_PSPDN = 0x29,
SMS_PID_TELETEX_CSPDN = 0x2A,
{
MSG_SMS_PID_T retPid;
- switch (pid) {
+ switch (pid) {
case SMS_PID_NORMAL:
retPid = MSG_PID_TEXT;
- break;
+ break;
case SMS_PID_VOICE:
retPid = MSG_PID_VOICE;
- break;
+ break;
case SMS_PID_TELEX:
retPid = MSG_PID_FAX;
- break;
+ break;
case SMS_PID_x400:
retPid = MSG_PID_X400;
- break;
+ break;
case SMS_PID_ERMES:
retPid = MSG_PID_ERMES;
- break;
+ break;
case SMS_PID_EMAIL:
retPid = MSG_PID_EMAIL;
- break;
+ break;
default:
retPid = MSG_PID_TEXT;
- break;
- }
+ break;
+ }
return retPid;
}
unsigned char temp;
for (i = 0; i < BcdLen; i++)
- {
+ {
temp = pBcd[i] & 0x0F;
if (temp == 0x0A)
temp = (pBcd[i] & 0xF0) >> 4;
if (temp == 0x0F)
- {
+ {
pDigit[offset] = '\0';
return offset;
- }
+ }
if (temp == 0x0A)
pDigit[offset++] = '*';
pDigit[offset++] = 'P';
else
pDigit[offset++] = temp + '0';
- }
+ }
pDigit[offset] = '\0';
int sms_param_set_vconf()
{
int i, alpha_id_len = 0,nOffset = 0;
- unsigned long AlphaIdLen;
+ unsigned long AlphaIdLen;
char szAlphaId[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1];
char smscAddr[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX*2 + 1];
unsigned char ParamIndicator;
- unsigned int DialNumLen;
+ unsigned int DialNumLen;
unsigned char szDiallingNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1];
- int Ton=0, Npi=0;
- unsigned short TpProtocolId = 0;
+ int Ton=0, Npi=0;
+ unsigned short TpProtocolId = 0;
unsigned short TpDataCodingScheme = 0;
- unsigned short TpValidityPeriod = 0;
+ unsigned short TpValidityPeriod = 0;
const unsigned char *p = NULL;
p = &g_record[0];
TRACE(MSGL_VGSM_INFO, " VP = %d \n",TpValidityPeriod);
if (vconf_set_str(SMSC_NAME"/0", szAlphaId) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%s]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%s]"
, SMSC_NAME"/0", szAlphaId);
}
if (vconf_set_str(SMSC_ADDRESS"/0", smscAddr) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s]=> [%s]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s]=> [%s]"
, SMSC_ADDRESS"/0", smscAddr);
}
if (vconf_set_int(SMSC_TON"/0", Ton) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
, SMSC_TON"/0", Ton);
}
if (vconf_set_int(SMSC_NPI"/0", Npi) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
, SMSC_NPI"/0", Npi);
}
if (vconf_set_int(SMSC_PID"/0", (int)convertPid(TpProtocolId)) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
, SMSC_PID"/0", (int)convertPid(TpProtocolId));
}
if (vconf_set_int(SMSC_VAL_PERIOD"/0", TpValidityPeriod) != 0 ){
- TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
+ TRACE(MSGL_VGSM_INFO, "[FAIL] vconf error: [%s] => [%d]"
, SMSC_VAL_PERIOD"/0", TpValidityPeriod);
}
#include "server_rx_ss.h"
#include "server_common_ss.h"
-#define AO
+#define AO
int at_rx_ss_default(char* atmsg)
{
{
case AT_CALL_FW_MODE_DISABLE:
ss_mode = SS_MODE_DEACT;
- break;
+ break;
case AT_CALL_FW_MODE_ENABLE:
ss_mode = SS_MODE_ACT;
break;
if(found)
cb_type = sDefaultFac[nn].cb_e_type;
- else
+ else
cb_type = SS_CB_TYPE_NONE;
}
at_msg_send(ACK_SEQ_NOTIFICATION, sndbuf, strlen(sndbuf));
return at_tx_call_status_noti(data, strlen((char*)data));
} else {
- TRACE(MSGL_VGSM_INFO, "cannot RING a call, %d, %d, %d \n", rssi, icb, flightMode);
+ TRACE(MSGL_VGSM_INFO, "cannot RING a call, %d, %d, %d \n", rssi, icb, flightMode);
return -1;
}
}
int at_tx_sim_sec_check_password_res(void* ptr_data)
-{
+{
TRACE(MSGL_VGSM_SIM, "res\n");
return at_gen_resp_send((char*)ptr_data);
snd_len = strlen(sndbuf);
strcpy(&sndbuf[snd_len], CRLF);
- snd_len += strlen(CRLF);
+ snd_len += strlen(CRLF);
TRACE(MSGL_VGSM_SIM, "%s , len:%d", sndbuf, snd_len);
at_msg_send(ACK_SEQ_RESPONSE, sndbuf, snd_len);
{
LXT_MESSAGE smsres_packet;
- // for sms receive check
+ // for sms receive check
TAPIMessageInit(&smsres_packet);
smsres_packet.group = GSM_SMS; // 0x04
smsres_packet.action = GSM_SMS_RECEIVE_RES; // 0x0C
#include "logmsg.h"
#include "fileio.h"
-#ifndef ALP_NOTIFY_DATABASE_DIR
+#ifndef ALP_NOTIFY_DATABASE_DIR
#define ALP_NOTIFY_DATABASE_DIR "./db"
#endif // P_NOTIFY_DATABASE_DIR
log_msg(MSGL_VGSM_ERR," SQL statement : %s\n", str);
- // add a row
+ // add a row
err = sqlite3_exec(db, str, 0, 0, &mesg);
if (err != SQLITE_OK) {
log_msg(MSGL_VGSM_INFO," SQL statement : %s\n", str);
- // add a row
+ // add a row
err = sqlite3_exec(db, str, 0, 0, &mesg);
if(err != SQLITE_OK) {
log_msg(MSGL_VGSM_ERR,"vgsm_network_sqlite_add: sqlite3_exec err=%d\n",err);
data_len =4;
data = malloc(sizeof(unsigned char) * data_len);
data[0] = entry->type;
- data[1] = 1; // entry->count
+ data[1] = 1; // entry->count
data[2] = entry->tel_class;
data[3] = ss_status;
accepts the other (held or waiting) call.*/
AT_GSM_SS_CM_2_SEND, /* 0x02 : Places all active calls (if any exist) on hold
and accepts the other (held or waiting) call.*/
- AT_GSM_SS_CM_3_SEND, /* 0x03 : Adds a held call to the conversation.*/
+ AT_GSM_SS_CM_3_SEND, /* 0x03 : Adds a held call to the conversation.*/
AT_GSM_SS_CM_4_SEND, /* 0x04 : Connects the two calls and disconnects
the subscriber from both calls (ECT).*/
AT_GSM_SS_CM_1X_SEND, /* 0x05 : Releases a specific active call X.
/* ICC TYPE field */
typedef enum{
GSM_SEC_UNKNOWN, /* 0x00 : UNKNOWN */
- GSM_SEC_SIM,
- GSM_SEC_USIM,
+ GSM_SEC_SIM,
+ GSM_SEC_USIM,
GSM_SEC_RSIM
} gsm_sec_sim_e_type;
AT_GSM_PWR_UP_ASLEEP
} at_gsm_pwr_up_e_type;
-typedef enum {
+typedef enum {
AT_GSM_PWR_PHONE_ONLINE_OFF = 0x00, /* ONLINE OFF*/
AT_GSM_PWR_PHONE_ONLINE_ON, /* ONLINE ON */
AT_GSM_PWR_PHONE_ONLINE_MAX
};
static const struct {
- const char* fac;
+ const char* fac;
ss_cb_e_type cb_e_type;
} sDefaultFac[] =
{
} sDefaultLock[] =
{
{ "READY", GSM_SEC_LOCK_TYPE_READY}, /* 0x00 : ME is not locked */
- { "SIM PIN", GSM_SEC_LOCK_TYPE_SC}, /* 0x03 : Lock SIM/UICC card
+ { "SIM PIN", GSM_SEC_LOCK_TYPE_SC}, /* 0x03 : Lock SIM/UICC card
( SIM asks password in ME power-up and when this command is issued ) */
{ "SIM PUK", GSM_SEC_LOCL_TYPE_PUK}, /* 0x0C : Lock PUK (... ) */
{ "SIM PIN2", GSM_SEC_LOCK_TYPE_SC2}, /* 0x09 : Lock PIN2 ( ... ) */
#define SIM_TON_RESERVED_FOR_EXT 7 //reserved for extension
-#define MAX_UDH_LEN 137
+#define MAX_UDH_LEN 137
#define UDH_MAX 7
#define SMDATA_SIZE_MAX 160
//////////////////////////////////TPDU type////////////////////////////////
#if 0
-typedef enum
+typedef enum
{
SMS_TPDU_DELIVER = 0x00, // sc -> ms
SMS_TPDU_DELIVER_REPORT = 0x00, // ms -> sc
// protocol identifier [M]
BYTE pId;
- // data coding scheme
+ // data coding scheme
TapiNetTextCodingScheme dcs;
// user data length [M]
/************HEADER************/
SmsTPDUType msgType; //bit 0 ,1
- BOOL mms; // bit 2
+ BOOL mms; // bit 2
- BOOL rp; // bit 7
+ BOOL rp; // bit 7
BOOL udhi; //bit 6
struct _SatCmdResponse
{
char* respP; //!< Associated text response
- unsigned char itemIdentifier; //!< Item identifier
+ unsigned char itemIdentifier; //!< Item identifier
int respSize; //!< Associated text response size in bytes
char cmdId; //!< Command Identifier
char respType; //!< Expected response type, see ALP_TEL_CAT_RESP_TYPE_XXX
int subAddressSize; //!< subaddress size in bytes
char bearerCapSize; //!< Bearer capability size, in bytes
- unsigned long duration; //!< if the time elapsed since the first call set-up attempt has exceeded the duration request, the redial mechanism shall be terminated
+ unsigned long duration; //!< if the time elapsed since the first call set-up attempt has exceeded the duration request, the redial mechanism shall be terminated
char condition; //!< Set up call commmand qualifier, see ALP_TEL_CAT_SETUP_CALL_XXX
char userConfIconId; //!< Icon id. 0 if no icon
struct _SatItemList
{
SatItem* firstItemP; //!< The first Item
- int itemCount; //!< Number of items
+ int itemCount; //!< Number of items
char softKey; //!< Item can be selected by tapping on its icon
char helpInfo; //!< Help information is provided by the SIM
char defItemId; //!< Identifier of the item that should be pre-selected.
char accessPointSize;
};
-//! answer made by the phone module directly to the SIM
+//! answer made by the phone module directly to the SIM
typedef struct _SatMEanswer SatMEanswer;
struct _SatMEanswer
{
char cmdId; //!< Command Identifier
- char resCode; //!< Result codes applicable to command iCmdId
+ char resCode; //!< Result codes applicable to command iCmdId
char addInfo; //!< Additional information code
};
-//! answer made by the SIM to the phone module CALL CONTROL or MO Short Message CONTROL command
+//! answer made by the SIM to the phone module CALL CONTROL or MO Short Message CONTROL command
typedef struct _SatSIManswer SatSIManswer;
struct _SatSIManswer
{
char* textP; //!< Text to display
int textSize; //!< The size of the encoded text
- char* addressP1; //!> if it's a call control answer adressP1= dialling number, if the address data is not present, the terminal shall assume the dialling number is not to be modified
+ char* addressP1; //!> if it's a call control answer adressP1= dialling number, if the address data is not present, the terminal shall assume the dialling number is not to be modified
//!> if it's a MO short message control answer addressP1= RP_Destination_Address, if the address data object 1 is not present, then the ME shall assume the RP_Destination_Address of the Service Centre is not to be modified.
char addressSize1; //!> address size
char* capabilityConfP1; //!< Capability configuration parameters1
char capabilityConfSize1;//!< the capability configuration parameters1 size
- char* capabilityConfP2; //!< Capability configuration parameters2
+ char* capabilityConfP2; //!< Capability configuration parameters2
char capabilityConfSize2;//!< the capability configuration parameters2 size
};
#define SAT_TIMER_EXPIRATION 0xD7
-// SIMPLE-TLV data objects tags
+// SIMPLE-TLV data objects tags
#define SAT_COMMAND_DETAILS 0x01 //!> Command details tag
#define SAT_DEVICE_IDENTITIES 0x02 //!> Device identity tag
#define SAT_RESULT 0x03 //!> Result tag
-#define SAT_DURATION 0x04 //!> Duration tag
+#define SAT_DURATION 0x04 //!> Duration tag
#define SAT_ALPHA_IDENTIFIER 0x05 //!> Alpha identifier tag
#define SAT_ADDRESS 0x06 //!> Address tag
#define SAT_CAPABILILITY_CONFIGURATION_PARAMETERS 0x07 //!> Capability configuration parameters tag
#define SAT_USSD_STRING 0x0A //!> USSD string tag
#define SAT_SMS_TPDU 0x0B //!> SMS TPDU tag
#define SAT_CELL_BROADCAST_PAGE 0x0C //!> Cell Broadcast page tag
-#define SAT_TEXT_STRING 0x0D //!> Text string tag
+#define SAT_TEXT_STRING 0x0D //!> Text string tag
#define SAT_TONE 0x0E //!> Tone tag
#define SAT_ITEM 0x0F //!> Item tag
-#define SAT_ITEM_IDENTIFIER 0x10 //!> Item identifier tag
-#define SAT_RESPONSE_LENGTH 0x11 //!> Response length tag
+#define SAT_ITEM_IDENTIFIER 0x10 //!> Item identifier tag
+#define SAT_RESPONSE_LENGTH 0x11 //!> Response length tag
#define SAT_FILE_LIST 0x12 //!> File List tag
#define SAT_LOCATION_INFORMATION 0x13 //!> Location Information tag
-#define SAT_IMEI 0x14 //!> IMEI tag
-#define SAT_HELP_REQUEST 0x15 //!> Help request tag
-#define SAT_NETWORK_MEASUREMENT_RESULTS 0x16 //!> Network Measurement Results tag
+#define SAT_IMEI 0x14 //!> IMEI tag
+#define SAT_HELP_REQUEST 0x15 //!> Help request tag
+#define SAT_NETWORK_MEASUREMENT_RESULTS 0x16 //!> Network Measurement Results tag
#define SAT_DEFAULT_TEXT 0x17 //!> Default Text tag
#define SAT_ITEMS_NEXT_ACTION_INDICATOR 0x18 //!> Items Next Action Indicator tag
#define SAT_EVENT_LIST 0x19 //!> Event list tag
#define SAT_CAUSE 0x1A //!> Cause tag
-#define SAT_LOCATION_STATUS 0x1B //!> Location status tag
+#define SAT_LOCATION_STATUS 0x1B //!> Location status tag
#define SAT_TRANSACTION_IDENTIFIER 0x1C //!> Transaction identifier tag
#define SAT_BCCH_CHANNEL_LIST 0x1D //!> BCCH channel list tag
#define SAT_ICON_IDENTIFIER 0x1E //!> Icon identifier tag
#define SAT_ITEM_ICON_IDENTIFIER_LIST 0x1F //!> Item Icon identifier list tag
//#define SAT_CARD_READER_STATUS 0x20 //!> Card reader status tag
#define SAT_CARD_ATR 0x21 //!> Card ATR tag
-#define SAT_C_ADPU 0x22 //!> C-APDU tag
+#define SAT_C_ADPU 0x22 //!> C-APDU tag
#define SAT_R_ADPU 0x23 //!> R-APDU tag
#define SAT_TIMER_IDENTIFIER 0x24 //!> Timer identifier tag
#define SAT_TIMER_VALUE 0x25 //!> Timer value tag
#define SAT_DTMF_STRING 0x2C //!> DTMF string tag
#define SAT_LANGUAGE 0x2D //!> Language tag
#define SAT_TIMING_ADVANCE 0x2E //!> Timing Advance tag
-#define SAT_AID 0x2F //!> AID tag
-#define SAT_BROWSER_IDENTITY 0x30 //!> Browser Identity tag
+#define SAT_AID 0x2F //!> AID tag
+#define SAT_BROWSER_IDENTITY 0x30 //!> Browser Identity tag
#define SAT_URL 0x31 //!> URL tag
#define SAT_BEARER 0x32 //!> Bearer tag
#define SAT_PROVISIONING_FILE_REFERENCE 0x33 //!> Provisioning Reference File tag
//#define SAT_CARD_READER_IDENTIFIER 0x3A //!> Card reader identifier tag
#define SAT_FILE_UPDATE_INFORMATION 0x3B //!> File Update Information tag
#define SAT_SIM_ME_INTERFACE_TRANSPORT_LEVEL 0x3C //!> UICC/terminal interface transport level tag
-// 0x3D Not used
+// 0x3D Not used
#define SAT_OTHER_ADDRESS 0x3E //!> Other address (data destination address) tag
-//
+//
//Access Technology tag 0x3F
//Display parameters tag 0x40
//Service Record tag 0x41
//Multimedia Message Reference tag '6A'
//Multimedia Message Identifier tag '6B'
//Reserved for 3GPP (Multimedia Message Transfer Status tag) 1 '6C'
-//MEID tag '6D'
-//Multimedia Message Content Identifier tag '6E'
-//Multimedia Message Notification tag '6F'
+//MEID tag '6D'
+//Multimedia Message Content Identifier tag '6E'
+//Multimedia Message Notification tag '6F'
// admissible values for kGetDataDeviceIdentities param
//! Card EF access mode
#define SAT_CARD_MODE_GET_INFO 0x00 //!< Get EF information
-#define SAT_CARD_MODE_READ_FILE 0x01 //!< Read EF body
-#define SAT_CARD_MODE_READ_PART 0x02 //!< Read EF part
+#define SAT_CARD_MODE_READ_FILE 0x01 //!< Read EF body
+#define SAT_CARD_MODE_READ_PART 0x02 //!< Read EF part
#define SAT_CARD_MODE_READ_REC 0x03 //!< Read EF record
//! Card EF structure
/******************************************************************************************************************************************************/
-//! SetUpEventList parameters: each byte in the event list shall be coded with one of the values below:
+//! SetUpEventList parameters: each byte in the event list shall be coded with one of the values below:
#define SAT_EVENT_USER_ACTIVITY 0x04 //!< User activity
#define SAT_EVENT_IDLE_SCREEN_AVAILABLE 0x05 //!< Idle screen available
#define SAT_EVENT_LANGUAGE_SELECTION 0x07 //!< Language selection
/**********************************************************************************************************************************************************************
- *
- * Command qualifier
- *
+ *
+ * Command qualifier
+ *
**********************************************************************************************************************************************************************/
//! Refresh command qualifier
/******************************************************************************************************************************************************/
-//! SetUpCall command qualifier
+//! SetUpCall command qualifier
#define SAT_SETUP_CALL_ONLY_IF_NOT_BUSY 0x00 //!< Set up call, but only if not currently busy on another call
#define SAT_SETUP_CALL_ONLY_IF_NOT_BUSY_WITH_REDIAL 0x01 //!< Set up call, but only if not currently busy on another call, with redial
#define SAT_SETUP_CALL_AND_PUT_ALL_OTHER_CALLS_ON_HOLD 0x02 //!< Set up call, putting all other calls (if any) on hold
/******************************************************************************************************************************************************/
-//! DISPLAY MULTIMEDIA MESSAGE / DISPLAY TEXT command qualifier
+//! DISPLAY MULTIMEDIA MESSAGE / DISPLAY TEXT command qualifier
// priority
#define SAT_NORMAL_PRIORITY 0x00 //!<normal priority
#define SAT_RESP_TYPE_UNPACKED_DIGITS_ONLY 0x02 // unpacked digits (0 to 9, *, #, and +) only, applies to GetInkey, GetInput
#define SAT_RESP_TYPE_PACKED_DIGITS_ONLY 0x03 // packed digits (0 to 9, *, #, and +) only, applies to GetInput
#define SAT_RESP_TYPE_UCS2_DIGITS_ONLY 0x04 // UCS2 digits (0 to 9, *, #, and +) only, applies to GetInkey, GetInput
-#define SAT_RESP_TYPE_UNPACKED_SMS_ALPHABET 0x05 // SMS default alphabet 8 bits data, applies to GetInkey, GetInput
+#define SAT_RESP_TYPE_UNPACKED_SMS_ALPHABET 0x05 // SMS default alphabet 8 bits data, applies to GetInkey, GetInput
#define SAT_RESP_TYPE_PACKED_SMS_ALPHABET 0x06 // SMS default alphabet 7 bits packed, applies to GetInput
#define SAT_RESP_TYPE_UCS2_ALPHABET 0x07 // 16 bits UCS2 alphabet, applies to GetInkey, GetInput
/******************************************************************************************************************************************************/
-//! LaunchBrowser command qualifier
+//! LaunchBrowser command qualifier
#define SAT_LAUNCH_BROWSER_IF_NOT_ALREADY_LAUNCHED 0x00 //!< launch browser if not already launched
#define SAT_LAUNCH_BROWSER_USE_EXISTING 0x02 //!< use the existing browser (the browser shall not use the active existing secured session)
#define SAT_LAUNCH_BROWSER_CLOSE_EXISTING_AND_LAUNCH_NEW 0x03 //!< close the existing browser session and launch new browser session
#define SAT_BEARER_SMS 0x00 //!< short message
#define SAT_BEARER_CSD 0x01 //!< circuit switched data
#define SAT_BEARER_USSD 0x02 //!<
-#define SAT_BEARER_GPRS 0x03 //!<
+#define SAT_BEARER_GPRS 0x03 //!<
/******************************************************************************************************************************************************/
-//! Command OPEN CHANNEL parameters or response to OPEN CHANNEL:
+//! Command OPEN CHANNEL parameters or response to OPEN CHANNEL:
//type of adress in the TLV object "Other adress"
#define SAT_ADDRESS_IPV4 0x21
#define SAT_TRANSPORT_TCP_CLIENT_MODE 0x02 //!< TCP, UICC in client mode (as defined in RFC 793 [10])
#define SAT_TRANSPORT_TCP_SERVER_MODE 0x03 //!< TCP, UICC in server mode (as defined in RFC 793 [10])
-//! Bearer type in the bearer description parameter
+//! Bearer type in the bearer description parameter
#define SAT_CSD 0x01 //!< circuit switched data
#define SAT_GPRS_3G_PACKET_SERVICE 0x02 //!< GPRS / 3G packet service
#define SAT_DEFAULT_BEARER 0x03 //!< default bearer for requested transport layer
#define SAT_BLUETOOTH 0x05 //!< Bluetooth
#define SAT_IRDA 0x06 //!< IrDA
#define SAT_RS232 0x07 //!< RS232
-#define SAT_PACKET_DATA_SERVICE 0x08 //!< TIA/EIA/IS-820 packet data service
+#define SAT_PACKET_DATA_SERVICE 0x08 //!< TIA/EIA/IS-820 packet data service
#define SAT_UTRAN 0x09 //!< UTRAN packet service with extended parameters
#define SAT_USB 0x10 //!< USB
/******************************************************************************************************************************************************/
-// Command Menu Selection parameters:
+// Command Menu Selection parameters:
#define SAT_MENU_SELECTION_NO_HELP_REQUESTED 0x00 //!< do not insert help request tag in the enveloppe message MENU SELECTION
#define SAT_MENU_SELECTION_HELP_REQUESTED 0x01 //!< insert help request tag in the enveloppe message MENU SELECTION to request help information on the item selected
//#define SAT_MENU_SELECTION_APP_MENU_REQUEST 0x03
/******************************************************************************************************************************************************/
-//! Browser termination cause to join in the structure of enveloppe (Browser termination)
+//! Browser termination cause to join in the structure of enveloppe (Browser termination)
#define SAT_BROWSER_USER_TERMINATION 0x00
#define SAT_BROWSER_ERROR_TERMINATION 0x01
bool is_flight_mode(void);
-#endif
+#endif
GSM_SEC_CHANGE_LOCKING_PW, /* 0x03 : Change Locking Password Message */
GSM_SEC_SIM_LANG, /* 0x04 : SIM Language Message */
GSM_SEC_RSIM_ACCESS, /* 0x05 : +CRSM, Restricted SIM Access Message */
- GSM_SEC_GSIM_ACCESS, /* 0x06 : +CSIM, General SIM Access Message */
+ GSM_SEC_GSIM_ACCESS, /* 0x06 : +CSIM, General SIM Access Message */
GSM_SEC_SIM_ICC_TYPE, /* 0x07 : SIM ICC Type Message*/
GSM_SEC_LOCK_INFO, /* 0x08 : Lock Information Message*/
GSM_SEC_ISIM_AUTH, /* 0x9 : ISIM Authentication Message */
GSM_SEC_MAX
-} gsm_sec_sub_cmd_type;
+} gsm_sec_sub_cmd_type;
typedef enum{
GSM_CALL_OUTGOING=0x01, /* 0x01 : Call Outgoing Message */
*********************************************************************/
/* ------------------------------------------------------------------------
- This is the most important header file for understanding the library architecture.
+ This is the most important header file for understanding the library architecture.
This goes like an instance of the structure, _GSM_StateMachine.
So, you can figure out the whole architecture by analyzing this structure members.
int ArrayIndex;
bool PBMirroringDone;
bool AutoRedial;
- /*
+ /*
GSM_PHONEBOOK_ALL *PBAllItem;
GSM_PB_ONE_ITEM *PBOneItem;
GSM_PB_StorageInfo *pbinfo;
/* Update for public open */
/* WIRELESS */
-static const unsigned char default_identity[64] = {
- 0x01, 0x01, 0x00, 0x10, 0x02, 0xd7, 0xa4, 0xb4, 0xc8, 0x2c,
- 0x4e, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31,
+static const unsigned char default_identity[64] = {
+ 0x01, 0x01, 0x00, 0x10, 0x02, 0xd7, 0xa4, 0xb4, 0xc8, 0x2c,
+ 0x4e, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31,
0x31, 0x23 };
int oem_rx_net_current_plmn_get(void)
}
int oem_rx_sim_sec_check_password_req(void* ptr_data, int data_len)
-{
+{
SIM_DEBUG("\n");
return server_rx_sim_sec_check_password_req(ptr_data, data_len);
}
}
int oem_tx_sim_sec_check_password_res(void* ptr_data)
-{
+{
SIM_DEBUG("\n");
return at_tx_sim_sec_check_password_res(ptr_data);
}
struct _SatCmdResponse
{
char* respP; //!< Associated text response
- unsigned char itemIdentifier; //!< Item identifier
+ unsigned char itemIdentifier; //!< Item identifier
int respSize; //!< Associated text response size in bytes
char cmdId; //!< Command Identifier
char respType; //!< Expected response type, see ALP_TEL_CAT_RESP_TYPE_XXX
int subAddressSize; //!< subaddress size in bytes
char bearerCapSize; //!< Bearer capability size, in bytes
- unsigned long duration; //!< if the time elapsed since the first call set-up attempt has exceeded the duration request, the redial mechanism shall be terminated
+ unsigned long duration; //!< if the time elapsed since the first call set-up attempt has exceeded the duration request, the redial mechanism shall be terminated
char condition; //!< Set up call commmand qualifier, see ALP_TEL_CAT_SETUP_CALL_XXX
char userConfIconId; //!< Icon id. 0 if no icon
struct _SatItemList
{
SatItem* firstItemP; //!< The first Item
- int itemCount; //!< Number of items
+ int itemCount; //!< Number of items
char softKey; //!< Item can be selected by tapping on its icon
char helpInfo; //!< Help information is provided by the SIM
char defItemId; //!< Identifier of the item that should be pre-selected.
};
-//! answer made by the phone module directly to the SIM
+//! answer made by the phone module directly to the SIM
typedef struct _SatMEanswer SatMEanswer;
struct _SatMEanswer
{
char cmdId; //!< Command Identifier
- char resCode; //!< Result codes applicable to command iCmdId
+ char resCode; //!< Result codes applicable to command iCmdId
char addInfo; //!< Additional information code
};
-//! answer made by the SIM to the phone module CALL CONTROL or MO Short Message CONTROL command
+//! answer made by the SIM to the phone module CALL CONTROL or MO Short Message CONTROL command
typedef struct _SatSIManswer SatSIManswer;
struct _SatSIManswer
{
char* textP; //!< Text to display
int textSize; //!< The size of the encoded text
- char* addressP1; //!> if it's a call control answer adressP1= dialling number, if the address data is not present, the terminal shall assume the dialling number is not to be modified
+ char* addressP1; //!> if it's a call control answer adressP1= dialling number, if the address data is not present, the terminal shall assume the dialling number is not to be modified
//!> if it's a MO short message control answer addressP1= RP_Destination_Address, if the address data object 1 is not present, then the ME shall assume the RP_Destination_Address of the Service Centre is not to be modified.
char addressSize1; //!> address size
char* capabilityConfP1; //!< Capability configuration parameters1
char capabilityConfSize1;//!< the capability configuration parameters1 size
- char* capabilityConfP2; //!< Capability configuration parameters2
+ char* capabilityConfP2; //!< Capability configuration parameters2
char capabilityConfSize2;//!< the capability configuration parameters2 size
};
-// SIMPLE-TLV data objects tags
+// SIMPLE-TLV data objects tags
#define SAT_COMMAND_DETAILS 0x01 //!> Command details tag
#define SAT_DEVICE_IDENTITIES 0x02 //!> Device identity tag
#define SAT_RESULT 0x03 //!> Result tag
-#define SAT_DURATION 0x04 //!> Duration tag
+#define SAT_DURATION 0x04 //!> Duration tag
#define SAT_ALPHA_IDENTIFIER 0x05 //!> Alpha identifier tag
#define SAT_ADDRESS 0x06 //!> Address tag
#define SAT_CAPABILILITY_CONFIGURATION_PARAMETERS 0x07 //!> Capability configuration parameters tag
#define SAT_USSD_STRING 0x0A //!> USSD string tag
#define SAT_SMS_TPDU 0x0B //!> SMS TPDU tag
#define SAT_CELL_BROADCAST_PAGE 0x0C //!> Cell Broadcast page tag
-#define SAT_TEXT_STRING 0x0D //!> Text string tag
+#define SAT_TEXT_STRING 0x0D //!> Text string tag
#define SAT_TONE 0x0E //!> Tone tag
#define SAT_ITEM 0x0F //!> Item tag
-#define SAT_ITEM_IDENTIFIER 0x10 //!> Item identifier tag
-#define SAT_RESPONSE_LENGTH 0x11 //!> Response length tag
+#define SAT_ITEM_IDENTIFIER 0x10 //!> Item identifier tag
+#define SAT_RESPONSE_LENGTH 0x11 //!> Response length tag
#define SAT_FILE_LIST 0x12 //!> File List tag
#define SAT_LOCATION_INFORMATION 0x13 //!> Location Information tag
-#define SAT_IMEI 0x14 //!> IMEI tag
-#define SAT_HELP_REQUEST 0x15 //!> Help request tag
-#define SAT_NETWORK_MEASUREMENT_RESULTS 0x16 //!> Network Measurement Results tag
+#define SAT_IMEI 0x14 //!> IMEI tag
+#define SAT_HELP_REQUEST 0x15 //!> Help request tag
+#define SAT_NETWORK_MEASUREMENT_RESULTS 0x16 //!> Network Measurement Results tag
#define SAT_DEFAULT_TEXT 0x17 //!> Default Text tag
#define SAT_ITEMS_NEXT_ACTION_INDICATOR 0x18 //!> Items Next Action Indicator tag
#define SAT_EVENT_LIST 0x19 //!> Event list tag
#define SAT_CAUSE 0x1A //!> Cause tag
-#define SAT_LOCATION_STATUS 0x1B //!> Location status tag
+#define SAT_LOCATION_STATUS 0x1B //!> Location status tag
#define SAT_TRANSACTION_IDENTIFIER 0x1C //!> Transaction identifier tag
#define SAT_BCCH_CHANNEL_LIST 0x1D //!> BCCH channel list tag
#define SAT_ICON_IDENTIFIER 0x1E //!> Icon identifier tag
#define SAT_ITEM_ICON_IDENTIFIER_LIST 0x1F //!> Item Icon identifier list tag
//#define SAT_CARD_READER_STATUS 0x20 //!> Card reader status tag
#define SAT_CARD_ATR 0x21 //!> Card ATR tag
-#define SAT_C_ADPU 0x22 //!> C-APDU tag
+#define SAT_C_ADPU 0x22 //!> C-APDU tag
#define SAT_R_ADPU 0x23 //!> R-APDU tag
#define SAT_TIMER_IDENTIFIER 0x24 //!> Timer identifier tag
#define SAT_TIMER_VALUE 0x25 //!> Timer value tag
#define SAT_DTMF_STRING 0x2C //!> DTMF string tag
#define SAT_LANGUAGE 0x2D //!> Language tag
#define SAT_TIMING_ADVANCE 0x2E //!> Timing Advance tag
-#define SAT_AID 0x2F //!> AID tag
-#define SAT_BROWSER_IDENTITY 0x30 //!> Browser Identity tag
+#define SAT_AID 0x2F //!> AID tag
+#define SAT_BROWSER_IDENTITY 0x30 //!> Browser Identity tag
#define SAT_URL 0x31 //!> URL tag
#define SAT_BEARER 0x32 //!> Bearer tag
#define SAT_PROVISIONING_FILE_REFERENCE 0x33 //!> Provisioning Reference File tag
//#define SAT_CARD_READER_IDENTIFIER 0x3A //!> Card reader identifier tag
#define SAT_FILE_UPDATE_INFORMATION 0x3B //!> File Update Information tag
#define SAT_SIM_ME_INTERFACE_TRANSPORT_LEVEL 0x3C //!> UICC/terminal interface transport level tag
-// 0x3D Not used
+// 0x3D Not used
#define SAT_OTHER_ADDRESS 0x3E //!> Other address (data destination address) tag
-//
+//
//Access Technology tag 0x3F
//Display parameters tag 0x40
//Service Record tag 0x41
//Multimedia Message Reference tag '6A'
//Multimedia Message Identifier tag '6B'
//Reserved for 3GPP (Multimedia Message Transfer Status tag) 1 '6C'
-//MEID tag '6D'
-//Multimedia Message Content Identifier tag '6E'
-//Multimedia Message Notification tag '6F'
+//MEID tag '6D'
+//Multimedia Message Content Identifier tag '6E'
+//Multimedia Message Notification tag '6F'
// admissible values for kGetDataDeviceIdentities param
//! Card EF access mode
#define SAT_CARD_MODE_GET_INFO 0x00 //!< Get EF information
-#define SAT_CARD_MODE_READ_FILE 0x01 //!< Read EF body
-#define SAT_CARD_MODE_READ_PART 0x02 //!< Read EF part
+#define SAT_CARD_MODE_READ_FILE 0x01 //!< Read EF body
+#define SAT_CARD_MODE_READ_PART 0x02 //!< Read EF part
#define SAT_CARD_MODE_READ_REC 0x03 //!< Read EF record
//! Card EF structure
/******************************************************************************************************************************************************/
-//! SetUpEventList parameters: each byte in the event list shall be coded with one of the values below:
+//! SetUpEventList parameters: each byte in the event list shall be coded with one of the values below:
#define SAT_EVENT_USER_ACTIVITY 0x04 //!< User activity
#define SAT_EVENT_IDLE_SCREEN_AVAILABLE 0x05 //!< Idle screen available
#define SAT_EVENT_LANGUAGE_SELECTION 0x07 //!< Language selection
/**********************************************************************************************************************************************************************
- *
- * Command qualifier
- *
+ *
+ * Command qualifier
+ *
**********************************************************************************************************************************************************************/
//! Refresh command qualifier
/******************************************************************************************************************************************************/
-//! SetUpCall command qualifier
+//! SetUpCall command qualifier
#define SAT_SETUP_CALL_ONLY_IF_NOT_BUSY 0x00 //!< Set up call, but only if not currently busy on another call
#define SAT_SETUP_CALL_ONLY_IF_NOT_BUSY_WITH_REDIAL 0x01 //!< Set up call, but only if not currently busy on another call, with redial
#define SAT_SETUP_CALL_AND_PUT_ALL_OTHER_CALLS_ON_HOLD 0x02 //!< Set up call, putting all other calls (if any) on hold
/******************************************************************************************************************************************************/
-//! DISPLAY MULTIMEDIA MESSAGE / DISPLAY TEXT command qualifier
+//! DISPLAY MULTIMEDIA MESSAGE / DISPLAY TEXT command qualifier
// priority
#define SAT_NORMAL_PRIORITY 0x00 //!<normal priority
#define SAT_RESP_TYPE_UNPACKED_DIGITS_ONLY 0x02 // unpacked digits (0 to 9, *, #, and +) only, applies to GetInkey, GetInput
#define SAT_RESP_TYPE_PACKED_DIGITS_ONLY 0x03 // packed digits (0 to 9, *, #, and +) only, applies to GetInput
#define SAT_RESP_TYPE_UCS2_DIGITS_ONLY 0x04 // UCS2 digits (0 to 9, *, #, and +) only, applies to GetInkey, GetInput
-#define SAT_RESP_TYPE_UNPACKED_SMS_ALPHABET 0x05 // SMS default alphabet 8 bits data, applies to GetInkey, GetInput
+#define SAT_RESP_TYPE_UNPACKED_SMS_ALPHABET 0x05 // SMS default alphabet 8 bits data, applies to GetInkey, GetInput
#define SAT_RESP_TYPE_PACKED_SMS_ALPHABET 0x06 // SMS default alphabet 7 bits packed, applies to GetInput
#define SAT_RESP_TYPE_UCS2_ALPHABET 0x07 // 16 bits UCS2 alphabet, applies to GetInkey, GetInput
/******************************************************************************************************************************************************/
-//! LaunchBrowser command qualifier
+//! LaunchBrowser command qualifier
#define SAT_LAUNCH_BROWSER_IF_NOT_ALREADY_LAUNCHED 0x00 //!< launch browser if not already launched
#define SAT_LAUNCH_BROWSER_USE_EXISTING 0x02 //!< use the existing browser (the browser shall not use the active existing secured session)
#define SAT_LAUNCH_BROWSER_CLOSE_EXISTING_AND_LAUNCH_NEW 0x03 //!< close the existing browser session and launch new browser session
#define SAT_BEARER_SMS 0x00 //!< short message
#define SAT_BEARER_CSD 0x01 //!< circuit switched data
#define SAT_BEARER_USSD 0x02 //!<
-#define SAT_BEARER_GPRS 0x03 //!<
+#define SAT_BEARER_GPRS 0x03 //!<
/******************************************************************************************************************************************************/
-//! Command OPEN CHANNEL parameters or response to OPEN CHANNEL:
+//! Command OPEN CHANNEL parameters or response to OPEN CHANNEL:
//type of adress in the TLV object "Other adress"
#define SAT_ADDRESS_IPV4 0x21
#define SAT_TRANSPORT_TCP_CLIENT_MODE 0x02 //!< TCP, UICC in client mode (as defined in RFC 793 [10])
#define SAT_TRANSPORT_TCP_SERVER_MODE 0x03 //!< TCP, UICC in server mode (as defined in RFC 793 [10])
-//! Bearer type in the bearer description parameter
+//! Bearer type in the bearer description parameter
#define SAT_CSD 0x01 //!< circuit switched data
#define SAT_GPRS_3G_PACKET_SERVICE 0x02 //!< GPRS / 3G packet service
#define SAT_DEFAULT_BEARER 0x03 //!< default bearer for requested transport layer
#define SAT_BLUETOOTH 0x05 //!< Bluetooth
#define SAT_IRDA 0x06 //!< IrDA
#define SAT_RS232 0x07 //!< RS232
-#define SAT_PACKET_DATA_SERVICE 0x08 //!< TIA/EIA/IS-820 packet data service
+#define SAT_PACKET_DATA_SERVICE 0x08 //!< TIA/EIA/IS-820 packet data service
#define SAT_UTRAN 0x09 //!< UTRAN packet service with extended parameters
#define SAT_USB 0x10 //!< USB
/******************************************************************************************************************************************************/
-// Command Menu Selection parameters:
+// Command Menu Selection parameters:
#define SAT_MENU_SELECTION_NO_HELP_REQUESTED 0x00 //!< do not insert help request tag in the enveloppe message MENU SELECTION
#define SAT_MENU_SELECTION_HELP_REQUESTED 0x01 //!< insert help request tag in the enveloppe message MENU SELECTION to request help information on the item selected
//#define SAT_MENU_SELECTION_APP_MENU_REQUEST 0x03 //!< ??? specific to I250 phone driver
/******************************************************************************************************************************************************/
-//! Browser termination cause to join in the structure of enveloppe (Browser termination)
+//! Browser termination cause to join in the structure of enveloppe (Browser termination)
#define SAT_BROWSER_USER_TERMINATION 0x00
#define SAT_BROWSER_ERROR_TERMINATION 0x01
#include "phoneprotocol4gsm.h"
#include "vgsm_phone.h"
#include "vgsm_ss.h"
-// #include <mzgsmsat.h>
+// #include <mzgsmsat.h>
// #include <mzgsmsound.h>
#include "vgsm_sms.h"
#include "vgsm_gprs.h"
data[3] = callList->CallInfo[i].stat;
memset(&data[4], 0, MAX_GSM_DIALED_DIGITS_NUMBER);
- memcpy(&data[4], callList->CallInfo[i].number, callList->CallInfo[i].num_len);
+ memcpy(&data[4], callList->CallInfo[i].number, callList->CallInfo[i].num_len);
MOpacket.data = data;
MOpacket.group = GSM_CALL;
MOpacket.action = GSM_CALL_MAKE_REQ;
switch (action)
{
- case GSM_POWER_MODEM_ON_REQ:
+ case GSM_POWER_MODEM_ON_REQ:
oem_rx_power_up_exec();
break;
case GSM_POWER_BATTERY_STATUS_NOTI:
#include <vconf/vconf-keys.h>
/* For Flight Mode */
-int g_svc_type = VCONFKEY_TELEPHONY_SVCTYPE_3G;
+int g_svc_type = VCONFKEY_TELEPHONY_SVCTYPE_3G;
bool is_flight_mode(void)
{
if(vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &status)) {
TRACE(MSGL_WARN, "vconf_get_bool(%s) fail\n", VCONFKEY_TELEPHONY_FLIGHT_MODE);
- return ret;
- }
+ return ret;
+ }
- if(status == 1){
+ if(status == 1){
ret = true;
TRACE(MSGL_VGSM_INFO, "============ Flight mode On ==========\n");
}else{
ret = false;
TRACE(MSGL_VGSM_INFO, "============ Flight mode Off ==========\n");
- }
+ }
TRACE(MSGL_VGSM_INFO, "============ Flight mode value: %d ==========\n", ret);
- return ret;
+ return ret;
}
else {
TRACE(MSGL_FATAL,"\nTo set up the port --port [ portnumber ]\n ");
exit(1);
- }
+ }
}
}
"LXT_ID_CLIENT_EVENT_INJECTOR", //= 0x16, // ID of event injector
"LXT_ID_CLIENT_EVENT_MANAGER_RX", //= 0x17, // ID of event injector
"LXT_ID_CLIENT_EVENT_MANAGER_TX", //= 0x18, // ID of event injector
- "LXT_ID_CLIENT_EVENT_MANAGER", //= 0x19, // ID of event manager
+ "LXT_ID_CLIENT_EVENT_MANAGER", //= 0x19, // ID of event manager
};
default:
break;
}
- }
+ }
return releaseCnt;
}
{
/* apn: "Tizen", interface: "lo", ip: 1.2.3.4, primary dns: 10.10.10.10
, second dns: 11.11.11.11, gateway: 1.2.3.1, subnet: 255.255.255.0 */
- GprsDbEntry entry = {"Tizen", "lo", {1, 0x001F,
+ GprsDbEntry entry = {"Tizen", "lo", {1, 0x001F,
{0x01, 0x02, 0x03, 0x04}, {0x0A, 0x0A, 0x0A, 0x0A},
{0x0B, 0x0B, 0x0B, 0x0B}, {0x01, 0x02, 0x03, 0x01},
{0xFF, 0xFF, 0xFF, 0x00}}};
}
// load database
- vgsm_gprs_database_restore();
+ vgsm_gprs_database_restore();
len = sizeof(int) + (g_gprs_conflist.num * (255 + 10 + 23));
char *buf;
int i;
- // load
+ // load
vgsm_network_database_restore();
VGSM_DEBUG("num of current saved PLMN: %i \n", g_plmn_list.num_record);
}
// send noti to evt injector
- if ((buf = malloc(1 + g_plmn_list.num_record * 8)) == NULL) {
+ if ((buf = malloc(1 + g_plmn_list.num_record * 8)) == NULL) {
log_msg(MSGL_VGSM_ERR,"init_plmn_list: memory alloc error\n");
return;
}
}
int server_rx_call_release_incoming(void)
-{
+{
TRACE(MSGL_VGSM_INFO, "\n");
int releaseCnt = 0;
if(ret)
g_pdpcontext.h_comp = atoi(ret);
- log_msg(MSGL_VGSM_INFO,"MODE[%x] CID[%x] PDP_TYPE[%x] APN[%s] \n",
+ log_msg(MSGL_VGSM_INFO,"MODE[%x] CID[%x] PDP_TYPE[%x] APN[%s] \n",
g_pdpcontext.mode, g_pdpcontext.cid, g_pdpcontext.pdp_type, g_pdpcontext.apn);
log_msg(MSGL_VGSM_INFO,"PDP_ADDRESS[%s] D_COMP[%x] H_COMP[%x] \n",
g_pdpcontext.pdp_addr, g_pdpcontext.d_comp, g_pdpcontext.h_comp);
data[n++] =0x11; /* LAC 2bytes*/
memset(tmpbuf, '\0', sizeof(tmpbuf));
VGSM_DEBUG("plmn: %s\n", plmn_data);
- sprintf(tmpbuf, "(%d,\"%c%c%c%c%c%c\",\"%c%c%c%c%c%c\",\"%c%c%c%c%c%c\")", plmn_list->precord[i].status,
+ sprintf(tmpbuf, "(%d,\"%c%c%c%c%c%c\",\"%c%c%c%c%c%c\",\"%c%c%c%c%c%c\")", plmn_list->precord[i].status,
plmn_data[0], plmn_data[1], plmn_data[2], plmn_data[3], plmn_data[4], plmn_data[5],
plmn_data[0], plmn_data[1], plmn_data[2], plmn_data[3], plmn_data[4], plmn_data[5],
plmn_data[0], plmn_data[1], plmn_data[2], plmn_data[3], plmn_data[4], plmn_data[5]);
find_plmn(plmn, act);
#endif
- sprintf(sndbuf, "%s%d,%d,%s,%d%s", COPS, data[0], GSM_NET_PLMN_FORMAT_NUMERIC, default_plmn, data[2], CRLF);
+ sprintf(sndbuf, "%s%d,%d,%s,%d%s", COPS, data[0], GSM_NET_PLMN_FORMAT_NUMERIC, default_plmn, data[2], CRLF);
return oem_tx_net_current_plmn_resp(sndbuf, strlen(sndbuf));
}
}
static int sms_msg_hook_modify(void * data, int len)
-{
+{
int position;
unsigned char *rawdata = (unsigned char *)data;
TPDU_SMS_SUBMIT tpdu_submit;
}
else if(signal == AT_GSM_SS_CM_1_SEND) // release all active call and the other (held or waiting) call
{
- rtn = server_rx_call_release_all_active();
+ rtn = server_rx_call_release_all_active();
}
else if(signal == AT_GSM_SS_CM_2_SEND) // active call on hold and held or waiting call on active
{
- VGSM_DEBUG("g_ss_hold_response_error: err =%x \n", g_ss_hold_response_error);
+ VGSM_DEBUG("g_ss_hold_response_error: err =%x \n", g_ss_hold_response_error);
//at_gen_resp_send( g_ss_hold_response_error);
if ( g_ss_hold_response_error == 0x8000 )
rtn = server_rx_call_swap();
if(strcmp(callList->CallInfo[get_call_id()].number, ""))
{
- sprintf((char*)pdata, "%d,%d,%d,%d,%d,%s,%d", get_call_id() + 1, change_dir_for_at(callList->CallInfo[get_call_id()].dir),
- at_stat, AT_CALL_MODE_VOICE, AT_CALL_MPTY_FALSE,
- callList->CallInfo[get_call_id()].number,callList->CallInfo[get_call_id()].num_type);
+ sprintf((char*)pdata, "%d,%d,%d,%d,%d,%s,%d", get_call_id() + 1, change_dir_for_at(callList->CallInfo[get_call_id()].dir),
+ at_stat, AT_CALL_MODE_VOICE, AT_CALL_MPTY_FALSE,
+ callList->CallInfo[get_call_id()].number,callList->CallInfo[get_call_id()].num_type);
}
else
{
memset( data, 0, len * 2 );
sprintf((char*)data, "%d,%d,%d,%d,%d,%s,%d%s", callList->CallInfo[i].idx + 1,
change_dir_for_at(callList->CallInfo[i].dir),
- change_stat_for_at(callList->CallInfo[i].stat), AT_CALL_MODE_VOICE, callList->CallInfo[i].mpty,
+ change_stat_for_at(callList->CallInfo[i].stat), AT_CALL_MODE_VOICE, callList->CallInfo[i].mpty,
callList->CallInfo[i].number, callList->CallInfo[i].num_type, CRLF);
log_msg(MSGL_VGSM_INFO, "%s", data);
ret = oem_tx_call_status_noti(data, strlen((char*)data));
assert(valid_call_type(callList->CallInfo[i].call_type));
memset( data, 0, len * 2);
- sprintf((char*)data, "%s%d,%d,%d,%d,%d,%s,%d%s", CLCC,callList->CallInfo[i].idx + 1,
+ sprintf((char*)data, "%s%d,%d,%d,%d,%d,%s,%d%s", CLCC,callList->CallInfo[i].idx + 1,
change_dir_for_at(callList->CallInfo[i].dir),
- change_stat_for_at(callList->CallInfo[i].stat),
- AT_CALL_MODE_VOICE, callList->CallInfo[i].mpty,
+ change_stat_for_at(callList->CallInfo[i].stat),
+ AT_CALL_MODE_VOICE, callList->CallInfo[i].mpty,
callList->CallInfo[i].number, callList->CallInfo[i].num_type, CRLF);
log_msg(MSGL_VGSM_INFO, "%s", data);
ret = oem_tx_call_list_resp(data, strlen((char*)data));
memset( data, 0, sizeof(unsigned char)*len );
- if (packet && packet->data)
+ if (packet && packet->data)
{
VGSM_DEBUG("\n");
unsigned char *ptr = (unsigned char *)packet->data;
*/
pdata[0] = GSM_SEC_LOCK_TYPE_READY;
pdata[1] = GSM_SEC_LOCK_KEY_UNLOCKED;
-#if 0 //20110714 tmp
+#if 0 //20110714 tmp
oem_tx_sim_sec_pin_status_noti(pdata, data_size);
sleep(3);
}
static int sms_msg_hook_modify(void * data, int len)
-{
+{
int position;
unsigned char *rawdata = (unsigned char *)data;
TPDU_SMS_SUBMIT tpdu_submit;
{
GSM_Error error;
- s->ReplyNum = ReplyNum;
+ s->ReplyNum = ReplyNum;
s->Phone.Data.CMECode = 0;
s->Phone.Data.CMSCode = 0;
s->Phone.Data.PhonePower = false;
}
else{
#ifdef __arm__
- if (!_IsFlightMode() || first_boot) {
+ if (!_IsFlightMode() || first_boot) {
GSM_Device_DPRAMData *d = &s->Device.Data.DPRAM;
GSM_Phone_Data *Data = &s->Phone.Data;
int rc = -1;
if (actual != nbytes)
GSM_OSErrorInfo(s, "dpram_write");
return actual;
- }
+ }
actual += ret;
p += ret;
} while (actual < nbytes);
return actual;
-}
+}
static bool dpram_powerstatus(GSM_StateMachine *s)
{