Notices


Reply
Thread Tools
neboja's Avatar
Posts: 277 | Thanked: 93 times | Joined on Jan 2010 @ Belgrade
#121
i agree with IVGALVEZ .... i considered to ask for that implementation in cssu thread, but this could be another way to do that!
__________________
O.o neboja
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,404 times | Joined on Apr 2009 @ Germany
#122
Originally Posted by ivgalvez View Post
Nicolai, I have yet another feature request. Maybe a very specific use case from my side but I though it might be useful for someone else.

I usually keep my N900 always in GSM (using 2G/3G/Dual status menu widget) to avoid wasting battery, but when I want to connect to the Internet, I change it back to 3G, wait a few seconds to reconnect with the network and then press the ConnectNow widget. After browsing, I disconnect again with ConnectNow and return to 2G mode.

It would be useful for me, then, to be able to use the same widget ConnectNow to make the whole process in a single click. For example the GPRS connection widget could have an option to "change first to 3G/Dual mode if not enabled" and then, on disconnection, an option to "return to 2G mode".

What do you think?
Good idea.
I'll try to implement it.
 

The Following 4 Users Say Thank You to nicolai For This Useful Post:
Posts: 1,382 | Thanked: 2,079 times | Joined on Nov 2009 @ Dublin, Ireland
#123
Originally Posted by nicolai View Post
Good idea.
I'll try to implement it.
Amazing!!!

I've never seen this kind of support from any private company.
 

The Following 2 Users Say Thank You to ivgalvez For This Useful Post:
nicolai's Avatar
Posts: 1,637 | Thanked: 4,404 times | Joined on Apr 2009 @ Germany
#124
connectnow-home-widget 1.3 is in extras-devel now.
It has an extra option for changing radio mode (3g/gsm)
on connect/disconnect intenetconnections.

Please test and give feedback.

nicolai
 

The Following 9 Users Say Thank You to nicolai For This Useful Post:
Posts: 1,382 | Thanked: 2,079 times | Joined on Nov 2009 @ Dublin, Ireland
#125
Originally Posted by nicolai View Post
connectnow-home-widget 1.3 is in extras-devel now.
It has an extra option for changing radio mode (3g/gsm)
on connect/disconnect intenetconnections.

Please test and give feedback.

nicolai
Implemented in only one week!!!

Thank you very much.

In my case, with Vodafone Spain, when pressing connect it tries to make the connection a bit soon without time to stablish correctly the 3G network and thus, an error of connection appears.

Disconnection works flawlessly.

Are you waiting a fixed time after the switch for the connection or are you receiving any dbus signal?
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,404 times | Joined on Apr 2009 @ Germany
#126
This is bad.
There are a bunch of dbus-signals like

com.nokia.phone.SSC.modem_state_changed_ind
com.nokia.phone.GPRS.Available
Phone.Net.operator_name_change

It took me some time to figure out
how to start the connection at the right time. The
current way is:
wait for signal
com.nokia.phone.SSC.modem_state_changed_ind = online
and wait for
Phone.Net.operator_name_change
after that I open the connection.
I have to listen for both signals because right after changing
the radio mode, operator_name_change is signaled two
times, but only after the third time (after signal
modem_state_changed_ind) I can start the connection.
I hoped this way would work for others too. But
it seems this doesn't work for all network operators.

I don't know how to find out what could be the right
way that works for all operators.
 

The Following 2 Users Say Thank You to nicolai For This Useful Post:
peterleinchen's Avatar
Posts: 1,815 | Thanked: 2,309 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#127
Hey nicolai,

here is some shell code, which I use to detect online state when switching from one SIM to another (dual adapter).

Code:
#give some/infinite time to enter PIN (if SIM requests PIN and only needed for IAP and call forwarding)
#this will wait until cell modem gets online after switching
if [ "$3" != "" -o "$7" != "" ]; then
    /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"We need to wait for cell modem to get online ..." uint32:4 string:"ack"
    sleep 3
    scount=0
    while [ "`cat /var/run/ssc`" != "online" ] 
    do
        /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:"still waiting for cell modem to get online ..."
        if [ $scount < 30 ]; then
            sleep 3
            let scount+=3
        elif [ $scount < 60 ]; then
            sleep 5
            let scount+=5
        else  
            sleep 10
        fi
    done
    /usr/bin/dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Done, we are online!" uint32: string:
fi
Where I think, you are interested only in that line
Code:
    while [ "`cat /var/run/ssc`" != "online" ]
I wait infinite until I detect this and then continue to connect specific IAP.

Hope this helps.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 105 | Thanked: 46 times | Joined on May 2011
#128
Oh nice, another update ... no more thinking about broken AutoDisconnect
Thanks a lot!

Btw. could you implement a check if a 3G connection has been established and switch to 2G if it failed?

Another interesting feature would be to "silence" icd2! It is easy to kill the daemon on X-Term but that solution is not very comfortable. How about switching icd2 off generally and only start it when a connection with ConnectNow is being established (again with failure check).
This internet connection popup is driving me crazy!
In an ideal world all apps should have an option to work offline, but in reality they don't. And I would rather have an app crash without internet connection then getting that popup every 5 minutes

Puh, sorry for that outbreak
And again: Love my phone because the community is awesome!
 
Posts: 1,382 | Thanked: 2,079 times | Joined on Nov 2009 @ Dublin, Ireland
#129
I have been using this new feature during the last days and apparently it works 85% of the times with Vodafone Spain. It seems that it depends on the cell tower as most of the fails are always in the same place.

Maybe it's just a timing issue, if you add a little delay it could be enough.

What I have observed is that the widget switches from 2G to 3G, and maybe it's better to change to Dual, so if there's no good reception for 3G you could stay connected to GPRS.

Edit: As far as I continue testing percent of success is raising.

Last edited by ivgalvez; 2012-02-27 at 11:06.
 

The Following 2 Users Say Thank You to ivgalvez For This Useful Post:
Posts: 463 | Thanked: 103 times | Joined on Jul 2010 @ Mumbai, India
#130
@nicolai....

Could this be configured to be used as a switch for bluetooth. I mean to say to turn on/off the bluetooth (similar like bluezswitch widget) without going into the status bar dropdown???
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 20:09.