Closed Bug 996369 Opened 6 years ago Closed 5 years ago

[OPEN C_1.3][STK]File Change Notification does not work

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(tracking-b2g:backlog)

RESOLVED WORKSFORME
tracking-b2g backlog

People

(Reporter: yu.hui1, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Zune 4.7; .NET4.0C; .NET4.0E; Tablet PC 2.0; TCO_20140414165917)

Steps to reproduce:

A.- Overview Description (technical background, concise explanation of the bug):
File Change Notification option is not working.
B.- Steps to Reproduce (initial conditions, required resources, step by step
instructions to reproduce):
1. Put the SIM Nº 7.
2. Go to File Change Notification in the STK menu.
3. Write a name and number.
4. Check the new contact in the phonebook.


Actual results:

C.- Actual Result (current bad behaviour that is reported as a bug):
When the option "File Change Notification " is selected, the DuT does not
display the option to insert a new contact and number.

When the proactive command is GetInput, there is no input interface in UI.


Expected results:

D.- Expected Result (correct behaviour wished):
Test Case affected:
TC-USATT-STOOL-048b:    "File Change Notification"
Application for testing ‘File Change Notification’.
A SIM Toolkit application from card number 7 will be used to test this command. 
The application will ask for a name and number for introducing in the first
free position of the ADN file. Afterwards, it will perform a Refresh of this
kind, indicating the modification in the agenda file. 
After a couple of second after having updated the new entry, the terminal must
have also refreshed its memory with the new entry.
blocking-b2g: --- → 1.3?
OS: All → Gonk (Firefox OS)
Hardware: All → ARM
blocking-b2g: 1.3? → backlog
Component: General → Gaia::Settings
I didn't see the command 0x1 (STK_CMD_REFRESH) in the provided traces.

NI to STK Gecko team. @Yoshi, is the File Change Notification REFRESH option supported?

See [1] section 6.4.7

[1] http://www.ttfn.net/techno/smartcards/GSM11-14V5-2-0.pdf
Flags: needinfo?(allstars.chh)
(In reply to yuhui from comment #0)
> Actual results:
> 
> C.- Actual Result (current bad behaviour that is reported as a bug):
> When the option "File Change Notification " is selected, the DuT does not
> display the option to insert a new contact and number.
> 
> When the proactive command is GetInput, there is no input interface in UI.
> 

From the description it seems the bug is 'There's no input interface in UI'?

To reply frsela's question, currently we don't notify FileChangNotification to gaia because most of the information is too low level and the most effort is handled by modem already.
Flags: needinfo?(allstars.chh)
Depends on: 1032685
This bug has been checked with unagi (ref ril) and buri (comm ril) master builds (07/01):
Hamichi: gecko 59acc6 ,  gaia 505008f
Unagi:   gecko d7320fc , gaia 505008f

And, the behaviour seen is a little bit different than the reported in Comment #0. 
Using the same SIM card, when going to STK menu and tapping on File Change Notification, a new screen is shown where it is possible to introduce the Name of a new contact, then after accepting there, it is possible to introduce the Phone Number. Once it is accepted, nothing happens.
The contact is not shown in the phonebook. But, if user imports the contacts from the SIM card, the contact just created is correctly imported in the phonebook.


Please see log files attached in case they help to understand and fix the issue. 
Thanks
Assignee: nobody → salva
(In reply to Isabel Rios [:isabel_rios] on maternity leave from comment #4)
> Created attachment 8449488 [details]
> Hamachi_Master_logs.txt

I took a look at the log. And if I understood the problem correctly, it's expected that REFRESH command was coming and triggered refecth sim records. Is my understanding correct so far?

But from the log, even in gecko "ril_worker" I didn't see that REFRESH command was reported from modem/rild.
The only command ril_worker received was "0x23", i.e. |RIL Worker: [0] commandNumber = 1 typeOfCommand = 23 commandQualifier = 1|.

Can you provide log again with |adb logcat -b radio -b main -v time|? We'd need to check radio log and see if anything wrong in modem/rild. Thank you.
Flags: needinfo?(salva)
(In reply to Isabel Rios [:isabel_rios] on maternity leave from comment #3)
> This bug has been checked with unagi (ref ril) and buri (comm ril) master
> builds (07/01):
> Hamichi: gecko 59acc6 ,  gaia 505008f
> Unagi:   gecko d7320fc , gaia 505008f
> 
> And, the behaviour seen is a little bit different than the reported in
> Comment #0. 
> Using the same SIM card, when going to STK menu and tapping on File Change
> Notification, a new screen is shown where it is possible to introduce the
> Name of a new contact, then after accepting there, it is possible to
> introduce the Phone Number. Once it is accepted, nothing happens.
> The contact is not shown in the phonebook. 

Is the phonebook here a local cache or the SIM phonebook?
May I know how you checked this?

> But, if user imports the contacts
> from the SIM card, the contact just created is correctly imported in the
> phonebook.
> 
> 
> Please see log files attached in case they help to understand and fix the
> issue. 
> Thanks
My SIM card does not have STK enabled, I'm debugging blindly.
Flags: needinfo?(salva) → needinfo?(yu.hui1)
Fernando, notice the issue is related with not showing the proper UI. It seems to me there is no such UI. Furthermore, I don't found where is `nextActionList` handled so I don't think this is a bug but a non-implemented feature.
Flags: needinfo?(yu.hui1) → needinfo?(frsela)
We have two problems here:

 1.- As per Yoshi's comment 2, we know this FileChangeNotification is not implemented. So even in the case the STK application get to display the input for user and phone, we already the test will fail.

 2.- After an offline conversation with Fernando we agree on the SIM is not answering to the menu item selection for "File Change Notification". Information about the proper id selected is being sent to the SIM but this is not answering. This causes the problem described in comment 0.

So asking Yoshi's to redirect the bug to someone in platform as the problem is not caused in Gaia's level but in the SIM application or Gecko, at most.
Assignee: salva → nobody
Flags: needinfo?(frsela) → needinfo?(allstars.chh)
Flags: needinfo?(allstars.chh) → needinfo?(htsai)
(In reply to Salvador de la Puente González [:salva] from comment #9)
> We have two problems here:
> 
>  1.- As per Yoshi's comment 2, we know this FileChangeNotification is not
> implemented. 

Let me remark here. 

Currently, gecko has handled FileChangeNotification [1] and that type of command with empty options is dispatched to gaia as well. Because the options are empty, that command is discarded by gaia [2]

But note that, according to my comment 8 and according to the attachment 8449488 [details], gecko has even *not* received cmd_refresh at all. 


> So even in the case the STK application get to display the
> input for user and phone, we already the test will fail.
> 
>  2.- After an offline conversation with Fernando we agree on the SIM is not
> answering to the menu item selection for "File Change Notification".
> Information about the proper id selected is being sent to the SIM but this
> is not answering. This causes the problem described in comment 0.
> 

Sorry that I am a little confused...

According to Comment 0, seems the problem is "When the proactive command is GetInput, there is no input interface in UI." So the problem is "no UI".

However, comment 9 said "the proper id selected is being sent to the SIM" so it looks "there's UI displayed, and user has selected id" which conflicts comment 0.

Moreover, comment 3 provided different observation from comment 0 and comment 9. And looks comment 3 also reached the expected behavior of comment 0, SIM EFs are updated accordingly. What's the problem with comment 3? Am I missing something?

As I feel those comments are somehow conflicting, could you help clarify the real issue again? Let's step back, and confirm the current behavior and expected behavior first. Thank you. :)

> So asking Yoshi's to redirect the bug to someone in platform as the problem
> is not caused in Gaia's level but in the SIM application or Gecko, at most.

[1] http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.js?from=ril_worker.js#10753
[2] https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/icc.js#L136
Flags: needinfo?(htsai) → needinfo?(salva)
(In reply to Hsin-Yi Tsai (OOO Sep. 22) [:hsinyi] from comment #10)
> (In reply to Salvador de la Puente González [:salva] from comment #9)
> > We have two problems here:
> > 
> >  1.- As per Yoshi's comment 2, we know this FileChangeNotification is not
> > implemented. 
> 
> Let me remark here. 
> 
> Currently, gecko has handled FileChangeNotification [1] and that type of
> command with empty options is dispatched to gaia as well. Because the
> options are empty, that command is discarded by gaia [2]
> 
> But note that, according to my comment 8 and according to the attachment
                              ^^^^^^^^^^^^ sorry, it's comment 5 :)  

> 8449488 [details], gecko has even *not* received cmd_refresh at all. 
> 
> 
> > So even in the case the STK application get to display the
> > input for user and phone, we already the test will fail.
> > 
> >  2.- After an offline conversation with Fernando we agree on the SIM is not
> > answering to the menu item selection for "File Change Notification".
> > Information about the proper id selected is being sent to the SIM but this
> > is not answering. This causes the problem described in comment 0.
> > 
> 
> Sorry that I am a little confused...
> 
> According to Comment 0, seems the problem is "When the proactive command is
> GetInput, there is no input interface in UI." So the problem is "no UI".
> 
> However, comment 9 said "the proper id selected is being sent to the SIM" so
> it looks "there's UI displayed, and user has selected id" which conflicts
> comment 0.
> 
> Moreover, comment 3 provided different observation from comment 0 and
> comment 9. And looks comment 3 also reached the expected behavior of comment
> 0, SIM EFs are updated accordingly. What's the problem with comment 3? Am I
> missing something?
> 
> As I feel those comments are somehow conflicting, could you help clarify the
> real issue again? Let's step back, and confirm the current behavior and
> expected behavior first. Thank you. :)
> 
> > So asking Yoshi's to redirect the bug to someone in platform as the problem
> > is not caused in Gaia's level but in the SIM application or Gecko, at most.
> 
> [1]
> http://dxr.mozilla.org/mozilla-central/source/dom/system/gonk/ril_worker.
> js?from=ril_worker.js#10753
> [2]
> https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/icc.js#L136
Hi Yoshi, I missed comment 3 so I was focused on determining why the UI was not displayed at all. From the logs, it seems the desired UI is being displayed so no problem here.

I though we were not processing the File Change Notification for your answer to Fernando's question in comment 2: "currently we don't notify..." but, probably I misunderstood you.

When you say you don't see the refresh command in Gecko, you're referring to the same when I was saying the SIM was not answering (so I though it was not answering to the selected item). So, after receiving the phone number:

> I/Gecko   (  133): -*- RadioInterfaceLayer: Received 'RIL:SendStkResponse' message from content process
 
Nothing say Gecko: "ey, notify Gaia command 01, i.e. REFRESH". Isn't it?

So, in Gaia, we should relax the integrity check for STK commands and allow an empty `options` field but the SIM should notify Gecko about the REFRESH command as well. Am I correct?

Thanks for clarifying!
Flags: needinfo?(salva) → needinfo?(htsai)
(In reply to Salvador de la Puente González [:salva] from comment #12)
> Hi Yoshi, 

Hi Salvador, thanks for the explanation! Yoshi is now focusing no NFC, so I will be helping this :)

> I missed comment 3 so I was focused on determining why the UI was
> not displayed at all. From the logs, it seems the desired UI is being
> displayed so no problem here.
> 

Good to know.

> I though we were not processing the File Change Notification for your answer
> to Fernando's question in comment 2: "currently we don't notify..." but,
> probably I misunderstood you.
> 

Oh, I thought you were not getting anything wrong. I am not sure about the implementation when Yoshi replied, but based on the current codebase, gecko will dispatch FileChangeNotification to gaia with empty options. And the blank options are indicating that gaia doesn't need to handle this proactive command. The reason is as Yoshi tried to explain in comment 2, the effort for FileChangeNotification is mainly on modem, so there's nothing gecko or gaia could really be involved. 

However, we also learned that this mechanism really varies with vendor. For some devices, gecko/gaia seems need to do more.

> When you say you don't see the refresh command in Gecko, you're referring to
> the same when I was saying the SIM was not answering (so I though it was not
> answering to the selected item). So, after receiving the phone number:
> 
> > I/Gecko   (  133): -*- RadioInterfaceLayer: Received 'RIL:SendStkResponse' message from content process
>  
> Nothing say Gecko: "ey, notify Gaia command 01, i.e. REFRESH". Isn't it?
> 

We are on the same page here ;)

Based on comment 3, looks SIM EFs are eventually refreshed because comment 3 said "if user imports the contacts from the SIM card, the contact just created is correctly imported in the phonebook." So, it looks modem has already done everything for us. Not receiving REFRESH command in this case doesn't hurt. 

One thing I am still not clear about is: as the SIM EFs are updated correctly, looks to me this issue is resolved. Am I right? Or let me know what the underlying problem is you want to fix.

> So, in Gaia, we should relax the integrity check for STK commands and allow
> an empty `options` field but the SIM should notify Gecko about the REFRESH
> command as well. Am I correct?
> 

I'd say it really depends on modem design. Could you also help me check the behaviour on Flame, as I don't have a SIM with REFRESH command? Setting NI for the ril log on Flame.

I'd like to know how our reference phone, i.e. Flame, behaves then give a better answer here.
But in general, the implementation on moz main trunk is for moz reference devices. If Flame modem covers everything for us, then I think both current gecko and gaia implementation should be fine.

> Thanks for clarifying!

You are welcome. And thank you, too :)
Flags: needinfo?(htsai) → needinfo?(salva)
See Also: → 1062862
Hey Sinyi

Thank you very much for all the explanations. Re-reading comment 3 I'm thinking the tester expected the contact to be automatically imported to Contacts' DB but I don't know if it should be so. I'm going to ask Beatriz for clarifications here.

Beatriz, after adding a contact via STK, is it expected for the contact to be automatically added to Contacts' DB?
Flags: needinfo?(salva) → needinfo?(beatriz.rodriguezgomez)
(In reply to Salvador de la Puente González [:salva] from comment #14)
> Beatriz, after adding a contact via STK, is it expected for the contact to
> be automatically added to Contacts' DB?
Sorry for my delay, acording to the test case:
3. The application will ask for a name and number for introducing in the first free position of the ADN file. 
4. Afterwards, it will perform a Refresh of this kind, indicating the modification in the agenda file.

According to comment#3
(In reply to Isabel Rios [:isabel_rios] on maternity leave from comment #3)
> The contact is not shown in the phonebook. But, if user imports the contacts
> from the SIM card, the contact just created is correctly imported in the
> phonebook.

It seems it is working fine.

Besides, we had run pre-certification in v2.0 and this issue is marked as PASS.
I guess we can close this issue as WFM. Please reopen if you feel otherwise.
Flags: needinfo?(beatriz.rodriguezgomez)
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.