maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Dual sim card adapter for N900 (https://talk.maemo.org/showthread.php?t=35725)

fido888 2011-09-02 09:02

Re: Dual sim card adapter for N900
 
Hi Peter,

Thank you for your mod, it's perfect.
I had problems about changing but not with 3g.
After 3-4 switches the screen was getting slower and slower, so at 6. swap I had to reboot N900.

I'm lazy too :-) but I didn't know DesktopCommandExecution Widget. Now I made personal icons with my firms and my logo ...

I will reply to my post, because I reinstall (reflash) my device, and this solvations didn't work due to sudo problems.
My phone is a secondhand phone and previous owner made or installed lot of programs and it wasn't so secure ....

Thanks, fido

Quote:

Originally Posted by peterleinchen (Post 1000302)
Hey fido.
Thanks for the hint with dbus command. I was aware, that there must be some command, but too lazy ;)
Now I put all together in one script and execute it with DesktopCommandExecution Widget.

But, You do not have any problems with 3G data connetcions after a few switches (killing csd)? I do, so I posted an alternative some post above.
Like:
#!/bin/sh
#/usr/bin/dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print-reply /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
/usr/bin/dbus-send --system --dest=com.nokia.csd.Call --type=method_call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
sleep 1
#/usr/bin/killall csd
sudo ifconfig phonet0 down
sleep 7
sudo ifconfig phonet0 up
#end script

For me this works perfect...


fido888 2011-09-02 09:50

Re: Dual sim card adapter for N900
 
For Simore Platinum card Modifications due to a reflashing.....
-"user" user has no access for lot of things.
-peterleinchen suggested a better solution to restart radio
(thanks for Peter)

Prerequisites:
1. Install openssh.
2. connect to a wifi and catch ip address:
/sbin/ifconfig wlan0
3. Use ssh or putty to login as root to N900

Changes:

1.
/usr/bin/changesim script:
-------
#!/bin/sh
/usr/bin/dbus-send --system --dest=com.nokia.csd.Call --type=method_call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
sleep 1
sudo /sbin/ifconfig phonet0 down
sleep 7
sudo /sbin/ifconfig phonet0 up

#end script
-----

2.
/usr/share/applications/hildon/gallicoop.desktop (sim1)file:
-----
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Gallicoop
Comment=Gallicoop SIM1
Exec=/usr/bin/changesim "#11"
Icon=gallicoop
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
-----

/usr/share/applications/hildon/gepember.desktop file:
-----
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=GépEmber
Comment=GepEmber SIM2
Exec=/usr/bin/changesim "#22"
Icon=gep_ember
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
----

I made icons from our logo, I converted them by gimp to 48x48 , 32x32 and 18x18 pixels gallicoop.png's and gep_ember.png's.
An put them into:
/home/opt/usr/share/icons/hicolor/48x48/hildon
/home/opt/usr/share/icons/hicolor/32x32hildon
/home/opt/usr/share/icons/hicolor/18x18/hildon

Important!!!! when icons don't exist, you will not find these among applications!!!
I you aren't sure, use existing icons for example:
Icon=general_synchronization or others.
You can check:

ls /home/opt/usr/share/icons/hicolor/48x48/hildon/

3.
Add entries to /etc/sudoers:

root ALL=(ALL) ALL
user ALL = NOPASSWD: /sbin/ifconfig phonet0 up
user ALL = NOPASSWD: /sbin/ifconfig phonet0 down

4.
Test it first from commandline:
su - user
/usr/bin/changesim "#22"

Good luck!

fido

Quote:

Originally Posted by fido888 (Post 999228)
Simore Platinum working solution.

I made a mod.post because I reflashed my N900 and this didn't work correctly due to security reasons ....

(you have to xterminal and root access)

I bought simore platinum for my N900, but it didn't work.
I was realli angry about the support, they replied an absolutely unuseable answer for my question.

My solution (my college helped me a lot)

Manual method:

1.
dial #11 to activate SIM1 (you got general error, no problem)
(or dial #22 for SIM2)

2. root shell and kill csd
(xterminal and sudo -s probably)
killall csd

After that N900 will ask your pin code (if is set) and register the new card. It takes some seconds.

Automatic mode:

1. edit a script: /usr/bin/changesim :

#!/bin/sh
/usr/bin/dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
sleep 1
/usr/bin/killall csd
#end script

2. run right for this script:
chmod 755 /usr/bin/changesim

3. Create icons to apllications:
edit a file in /usr/share/application/hildon/sim1.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Company
Comment=Company SIM1
Exec=/usr/bin/sudo /usr/bin/changesim "#11"
Icon=general_synchronization
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

4. edit a file in /usr/share/application/hildon/sim2.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Home
Comment=Home SIM2
Exec=/usr/bin/sudo /usr/bin/changesim "#22"
Icon=general_synchronization
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

5. Two icons appear among applications and you can "Add shortcut" them to the desktop.

6. Enjoy! :-)
I attached these files, you HAVE to rename them
-without .txt
-replace "_" to ".".

Cheers, fido


peterleinchen 2011-09-03 20:55

Re: Dual sim card adapter for N900
 
Hey fido888.

Thanks for summing up again.

Just two remarks:
- regarding the icon entry in desktop file
You do not need that (even its nicer :)), just set "Icon=" or omit this line completely. This will show the default blue icon.

- sudoers entry
Do *not* edit /etc/sudoers file directly, as Your changes may get overwritten. Better is to put Your edits in a new file (name doesnt matter: e.g. mySIMchanger) under directory /etc/sudoers.d and then call update-sudoers

Regards

David93 2011-09-07 09:28

Re: Dual sim card adapter for N900
 
Hi Awben,

Thanks for your summary !!

Did you tried the magicsim 28th Plus ? (It's called magicsim 29th here <a> http://www.eurodualsim.com </> but it's a 28th PLUS)

They said they have improved provider compatibility and new os supported.

I've already 23th card but recently I've broken it (removed from sim case with screwdriver :( so I have to buy a new one ...

Dav.

colchaodemola 2011-10-11 18:29

Re: Dual sim card adapter for N900
 
Does the platinum switches if the active simcard has no signal ?
The magic sim needs signal from the current operator to be able to change to the other line.


Quote:

Originally Posted by fido888 (Post 999228)
Simore Platinum working solution.

I made a mod.post because I reflashed my N900 and this didn't work correctly due to security reasons ....

(you have to xterminal and root access)

I bought simore platinum for my N900, but it didn't work.
I was realli angry about the support, they replied an absolutely unuseable answer for my question.

My solution (my college helped me a lot)

Manual method:

1.
dial #11 to activate SIM1 (you got general error, no problem)
(or dial #22 for SIM2)

2. root shell and kill csd
(xterminal and sudo -s probably)
killall csd

After that N900 will ask your pin code (if is set) and register the new card. It takes some seconds.

Automatic mode:

1. edit a script: /usr/bin/changesim :

#!/bin/sh
/usr/bin/dbus-send --system --dest=com.nokia.csd.Call --type=method_call --print /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$1" uint32:0
sleep 1
/usr/bin/killall csd
#end script

2. run right for this script:
chmod 755 /usr/bin/changesim

3. Create icons to apllications:
edit a file in /usr/share/application/hildon/sim1.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Company
Comment=Company SIM1
Exec=/usr/bin/sudo /usr/bin/changesim "#11"
Icon=general_synchronization
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

4. edit a file in /usr/share/application/hildon/sim2.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Home
Comment=Home SIM2
Exec=/usr/bin/sudo /usr/bin/changesim "#22"
Icon=general_synchronization
Terminal=true
Type=Application
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable

5. Two icons appear among applications and you can "Add shortcut" them to the desktop.

6. Enjoy! :-)
I attached these files, you HAVE to rename them
-without .txt
-replace "_" to ".".

Cheers, fido


biketool 2012-04-03 12:32

Re: Dual sim card adapter for N900
 
I bought a 28th gen no-cut magicsim. It works great once you set the 007 mode in another phone. The second sim wraps arwound and sits atop the battery, it is just a bit too thick and puts stress on the battery door snaps. One of my snaps began to crack so I stopped using the magicsim. It is too bad as I have one prepaid voice SIM and one SIM for data.

peterleinchen 2012-07-27 21:15

Re: Dual sim card adapter for N900
 
Made a package for automated switching of SIMs, please see here.


All times are GMT. The time now is 08:15.

vBulletin® Version 3.8.8