[PATCH 1/2] gatserver: Restore GAtServer disconnect handling
by Zhenhua Zhang
Restore GAtServer disconnect handling when resuming a server session
---
gatchat/gatserver.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index c63f04b..49e0de4 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -1166,6 +1166,8 @@ void g_at_server_resume(GAtServer *server)
return;
}
+ g_at_io_set_disconnect_function(server->io, io_disconnect, server);
+
g_at_io_set_debug(server->io, server->debugf, server->debug_data);
g_at_io_set_read_handler(server->io, new_bytes, server);
--
1.6.3.3
10 years, 6 months
[PATCH] Introduction of HACKING file in phonesim
by Naresh Mehta
Signed-off-by: Naresh Mehta <nareshtechs(a)gmail.com>
---
HACKING | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 102 insertions(+), 0 deletions(-)
create mode 100644 HACKING
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..33eae20
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,102 @@
+Hacking on phonesim
+*******************
+
+phonesim is a soft modem that eliminates the need to have an actual AT
+modem connected to the system for testing and developing Ofono.
+
+Build tools requirements
+========================
+
+When building and testing directly from the repository it is important to
+have at least automake version 1.10 or later installed. All modern
+distributions should default to the latest version, but it seems that
+Debian's default is still an earlier version:
+
+ Check version
+ # dpkg -l '*automake*'
+
+ Install new version
+ # apt-get install automake1.10
+ # update-alternatives --config automake
+
+QT development libraries (libqt4-dev) are also required for building
+phonesim. It is recommended to install the QT 4 development tools package
+(qt4-dev-tools) as an alternative if available with your distribution.
+
+Working with the source code repository
+=======================================
+
+The repository contains two extra scripts that accomplish the bootstrap
+process. One is called "bootstrap" which is the basic scripts that uses the
+autotools scripts to create the needed files for building and installing.
+It makes sure to call the right programs depending on the usage of shared or
+static libraries or translations etc.
+
+The second program is called "bootstrap-configure". This program will make
+sure to properly clean the repository, call the "bootstrap" script and then
+call configure with proper settings for development. It will use the best
+options and pass them over to configure. These options normally include
+the enabling the maintainer mode and the debugging features.
+
+So while in a normal source project the call "./configure ..." is used to
+configure the project with its settings like prefix and extra options. In
+case of bare repositories call "./bootstrap-configure" and it will bootstrap
+the repository and calls configure with all the correct options to make
+development easier.
+
+In case of preparing for a release with "make distcheck", don't use
+bootstrap-configure since it could export development specific settings.
+
+So the normal steps to checkout, build and install such a repository is
+like this:
+
+ Checkout repository
+ # git clone git://git.kernel.org/pub/scm/network/ofono/phonesim.git
+ # cd phonesim
+
+ Configure and build
+ # ./bootstrap-configure
+ # make
+
+ Check installation
+ # make install DESTDIR=$PWD/x
+ # find x
+ # rm -rf x
+
+ Check distribution
+ # make distcheck
+
+ Final installation
+ # sudo make install
+
+ Remove autogenerated files
+ # make maintainer-clean
+
+
+Running from within the source code repository
+==============================================
+
+When using "./configure --enable-maintainer-mode" the automake scripts will
+use the plugins directly from within the repository. This removes the need
+to use "make install" when testing "phonesim". The "bootstrap-configure"
+automatically includes this option.
+
+ Run phonesim in foreground using the following options
+ # ./src/phonesim -p 12345 -gui xml/default.xml
+
+Check your modem.conf file and enable the phonesim configuration before
+executing the above command. Argument -p should be followed by the proper
+port number, in case you have changed the default "12345". Argument -gui
+will launch the gui once the modem is enabled.
+
+To enable the modem, make sure the ofono daemon is running and execute the
+enable-modem script with /phonesim argument (default defined in modem.conf,
+change if changes to that section has been made). The AT chat can then
+be seen in the GUI window. Running the script disable-modem with /phonesim
+argument will turn off the soft modem.
+
+The default.xml can be tweaked further to include additional AT-Commands and
+supposed responses from the soft modem.
+
+For production installations or distribution packaging it is important that
+the "--enable-maintainer-mode" option is NOT used.
--
1.7.0.4
10 years, 6 months
[PATCH 1/2] gatppp: Check ppp instance before unref it
by Zhenhua Zhang
---
gatchat/gatppp.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index 1d41ded..d9b1627 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -446,6 +446,9 @@ void g_at_ppp_unref(GAtPPP *ppp)
{
gboolean is_zero;
+ if (ppp == NULL)
+ return;
+
is_zero = g_atomic_int_dec_and_test(&ppp->ref_count);
if (is_zero == FALSE)
--
1.6.3.3
10 years, 6 months
[PATCH] test-server: Refactor set_raw_mode
by Zhenhua Zhang
Rename variable 'options' to 'ti' and use sizeof(ti).
---
gatchat/test-server.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gatchat/test-server.c b/gatchat/test-server.c
index 2911978..49012dc 100644
--- a/gatchat/test-server.c
+++ b/gatchat/test-server.c
@@ -846,13 +846,13 @@ static void server_destroy(gpointer user)
static void set_raw_mode(int fd)
{
- struct termios options;
+ struct termios ti;
- memset(&options, 0, sizeof(struct termios));
- tcgetattr(fd, &options);
+ memset(&ti, 0, sizeof(ti));
+ tcgetattr(fd, &ti);
tcflush(fd, TCIOFLUSH);
- cfmakeraw(&options);
- tcsetattr(fd, TCSANOW, &options);
+ cfmakeraw(&ti);
+ tcsetattr(fd, TCSANOW, &ti);
}
static gboolean create_tty(const char *modem_path)
--
1.6.3.3
10 years, 6 months
[PATCH] test-server: Use cfmakeraw to set TTY raw mode
by Zhenhua Zhang
Use cfmakeraw to disable echoing and special characters processing. If
we don't turn off ICRNL, TTY layer translates \r\n to \n\n.
---
gatchat/test-server.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/gatchat/test-server.c b/gatchat/test-server.c
index 25a1192..2911978 100644
--- a/gatchat/test-server.c
+++ b/gatchat/test-server.c
@@ -848,12 +848,10 @@ static void set_raw_mode(int fd)
{
struct termios options;
+ memset(&options, 0, sizeof(struct termios));
tcgetattr(fd, &options);
-
- /* Set TTY as raw mode to disable echo back of input characters
- * when they are received from Modem to avoid feedback loop */
- options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
-
+ tcflush(fd, TCIOFLUSH);
+ cfmakeraw(&options);
tcsetattr(fd, TCSANOW, &options);
}
--
1.6.3.3
10 years, 6 months
[PATCH 1/2] Voicecall gaps.
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
Missing voicecall functionality pieces from tp-ring point-of-view.
---
TODO | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/TODO b/TODO
index 470d4a6..fc539a7 100644
--- a/TODO
+++ b/TODO
@@ -265,6 +265,33 @@ Supplementary Services
Complexity: C8
+Voicecall
+=========
+
+- Supplementary service notifications on remote party actions:
+ - call has been put on hold (+CSSU: 2)
+ - call has been retrieved (+CSSU: 3), and
+ - joining call to a multiparty conference (+CSSU: 4)
+
+ Priority: Medium
+ Complexity: C1
+ Owner: Pekka Pessi <pekka.pessi(a)nokia.com>
+
+- Dial strings. Include CLIR prefixes and 2nd stage dial strings in the
+ DialString call property. Add dialstring accessor method to C API.
+
+ Priority: Medium
+
+- Provide feedback of sent DTMF tones. Emit SendingTones signal if modem can
+ provide approximate starting and stopping times for DTMF tones. Signal
+ argument contains a string of DTMF tones to be sent, or empty string when
+ all tones has been sent.
+
+ Priority: Medium
+ Complexity: C2
+ Owner: Pekka Pessi <pekka.pessi(a)nokia.com>
+
+
Miscellaneous
=============
--
1.7.0.4
10 years, 6 months
[PATCH] Voicecall gaps.
by Pekka.Pessi@nokia.com
From: Pekka Pessi <Pekka.Pessi(a)nokia.com>
Missing voicecall functionality pieces from tp-ring point-of-view.
---
TODO | 27 +++++++++++++++++++++++++++
doc/voicecallmanager-api.txt | 8 ++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/TODO b/TODO
index 470d4a6..fc539a7 100644
--- a/TODO
+++ b/TODO
@@ -265,6 +265,33 @@ Supplementary Services
Complexity: C8
+Voicecall
+=========
+
+- Supplementary service notifications on remote party actions:
+ - call has been put on hold (+CSSU: 2)
+ - call has been retrieved (+CSSU: 3), and
+ - joining call to a multiparty conference (+CSSU: 4)
+
+ Priority: Medium
+ Complexity: C1
+ Owner: Pekka Pessi <pekka.pessi(a)nokia.com>
+
+- Dial strings. Include CLIR prefixes and 2nd stage dial strings in the
+ DialString call property. Add dialstring accessor method to C API.
+
+ Priority: Medium
+
+- Provide feedback of sent DTMF tones. Emit SendingTones signal if modem can
+ provide approximate starting and stopping times for DTMF tones. Signal
+ argument contains a string of DTMF tones to be sent, or empty string when
+ all tones has been sent.
+
+ Priority: Medium
+ Complexity: C2
+ Owner: Pekka Pessi <pekka.pessi(a)nokia.com>
+
+
Miscellaneous
=============
diff --git a/doc/voicecallmanager-api.txt b/doc/voicecallmanager-api.txt
index 7877ac5..bc79fc3 100644
--- a/doc/voicecallmanager-api.txt
+++ b/doc/voicecallmanager-api.txt
@@ -108,10 +108,10 @@ Methods dict GetProperties()
void SendTones(string tones)
- Sends the DTMF tones to the network. Under GSM the
- tones have a fixed duration. Tones can be one of:
- '0' - '9', '*', '#', 'A', 'B', 'C', 'D'. The last four
- are typically not used in normal circumstances.
+ Sends the DTMF tones to the network. The tones have
+ a fixed duration. Tones can be one of: '0' - '9',
+ '*', '#', 'A', 'B', 'C', 'D'. The last four are
+ typically not used in normal circumstances.
Signals PropertyChanged(string property, variant value)
--
1.7.0.4
10 years, 6 months
[PATCH] gatserver: Don't free twice after user disconnect
by Zhenhua Zhang
It's possible to free gatserver in user disconnect function. So we
should not free it again.
---
gatchat/gatserver.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 3fa26a0..c63f04b 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -1019,9 +1019,6 @@ static void io_disconnect(gpointer user_data)
if (server->user_disconnect)
server->user_disconnect(server->user_disconnect_data);
-
- if (server->destroyed)
- g_free(server);
}
static void server_wakeup_writer(GAtServer *server)
--
1.6.3.3
10 years, 6 months
Question about set modem power state to off
by Zhang, Caiwen
Hi all,
When set modem power state to off, all atoms and interfaces except
'org.ofono.Modem' are
removed and unregistered. So all APIs execpt 'org.ofono.Modem' can not
be used after that.
But, when modem power state is off (AT+CFUN=0), some feature should
still be available. such
as access SIM card(import contact from SIM) and STK. I think maybe
ofono should at least keep 'phonebook'
and 'stk' atom after set power state to off.
best regards,
Caiwen
10 years, 6 months
Reg. SMS sent status
by సత్య కిషోర్
Hi All,
How an application notified that SMS is sent status (i.e success or failure) ?
Because storage of SMS in some database is application responsibility.
Once SMS sent status is received according to that application shall
take an action(status change) on the stored message (i.e. moving SMS
from OUTBOX to SENTBOX).
Can any one can help me regarding this.
Regards,
-- Satya.
10 years, 6 months