View Single Post
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#26
Originally Posted by yrannadx View Post
Using your app works fine for me.
Thanks for confirmation.

Originally Posted by yrannadx View Post
Also I will check your suggested code improvements although I have doubts this will ever work after so many tests I made.
Give it a try, even I do not see it causing it. But ...

Originally Posted by yrannadx View Post
Sometimes I got the message "Please do NOT call me on already selected SIM ($1) !" which I shouldn't, maybe the currentSIM file got messed when using the command in my script. I think maybe the file is not updated when sim-switcher is run inside a script or maybe other reason.
...
The first switch went fine to SIM2, but then switch back to SIM1 failed and the phone remained with Operator2. This due to "Call not allowed" message when trying to make any call with SIM2. The same as before, I could switch back to SIM1 only after running killall csd. So it is quite clear that for some reason switching the SIM in any other way than from application icon will fail.
This leads me to the conclusion, that your SIM2 somehow does not accept the switch code at that time. There is no check, if the 'call' (switch code) has been excuted, in contrary to your on-call check (which I like to add to my script). Do you know any return codes of dbus, that tell us: "call not allowed"?
If this (call not allowed) happens, then I think the switch is not initiated, but the script continues (sets currentSIM) and thinks everything went fine. So it marks the SIM1 as active, whereas still SIM2 is the active one (explanation for your messages and also behaviour).
One possibility I may think of causing this is the non-ability of your adapter to have internet AND call at the same time (topic: GPRS class A B C). A full UMTS adapter does not care about such limitations.
Was it assured that GPRS internet connection was down before switching back to SIM2? Could you please test this?


Originally Posted by yrannadx View Post
I would suggest an improvement in your application:
- possibility to use your script silently without pop-up messages, e.g. if I want to switch by Alarmed I don't want success messages to be displayed.
Exactly that I was thinking about this afternoon Almost finished, needs some testing... (uploading to devel ...)
What is your favourite flavour? Be verbose as default or silent?
I would say silent on command line as default and verbose per icon.


I have added the SIM details and furthermore I would like to add the on-call check (it is not necessary for icon app, but for command line usage).
Thanks for your helpful discussion and improving script snippets!

Another question here is: I have added a infinte loop to wait for getting online. But without notifications you will not see it, or just by "script execution time/halt". I do not want to make it as param, but have added a file to detect this (see changelog version 0.4.1). So what do you think about this infinite loop?

Last edited by peterleinchen; 2012-08-25 at 09:03.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post: