View Single Post
peterleinchen's Avatar
Posts: 3,370 | Thanked: 6,402 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#20
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:
.
.
.
    # Disconnect SIM2 Internet
    echo "Disconnect SIM2 Internet"
    run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
  
    # Switch to SIM1
    if [ $opcode1 == 1 ]; then
      run-standalone.sh dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print-reply /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"001" uint32:0
      sleep 1
      run-standalone.sh dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release
    sleep 1
    sudo /opt/sim-switcher/phonet-helper down
    sleep 7
    sudo /opt/sim-switcher/phonet-helper up
    sleep 20
    fi
  fi
fi
or maybe:
Code:
.
.
.
    # Disconnect SIM2 Internet
    echo "Disconnect SIM2 Internet"
    run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
  
    # Switch to SIM1
    if [ $opcode1 == 1 ]; then
      run-standalone.sh dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print-reply /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"001" uint32:0
      sleep 1
      run-standalone.sh dbus-send --system --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.Release
#    sleep 1
#    sudo /opt/sim-switcher/phonet-helper down
#    sleep 7
#    sudo /opt/sim-switcher/phonet-helper up
#    sleep 20
    fi
  fi
fi
 

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