* [PATCH 0/3] Add STK APDU editor
@ 2012-08-24 8:32 Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 1/3] phonesim: accept STK command without application Nicolas Bertrand
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Nicolas Bertrand @ 2012-08-24 8:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
Add to phonesim the capability to symply send STK APDU
Nicolas Bertrand (3):
phonesim: accept STK command without application
controlbase_ui: Add manual stk command editor
control: Link functionnality to STK command editor
src/control.cpp | 12 ++++++++++++
src/control.h | 2 ++
src/controlbase.ui | 46 ++++++++++++++++++++++++++++++++++++++++++++++
src/phonesim.cpp | 8 ++++++--
4 files changed, 66 insertions(+), 2 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] phonesim: accept STK command without application
2012-08-24 8:32 [PATCH 0/3] Add STK APDU editor Nicolas Bertrand
@ 2012-08-24 8:32 ` Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 2/3] controlbase_ui: Add manual stk command editor Nicolas Bertrand
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas Bertrand @ 2012-08-24 8:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]
If the STK command is rightly formated, send OK even if
the sim application does not handle it. it's needed to
be able to manualy send STK command.
---
src/phonesim.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/phonesim.cpp b/src/phonesim.cpp
index 276ae47..aa4f8a2 100644
--- a/src/phonesim.cpp
+++ b/src/phonesim.cpp
@@ -985,8 +985,10 @@ bool SimRules::simCommand( const QString& cmd )
QByteArray response = QAtUtils::fromHex( cmd.mid(start) );
QSimTerminalResponse resp = QSimTerminalResponse::fromPdu( response );
- if ( !toolkitApp || !toolkitApp->response( resp ) )
+ if ( ( resp.command().type() == QSimCommand::NoCommand ) || !toolkitApp )
respond( "ERROR" );
+ else if ( !toolkitApp->response( resp ) )
+ respond( "OK" );
return true;
}
@@ -997,8 +999,10 @@ bool SimRules::simCommand( const QString& cmd )
QByteArray envelope = QAtUtils::fromHex( cmd.mid(start) );
QSimEnvelope env = QSimEnvelope::fromPdu( envelope );
- if (!toolkitApp || !toolkitApp->envelope( env ) )
+ if ( ( env.type() == QSimEnvelope::NoEnvelope ) || !toolkitApp )
respond( "ERROR" );
+ else if ( !toolkitApp->envelope( env ) )
+ respond( "OK" );
return true;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] controlbase_ui: Add manual stk command editor
2012-08-24 8:32 [PATCH 0/3] Add STK APDU editor Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 1/3] phonesim: accept STK command without application Nicolas Bertrand
@ 2012-08-24 8:32 ` Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 3/3] control: Link functionnality to STK " Nicolas Bertrand
2012-08-28 14:47 ` [PATCH 0/3] Add STK APDU editor Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas Bertrand @ 2012-08-24 8:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]
---
src/controlbase.ui | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/src/controlbase.ui b/src/controlbase.ui
index 4eb1355..e230d7c 100644
--- a/src/controlbase.ui
+++ b/src/controlbase.ui
@@ -1161,6 +1161,52 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="gbSTKCmd">
+ <property name="title">
+ <string>STK Command</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <widget class="QPushButton" name="pbSTKCmdSend">
+ <property name="geometry">
+ <rect>
+ <x>80</x>
+ <y>150</y>
+ <width>141</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Send</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit" name="teSTKCmdEditor">
+ <property name="geometry">
+ <rect>
+ <x>235</x>
+ <y>20</y>
+ <width>401</width>
+ <height>161</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="pbSTKClear">
+ <property name="geometry">
+ <rect>
+ <x>80</x>
+ <y>100</y>
+ <width>141</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Clear</string>
+ </property>
+ </widget>
+ </widget>
+ </item>
+ <item>
<widget class="QGroupBox" name="gbSATK">
<property name="title">
<string>Application</string>
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] control: Link functionnality to STK command editor
2012-08-24 8:32 [PATCH 0/3] Add STK APDU editor Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 1/3] phonesim: accept STK command without application Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 2/3] controlbase_ui: Add manual stk command editor Nicolas Bertrand
@ 2012-08-24 8:32 ` Nicolas Bertrand
2012-08-28 14:47 ` [PATCH 0/3] Add STK APDU editor Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas Bertrand @ 2012-08-24 8:32 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
---
src/control.cpp | 12 ++++++++++++
src/control.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/src/control.cpp b/src/control.cpp
index 3f1dd45..f518201 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -91,6 +91,8 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent)
connect(ui->pbAlerting, SIGNAL(clicked()), this, SLOT(setStateAlerting()));
connect(ui->pbActive, SIGNAL(clicked()), this, SLOT(setStateConnected()));
connect(ui->pbHangup, SIGNAL(clicked()), this, SLOT(setStateHangup()));
+ connect(ui->pbSTKCmdSend, SIGNAL(clicked()), this, SLOT(STKCmdSend()));
+ connect(ui->pbSTKClear, SIGNAL(clicked()), this, SLOT(STKClear()));
QStringList headers;
headers << "Sender" << "Priority" << "Notification Status";
@@ -625,6 +627,16 @@ void Control::handleNewApp()
widget->handleNewApp();
}
+void ControlWidget::STKCmdSend()
+{
+ emit unsolicitedCommand( "+CUSATP: " + ui->teSTKCmdEditor->toPlainText() );
+}
+
+void ControlWidget::STKClear()
+{
+ ui->teSTKCmdEditor->clear();
+}
+
void ControlWidget::simAppStart()
{
if ( ui->cbSimApps->currentIndex() >= 0 )
diff --git a/src/control.h b/src/control.h
index fd1a4e6..c4d5244 100644
--- a/src/control.h
+++ b/src/control.h
@@ -107,6 +107,8 @@ private slots:
void setStateAlerting();
void setStateConnected();
void setStateHangup();
+ void STKCmdSend();
+ void STKClear();
signals:
void unsolicitedCommand(const QString &);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Add STK APDU editor
2012-08-24 8:32 [PATCH 0/3] Add STK APDU editor Nicolas Bertrand
` (2 preceding siblings ...)
2012-08-24 8:32 ` [PATCH 3/3] control: Link functionnality to STK " Nicolas Bertrand
@ 2012-08-28 14:47 ` Denis Kenzior
3 siblings, 0 replies; 5+ messages in thread
From: Denis Kenzior @ 2012-08-28 14:47 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]
Hi Nicolas,
On 08/24/2012 03:32 AM, Nicolas Bertrand wrote:
> Add to phonesim the capability to symply send STK APDU
>
> Nicolas Bertrand (3):
> phonesim: accept STK command without application
> controlbase_ui: Add manual stk command editor
> control: Link functionnality to STK command editor
>
> src/control.cpp | 12 ++++++++++++
> src/control.h | 2 ++
> src/controlbase.ui | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> src/phonesim.cpp | 8 ++++++--
> 4 files changed, 66 insertions(+), 2 deletions(-)
>
I don't like this idea at all, pasting arbitrary PDUs is slow, error
prone and does not encourage any sort of automation. While Phonesim is
meant for people who know what they're doing, I'd still like to maintain
at least some resemblance of user-friendliness.
If you really need some way of sending PDUs that phonesim is incapable
of, feel free to modify the conformance application to emit the PDU in
question.
Regards,
-Denis
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-28 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 8:32 [PATCH 0/3] Add STK APDU editor Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 1/3] phonesim: accept STK command without application Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 2/3] controlbase_ui: Add manual stk command editor Nicolas Bertrand
2012-08-24 8:32 ` [PATCH 3/3] control: Link functionnality to STK " Nicolas Bertrand
2012-08-28 14:47 ` [PATCH 0/3] Add STK APDU editor Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.