Guest tristan202 Posted February 18, 2010 Report Posted February 18, 2010 I have had some serious issues with my wifi. I had trouble browsing, checking mail and using the market. It always worked fine using 3g. I then stumpled upon a solution, where the mtu gets changed, and supposedly mends the problem. I tried it myself, and found it to work a charm. Only problem was, that I had to type the command at every reboot. Therefore I sent a pm to kendon, asking him for help. He then came up with this piece of code which runs automatically at every boot. As far as I know, you need to be on a MCR, but please correct me if I'm wrong: adb shell "echo sleep 3 > /data/init.sh" adb shell "echo 'ip link set tiwlan0 mtu 1300' >> /data/init.sh" What the code does, is that it creates the file 'init.sh' in /data, which MCR runs at boot. The first line tells it to wait for 3 seconds, and the second line is the one that changes the mtu. Before running those 2 commands, you should check if you already have the init.sh file by doing this: adb shell cat /data/init.sh If the file don't exist, it will give you an error. If it does exist it will list the contents of the file. In case it exists, you should change the first line of the file with this: adb shell "echo sleep 3 >> /data/init.sh" Note the '>' in the line. One '>' overwrites, and '>>' appends. Tha'ts the difference. Try it out and report back if it worked for you. Big thanks to kendon for making it for me.
Guest kendon Posted February 18, 2010 Report Posted February 18, 2010 nice to hear it works :D as /data/init.sh is mcr specific you could also use this app. of course root is needed, but other than that it should work with any rom.
Guest Posted February 18, 2010 Report Posted February 18, 2010 Hi tristan, thanks a lot to you and kendon! The only thing about MCR was WiFi not working correctly... I posted a while ago on that issue but no solution turned up. If I set MTU manually it works fine, but putting the commands in /data/init.sh does not run them on boot. I apply the changes to init.sh via ssh, though. I am running on MCR 3.2beta5. I chmod a+x /data/init.sh since it was not executable. Do you know what could be wrong? Thanks, reeja. I have had some serious issues with my wifi. I had trouble browsing, checking mail and using the market. It always worked fine using 3g. I then stumpled upon a solution, where the mtu gets changed, and supposedly mends the problem. I tried it myself, and found it to work a charm. Only problem was, that I had to type the command at every reboot. Therefore I sent a pm to kendon, asking him for help. He then came up with this piece of code which runs automatically at every boot. As far as I know, you need to be on a MCR, but please correct me if I'm wrong: adb shell "echo sleep 3 > /data/init.sh" adb shell "echo 'ip link set tiwlan0 mtu 1300' >> /data/init.sh" What the code does, is that it creates the file 'init.sh' in /data, which MCR runs at boot. The first line tells it to wait for 3 seconds, and the second line is the one that changes the mtu. Before running those 2 commands, you should check if you already have the init.sh file by doing this: adb shell cat /data/init.sh If the file don't exist, it will give you an error. If it does exist it will list the contents of the file. In case it exists, you should change the first line of the file with this: adb shell "echo sleep 3 >> /data/init.sh" Note the '>' in the line. One '>' overwrites, and '>>' appends. Tha'ts the difference. Try it out and report back if it worked for you. Big thanks to kendon for making it for me.
Guest wabe Posted March 1, 2010 Report Posted March 1, 2010 How can you tell that init.sh actually runs at start up? Used the instructions to create init.sh but have no clue how to check if it runs at startup
Guest tristan202 Posted March 2, 2010 Report Posted March 2, 2010 (edited) How can you tell that init.sh actually runs at start up? Used the instructions to create init.sh but have no clue how to check if it runs at startup You can try to run this command to see if it has changed the mtu: adb shell ip link Look for the line with 'tiwlan0'. If you get something like this, it has worked: 7: tiwlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> [color="#0000FF"][b]mtu 1300[/b][/color] qdisc pfifo_fast state UP qlen 100 I have however found out, that this only works if your wifi is turned on when starting the phone. If it is turned off, and then switched on later, the mtu doesn't get changed. So what I have done now is install gscript, and created a shortcut to the script on my homescreen. Then when turning on wifi I click the script. Edited March 2, 2010 by tristan202
Guest Posted March 2, 2010 Report Posted March 2, 2010 If it is turned off, and then switched on later, the mtu doesn't get changed. So what I have done now is install gscript, and created a shortcut to the script on my homescreen. Then when turning on wifi I click the script. Yup - I have also found gscript very helpful. There is also a pro version but for doing a little switch to set MTU the free version works sufficently well.
Guest wabe Posted March 2, 2010 Report Posted March 2, 2010 I have however found out, that this only works if your wifi is turned on when starting the phone. If it is turned off, and then switched on later, the mtu doesn't get changed. Hmm. My script doesn't seem to work although wifi is turned on while starting the phone. How does this "gscript" work? Downloaded but cannot figure out how to load the init.sh file. Could I just input the lines: echo sleep 3 ip link set tiwlan0 mtu 1300 in the script window?
Guest tristan202 Posted March 2, 2010 Report Posted March 2, 2010 Hmm. My script doesn't seem to work although wifi is turned on while starting the phone. How does this "gscript" work? Downloaded but cannot figure out how to load the init.sh file. Could I just input the lines: echo sleep 3 ip link set tiwlan0 mtu 1300 in the script window? What I did was, that i created a new script in gscript, and just put in: ip link set tiwlan0 mtu 1300 Then I created a shortcut to it on my homescreen. I have also put it in my teknologist.sh script, instead of the init.sh. So if wifi is turned on when the phone starts, it modifies the mtu. Else I just click the shortcut after activating wifi.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now