![]() |
Re: [Pre-Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
Nice work, peterleinchen! It just *begs* for being in repositories :)
|
giveaway functionality to save/restore desktop after crash / kill of hildon-home (hildon-desktop)
Added following comment (forgotten on OP):
Giveaway functionality: - saving and restoring plugins/widgets/desktop sometimes necessary after crash/kill of hildon-home (seldom hildon-desktop). In x-term call Code:
sim-switcher savehome Code:
sim-switcher restorehome There may follow more ... ;) |
Re: [Pre-Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
Quote:
You may find it now in the repos (atm devel, promoted to testing). |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
@peterleinchen, thanks your application works fine.
However, if you have some experience with switching SIMs, maybe you can help with the following use case: I want to switch to SIM2, synchronize Exchange and then switch back to SIM1, all of this with Alarmed application that runs regularly the below script. For some reason, if I am using in script the code "sudo /opt/sim-switcher/phonet-helper down and then up", the phone remains with SIM2, and when I am trying some call I get "Call not allowed" message. Only after I am running from command line "sudo killall csd" I can switch back to SIM1. If instead of phonet0 down I am using "run-standalone.sh dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release", the script switches fine to SIM2, sync and back to SIM1, but after a few runs, I still get to the above situation. Any help with this would be appreciated. Thanks. Code:
#!/bin/sh |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
New version in testing.
Added parameter "oper" in config file to add the operator name for specific SIM. Will be shown as name for desktop icon. Keep it short, less than 9 chars, and please do NOT use blanks (but put underlines or such, e.g. "VF_de" instead of "VF de") in that parameter. |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
@yrannadx
Nice one, too. I can only think of timing problems, maybe the 7 seconds is not enough between down and up. I had same problesm, but after setting to 7 seconds it always worked out for me. Do you have high loads? And the CallRelease just ends the call, no more. It may be there, but it is not needed, as shutting down phonet0 is doing the same (OK, almost). Shutting down the telephony system (and enabling again) will bring up the switch. So I am curious how you are able to switch without bringing down? Oh and one more about timing. Maybe also increase he sleep between bringing up the call and shutting down. Maybe your adapter needs more time to detect ... Either way let me know, to make mine more stable, please. But you said my method works for you? Oh and about 'killall csd': that was my first very early approach and it worked out. But after a few switches I ran into troubles also (do not remember exactly, but I think it was about internet connectivity / telephony unavailable). -- Maybe found your issue: imagine going into your script with SIM2 active! Then opcode1 will be 10 and opcode2 will be 10 also. So at the end of script there is no instruction to switch back to SIM1 ... |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
@peterleinchen
Maybe it depends of SIM adapter. My one is Magicsim 28th and the switch actually works fine just by using CallRelease without calling phonet0 down and up. But of course the SIM switch works also with your method, phonet0 down and up, as well as with killall csd. I tried different timings and so on and it was not working. The new code that seems to work is to use CallRelease after calling the switch code and using once the phonet0 down and up after "Disconnect SIM2 Internet" command. Maybe connecting and disconnecting the internet is the problem that prevented the switch back to SIM1 after that. if opcode1 is 10 and opcode2 is 10 also, then that is the intended behavior of the script, to remain with SIM2 and not to switch back, so I think the script is OK. I will try for few days the new code to see if it works after several switches combined with normal phone usage. Code:
# Try with SIM2 |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
@yrannadx
If it is intended (not go back to SIM1, if started withSIM2) then it seems OK. Let me guess: you do not have PIN code enabled on second SIM, but you do have on SIM1? In that case the switching to SIM2 occurs immediately after the call release. And a phonet down/up is not necessary (but do not harm either). So in that/your case just omit down/ups for switch to second SIM and it should work. But it should work also with my approach. What about using command line 'sim-switcher SIM1' in your script (in config file only the switch code)? So in short: Never use killall csd, it will create internet (access point) problems. If there is no PIN code query enabled, switching occurs without any interaction (but it works with my method, too). -- more edit I have some extension ready to let my script wait if there is no cell radio connection available. In my case I do need the SIM to be online to successfully switch. Please let me know if that is valid for your adapter too (go into offline mode and dial 002 and see if the SIM switches, I expect not). |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
@peterleinchen
Actually none of the SIMs have PIN code enable so that's the explanation. On the other hand, it seems none of the methods are working after all. Nor my above attempts, nor calling 'sim-switcher SIM1 and 2' in the script. It is strange why first attempt of running the script succeeded (when using sim-switcher) and second attempt fail with SIM2 remaining active and when I am trying a normal call with SIM2 I get call not allowed (although your script display wrongly the message of successfully switch). This means also that switching back to SIM1 is not possible without using killall csd or reboot. Maybe the sync is causing this strange behavior, otherwise I see no logical explanation for this. The next method I will try is to separate totally the actions of switch SIM and sync, i.e. to switch first the SIM 3 minutes before the sync with Alarmed, do the sync and switch back 3 minutes after the sync with Alarmed as totally independent actions. Regarding your note, I cannot dial 002 in offline mode to switch SIM. |
Re: [Announce] SIM-Switcher (automated switching with a double ( dual ) SIM adapter)
Hey yrannadx,
one question at first: my app is working for you? So using sim-switcher switches from SIM1 to SIM2 and vice versa? How do you verify your script dows not switch back to SIM1? Do not rely on operator name shown on hildon-home! In your script there is some flaw, which should not cause your behaviour, but who knows? Switch your code to: Code:
. Code:
. |
All times are GMT. The time now is 08:46. |
vBulletin® Version 3.8.8