enormous Posted November 29, 2012 Share Posted November 29, 2012 I decided to make this it's own thread, as I've gone and made it overly complicated. Since we're letting our geek flags fly... Here is my Tasker setup that I created to aid me in tracking down LTE signal. I created this because if you're trying to be a "Sensorly Cartographer" like myself, it's annoying to have to keep your phone in front of your face all of the time, switching in and out of airplane mode, checking to see if the 3G now reads 4G. The most annoying thing for me is that if you lose your LTE signal, you'll have to 1) notice that it's gone, and 2) start cycling airplane mode again. This setup automates that, so if you're searching with Sensorly you just have to hit a button, and if there's LTE around you'll connect to it a lot faster. It's got a few moving parts to it, but so far it's worked out for me. WARNING: be aware that this WILL increase your battery consumption if (for some reason) you leave it running when not activily mapping. I highly recommend anyone who loves their Android phone to buy Tasker. I've had it for years, and am able to automate so many parts of my phone with it. I know I'm just scratching the surface with what I use it for too. To fully utilize this you'll be creating 3 tasks, 2 profiles and a widget icon on your home screen. Task 1: "Modified Airplane Mode Toggle" (Download here: Task-ModifiedAirplaneModeToggle.xml) Modified Airplane Mode Toggle A1: Flash [ Text:Airplane Toggle Long:Off ] A2: Airplane Radios [ Bluetooth:Off Cell:On NFC:Off Wifi:Off Wimax:On ] A3: Airplane Mode [ Set:On ] A4: Wait [ MS:0 Seconds:20 Minutes:0 Hours:0 Days:0 ] A5: Airplane Mode [ Set:Off ] What it does: it turns a modified airplane mode on (modified because I kept getting annoyed at the regular airplane mode cutting off my bluetooth headphones), waits 20 seconds, and toggles the airplane mode back off. 20 seconds is long enough for radio to do an LTE scan when it comes back online. On line A1, when things are set to "On" that means that they will be disabled by a Tasker Airplane Mode action, and "Off" means they won't be disabled by Tasker's Airplane Mode. I also set Wimax to "On" because, well, why not? Task 2: "4G Scan Monitor" (Download here:Task-4GScanMonitor.xml) 4G Scan Monitor A1: If [ %4GSCAN Is Set ] A2: If [ %HAVE4G ! Set ] A3: Perform Task [ Name:Modified Airplane Mode Toggle Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] A4: Wait [ MS:0 Seconds:45 Minutes:0 Hours:0 Days:0 ] A5: Goto [ Type:Action Number Number:1 Label: ] A6: End If A7: End If This simulates a while loop, checking to see two things: if you have turned on your "scanning" widget to scan (more on that in a bit), and if you currently do not have 4G coverage (keep reading!). It then runs the "Modified Airplane Mode Toggle", waits 45 seconds, and goes back to the first line. Task 3: "Airplane Toggle Widget" (Download: SEE BELOW) Airplane Toggle Widget A1: If [ %4GSCAN Is Set ] A2: Variable Clear [ Name:%4GSCAN Pattern Matching:Off ] A3: Set Widget Icon [ Name:Airplane Toggle Widget Icon:<icon> ] A4: Else A5: Variable Set [ Name:%4GSCAN To:1 Do Maths:Off Append:Off ] A6: Set Widget Icon [ Name:Airplane Toggle Widget Icon:<icon> ] This is the logic behind the widget button you'll create later. It just sets/unsets the variable that controls whether or not you will be popping into/out of airplane mode. Profile 1: "In LTE" (Download here: Profile-InLTE.xml) Profile: In LTE State: Mobile Network [ 2G:Off 3G:Off 3G - HSPA:Off 4G:On ] Enter: Anon A1: Variable Set [ Name:%HAVE4G To:1 Do Maths:Off Append:Off ] Exit: Anon A1: Variable Clear [ Name:%HAVE4G Pattern Matching:Off ] A2: If [ %4GSCAN Is Set ] A3: Perform Task [ Name:4G Scan Monitor Stop:Off Priority:5 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: ] This profile sets a variable when you enter into 4G coverage. When you leave/lose 4G, it will check to see if you're currently in "scanning mode". If you are, it will start the scan over again. Profile 2: "Run 4G Scan" (Download here: Profile-Run4GScan.xml) Profile: Run 4G Scan State: Variable Value [ Name:%4GSCAN Op:Is Set Value:* ] Enter: 4G Scan Monitor This simply monitors the variable set by your widget toggle, and runs the "4G Scan Monitor" task. To add the widget: Long press on your launcher home screen: select Widget. Scroll down to "Tasker" and select "Task". From the list that pops up select "Airplane Toggle Widget". How to use: Start Sensorly Get a GPS lock Click the Start button on the Map Trip screen Hit your Home button to return to your launcher Tap the "Airplane Toggle Widget" you added earlier ... Profit! This will keep Sensorly running in the background. If/when your phone latches on to 4G, Sensorly will immediately start recording your 4G points. Hints: Recommended reading: http://forum.xda-dev...d.php?t=1110775 I have also attached the two Profile XML files you can import directly into Tasker to make setting all of this easier. The should set up Profiles 1 and 2, as well as Tasks 1 and 2. For some reason the forum won't let me upload the XML file for the Airplane Toggle Widget. Just copy and paste the following into an XML file named "AirplaneToggleWidget.xml", and import it that way. <TaskerData sr="" dvi="1" tv="1.3.3u2m"> <Task sr="task89"> <cdate>1354205330359</cdate> <edate>1354207750344</edate> <id>89</id> <nme>Airplane Toggle Widget</nme> <Action sr="act0" ve="3"> <code>37</code> <lhs>%4GSCAN</lhs> <op>9</op> <rhs></rhs> </Action> <Action sr="act1" ve="3"> <code>549</code> <Str sr="arg0" ve="3">%4GSCAN</Str> <Int sr="arg1" val="0"/> </Action> <Action sr="act2" ve="3"> <code>152</code> <Str sr="arg0" ve="3">Airplane Toggle Widget</Str> <Img sr="arg1" ve="2"> <icn>2130837588</icn> </Img> </Action> <Action sr="act3" ve="3"> <code>43</code> </Action> <Action sr="act4" ve="3"> <code>547</code> <Str sr="arg0" ve="3">%4GSCAN</Str> <Str sr="arg1" ve="3">1</Str> <Int sr="arg2" val="0"/> <Int sr="arg3" val="0"/> </Action> <Action sr="act5" ve="3"> <code>152</code> <Str sr="arg0" ve="3">Airplane Toggle Widget</Str> <Img sr="arg1" ve="2"> <icn>2130837617</icn> </Img> </Action> <Img sr="icn" ve="2"> <icn>2130837588</icn> </Img> </Task> </TaskerData> To import the Tasks and Profiles First download the XML files to your phone. In certain browsers they will ask you if you want to open the file with Tasker. If your browser just offers to save the file, use a file explorer to move it to /sdcard/Tasker/tasks (for Tasks) or /sdcard/Tasker/profiles (for Profiles). Then go into Tasker and do a long-tap on the Profiles tab header. To import Tasks do the same on the Tasks tab header. Please let me know if you find any errors in my logic, as I'm sure there are a few. Happy hunting! 3 Quote Link to comment Share on other sites More sharing options...
2fastkuztoms Posted November 29, 2012 Share Posted November 29, 2012 Thanks, I would give a try! 1 Quote Link to comment Share on other sites More sharing options...
2fastkuztoms Posted November 29, 2012 Share Posted November 29, 2012 Please let me know if you find any errors in my logic, as I'm sure there are a few. Happy hunting! I was able to create the task, but I cant import the profiles on tasker. 1 Quote Link to comment Share on other sites More sharing options...
enormous Posted November 29, 2012 Author Share Posted November 29, 2012 I was able to create the task, but I cant import the profiles on tasker. Did you get any errors? What process did you use? Did you download it using your phone? Try this: On your phone, open this page in the browser. When you click on the xml file, it should ask you if you want to open it with Tasker. Once you've done that, go back into Tasker and try the import again. Quote Link to comment Share on other sites More sharing options...
lordsutch Posted November 30, 2012 Share Posted November 30, 2012 To open the files in Tasker directly, they need the correct file extensions; the Task files need to have the extension .tsk.xml and the Profile files need the extension .prf.xml 2 Quote Link to comment Share on other sites More sharing options...
Pillowsplat Posted November 30, 2012 Share Posted November 30, 2012 Thanks for the answer on 30 min lte delay search. I don't have the skills to mess with Tasker. 1 Quote Link to comment Share on other sites More sharing options...
enormous Posted November 30, 2012 Author Share Posted November 30, 2012 To open the files in Tasker directly, they need the correct file extensions; the Task files need to have the extension .tsk.xml and the Profile files need the extension .prf.xml Thanks for pointing this out. I'm trying to edit my post, but it's not showing me the option right now. Quote Link to comment Share on other sites More sharing options...
mc_gusto Posted December 2, 2012 Share Posted December 2, 2012 Nice, anyone find a way to do this with llama? Sent from my SPH-L710 using Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
enormous Posted December 2, 2012 Author Share Posted December 2, 2012 Nice, anyone find a way to do this with llama? I just downloaded llama and unfortunately it doesn't look like it supports the cell state conditions to make this usable. Sent from my SPH-L900 using Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
stopsign002 Posted December 2, 2012 Share Posted December 2, 2012 How often do our phones natively look for 4g? I mean, they must check every now and then right? Quote Link to comment Share on other sites More sharing options...
MacinJosh Posted December 2, 2012 Share Posted December 2, 2012 How often do our phones natively look for 4g? I mean, they must check every now and then right? They do, however, some phones just refuse to connect properly, and some with ease. Quote Link to comment Share on other sites More sharing options...
stopsign002 Posted December 2, 2012 Share Posted December 2, 2012 They do, however, some phones just refuse to connect properly, and some with ease. Whats the news on the Galaxy Nexus? Is it playing nice with LTE? (though I suppose I am running ROMs so that could effect that) Quote Link to comment Share on other sites More sharing options...
WiWavelength Posted December 2, 2012 Share Posted December 2, 2012 Nice, anyone find a way to do this with llama? Tina? http://www.youtube.com/watch?v=c2glOppqBRg I have to be honest. The Android developer community is probably a little bit too active and chooses some of the most ridiculous names. AJ 1 Quote Link to comment Share on other sites More sharing options...
MacinJosh Posted December 2, 2012 Share Posted December 2, 2012 Whats the news on the Galaxy Nexus? Is it playing nice with LTE? (though I suppose I am running ROMs so that could effect that) I don't know. I just got mine on Black Friday & haven't been to any LTE areas yet. There are a few others that have been having an easy time with LTE on theirs. Quote Link to comment Share on other sites More sharing options...
Andrew Revering Posted December 7, 2012 Share Posted December 7, 2012 This is great... I got it installed on my Galaxy S3 and seems to be working great. Nice job. I'll be trying this out around the Minneapolis-St. Paul, MN area over the next few weeks. 1 Quote Link to comment Share on other sites More sharing options...
rwong48 Posted December 8, 2012 Share Posted December 8, 2012 Is airplane mode really necessary? I see everyone else doing it, but for me, switching between LTE/CDMA and CDMA/EvDo works really well. Usually I'm connected to LTE within 1-2 seconds of hitting LTE/CDMA (If I'm in reach of an LTE tower of course.) Whats the news on the Galaxy Nexus? Is it playing nice with LTE? (though I suppose I am running ROMs so that could effect that) It does, but I've also experienced a bit of hanging on to 3G in an obviously-4G area. I think it just varies. Plus, it doesn't help that I'm usually in a moving car. Quote Link to comment Share on other sites More sharing options...
Andrew Revering Posted January 6, 2013 Share Posted January 6, 2013 I'm having problems with my Mobile Networks -> Connections Optimizer locking up and getting com.android.phone has stopped error. I'm posting this here because I think it has some relationship to what we're doing here...especially since I found the fix was posted on another forum by enormous! http://forum.xda-developers.com/showthread.php?t=1957107 Have others had this problem when trying to go in and change your Mobile Network? Also, enormous... How do you restore it and its data? I'm not sure what to do to fix the issue. I do not have a backup, if that's necessary. A related issue (I think), is that my Tasker toggle scripts are not working currently while this is an issue. I'm guessing its related, but it says its running the 4G LTE Scan, but it won't go in and out from Airplane mode. So I'm guessing this is the reason. Quote Link to comment Share on other sites More sharing options...
enormous Posted January 6, 2013 Author Share Posted January 6, 2013 Did you remove Connection Optimizer with anything? I had used Titanium Backup (TiB) to remove it, and once I had restored the app and it's data I stopped getting the phone stopped error. If you don't have a backup, I could PM you a copy of mine. This might work. But you'd still need TiB to restore it. Let me know if you'd like to try that. Now I just have the Connection Optimizer frozen through TiB and all is well. I would also guess that the issue with Connection Optimizer is why the toggle scripts aren't working. Quote Link to comment Share on other sites More sharing options...
Andrew Revering Posted January 6, 2013 Share Posted January 6, 2013 No, I didn't remove it. I had this problem with the stock rom, and then installed blaze rom (or something) and it was fine for a while. Not sure if it started when I started using the Tasker script. But yeah if you could send that over, I'll give it a try. I really appreciate it. Sent from my SPH-L710 using Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
enormous Posted January 6, 2013 Author Share Posted January 6, 2013 Sent you a PM. Quote Link to comment Share on other sites More sharing options...
Wildman Posted January 6, 2013 Share Posted January 6, 2013 Thanks, ill give this a try. Tasker loaded up and files downloaded. Sent from my SPH-L710 using Tapatalk 2 Quote Link to comment Share on other sites More sharing options...
Andrew Revering Posted January 7, 2013 Share Posted January 7, 2013 After reinstalling/reflashing my ROM I continued to have problems. After trying to figure out how the Tasker script worked (I've never played with it, but I am a programmer), I realized that the problem was with a variable %HAVE4G. For whatever reason my phone had %HAVE4G set to 1 all the time. So I added a 'Variable Clear' as step 3 in the Airplane Toggle Widget, right after it clears the %4GSCAN variable. This seems to have the script working properly now on my phone. You can correct me and tell me if this will have any ill effects when I actually do go into 4g coverage or at other times with the script, but as far as I can tell, it may need to clear that variable in new script installs. My guess is that I went into 4G at some point and that variable got stuck in memory. Perhaps I killed the script before leaving 4G and it prevented the script for working correctly thereafter??? Quote Link to comment Share on other sites More sharing options...
enormous Posted January 7, 2013 Author Share Posted January 7, 2013 The variable issue is one that I've addressed in some tweaks I've made. I'll try to find the time to post the updated files soon. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.