maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] ToggleWlanScan (https://talk.maemo.org/showthread.php?t=86607)

ajalkane 2012-09-05 19:34

[Announce] ToggleWlanScan
 
1 Attachment(s)
Toggles WLAN scanning on/off.

The main purpose of the application is to prevent stuttering of audio with Bluetooth, which is caused by WLAN scanning.

Upon installation you will see an icon on your home screen "WlanScanOff". Clicking on it will turn WLAN scanning off, and the icon will reflect the current state. The text will turn to "WlanScanOn". Click it and WLAN scanning is resumed and icon will again reflect the current state.

This application is free for the community, as I regard this as a nice example of our community working together. If I upload it to Nokia Store I will charge for it by a boat-load to get back the money used on wine, beer and meat consumed while coding and testing this application.

If you find this application useful to you, please consider donating via the PayPal link in my signature (put in comments it's for ToggleWlanScan). I ask for donations, as I'm probably the only one involved in this who has no use for this application (I have no Bluetooth devices). When donating please consider this is a fringe application. The test versions were downloaded by just a couple of people, so I don't expect much donations.

This application is released under GPLv3. The sources are available here:
https://github.com/harmattan/togglewlanscan

I will submit this application also to 2012 coding competition. Your vote matters (but vote ProfileMatic instead if you appreciate that application, that way I have better chances for something :)).

Thanks to:
- flopjoke for creating icons
- P@t for testing that the initial idea should work
- justadude, flopjoke, Sniper_swe and others for testing the application and feedback

Sniper_swe 2012-09-05 20:12

Re: [Announce] ToggleWlanScan
 
Great toggle!
Makes bluetooth audio streaming perfect without any stutter!

Thanks

Morpog 2012-09-05 20:16

Re: [Announce] ToggleWlanScan
 
Could it also save some power, or ist that not noticeable?

ajalkane 2012-09-05 21:01

Re: [Announce] ToggleWlanScan
 
Quote:

Originally Posted by Morpog (Post 1261756)
Could it also save some power, or ist that not noticeable?

It might... but I doubt it has any noticeable effect. WLAN scan is only done every 5 minutes.

Sniper_swe 2012-09-05 21:31

Re: [Announce] ToggleWlanScan
 
Strange that without the toggle when playing audio from spotify to bluetooth speaker the audio stutter all the time. But when u use the toggle it never stutters. Atleast not for me:) seems like wlan scans more often when using webbrowser ?

ajalkane 2012-09-05 22:45

Re: [Announce] ToggleWlanScan
 
Quote:

Originally Posted by Sniper_swe (Post 1261798)
Strange that without the toggle when playing audio from spotify to bluetooth speaker the audio stutter all the time. But when u use the toggle it never stutters. Atleast not for me:) seems like wlan scans more often when using webbrowser ?

That seems strange. I can't think of any reason why wifi scanning would cause continuous stuttering like that. I'd chalk it up as a platform bug, but good thing it can be worked around with this.

wout.martens 2012-09-06 06:41

Re: [Announce] ToggleWlanScan
 
Clicking on it resulted in dissapearing of the toggle, stuttering remains so will test further but first experience is not that good.

ajalkane 2012-09-06 06:49

Re: [Announce] ToggleWlanScan
 
Quote:

Originally Posted by wout.martens (Post 1261969)
Clicking on it resulted in dissapearing of the toggle, stuttering remains so will test further but first experience is not that good.

That is peculiar. Can you run the following commands on terminal:

Code:

gconftool -g /system/osso/connectivity/network_type/search_interval
It returns 0 if wlan scanning turned off and 300 if it's on.

And about the disappearing icon, what does this say:

Code:

ls -l /usr/share/applications/togglewlanscan_harmattan.desktop

wout.martens 2012-09-06 07:39

Re: [Announce] ToggleWlanScan
 
i reinstalled the app so icon is back.
value is 0

guess it has something to do with ram filling up rather than wlan scan?

Sniper_swe 2012-09-06 07:57

Re: [Announce] ToggleWlanScan
 
Quote:

Originally Posted by ajalkane (Post 1261832)
That seems strange. I can't think of any reason why wifi scanning would cause continuous stuttering like that. I'd chalk it up as a platform bug, but good thing it can be worked around with this.

Either way stutter is gone and I'm happy:)

wout.martens 2012-09-06 07:59

Re: [Announce] ToggleWlanScan
 
Just to give more background, I'm also running fasterN9 so could that cause the stutter even when wlanscanoff is activated?

thedead1440 2012-09-06 08:10

Re: [Announce] ToggleWlanScan
 
wout.martens you've hit the nail on its head ;)

uninstall fastern9, it slows down some processes so it surely is the cause of the issue :)

ajalkane 2012-09-06 08:29

Re: [Announce] ToggleWlanScan
 
Yes, that could be it. Easy test is to listen to the music without bluetooth. If it still stutters, then it's something else (like fasterN9 or ram filled up).

wout.martens 2012-09-06 08:33

Re: [Announce] ToggleWlanScan
 
Uninstalled fasterN9 and stutter is still a bit there but less so thats good.

P@t 2012-09-06 08:35

Re: [Announce] ToggleWlanScan
 
Thanks for this.

Note as well that even with wifi scanning off,
if you are not connected to internet
+
if you have at least one wifi network that is set to connect automatically
=
then if you launch for instance a web browser, it will ask for internet connection, so that it will first try to connect to wifi, so stuttering will then appear.

At least this is my experience. BUT this scanning off is a big step forward. Because before I had every 5mn or so, a stuttering.

Sniper_swe 2012-09-06 18:21

Re: [Announce] ToggleWlanScan
 
I have used it along with my 360 speaker all day. And no stuttering at all!
Ran spotify streaming through wifi with twitter updates every 20min and no stutter.
Surfing the web no stutter.

I have fastern9 installed to but as I have said alot of times in the post: NO stutter!:)

Kozzi 2012-09-06 18:51

Re: [Announce] ToggleWlanScan
 
Would this help my current situation where as my N9 keep prompting the Connection "page" and ask to select one when the phone is not online. I have been trying to hunt down the culprit but without success. Oh and will this come to the next version of Profilematic ?

ajalkane 2012-09-07 08:59

Re: [Announce] ToggleWlanScan
 
Quote:

Originally Posted by Kozzi (Post 1262325)
Would this help my current situation where as my N9 keep prompting the Connection "page" and ask to select one when the phone is not online. I have been trying to hunt down the culprit but without success.

I don't think disabling wlan scanning will help with that issue.

Quote:

Oh and will this come to the next version of Profilematic ?
I don't plan to include this in ProfileMatic. The reason is, that there is no place in N9's settings for enabling/disabling wifi scanning. So if I included it in ProfileMatic, it would be very easy for newbies trying different stuff to accidentally disable their wifi scanning for good and having no idea why they don't automatically connect anymore. I don't feel good about including that kind of potentially "destructive" stuff to ProfileMatic.

So as it is, I think it's better that with ProfileMatic people use Custom action to either set the gconf value, or calling ToggleWlanScan. The latter has the added benefit that the current status of wlan scanning can be seen from homepage.

ajalkane 2012-10-26 18:02

Re: [Announce] ToggleWlanScan
 
1 Attachment(s)
Justadude requested a combination of Bt + Wlan scan. Here's an attachment that calls both ToggleBt and ToggleWlanScan with one click.

1) Prerequisites: Install ToggleBt and ToggleWlanScan
2) Upload the included .tar file to your device into MyDocs/togglewscanbt
3) Open terminal and type:
Code:

$ cd /home/user/MyDocs/togglewscanbt
$ tar -xvf togglewscanbt.tar
$ devel-su
# cd /home/user/MyDocs/togglewscanbt
# sh install.sh

Now you have the icon. The icon shows current status of wlan scanning.

You can't uninstall this from homescreen but must do it manually:

Code:

$ devel-su
# cd /opt/togglewscanbt
# sh uninstall.sh

It's just a quick hack.

The nice icons are done by flopjoke.

Venemo 2012-11-10 09:33

Re: [Announce] ToggleWlanScan
 
Awesome stuff, thanks for making it!
It did not stop the stuttering for me, but I'm on wifi as I speak, so I'll report back about it when it's off.


All times are GMT. The time now is 11:07.

vBulletin® Version 3.8.8