maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Set MTU for N900 (https://talk.maemo.org/showthread.php?t=66100)

prabhuferrari 2010-11-24 04:44

Set MTU for N900
 
Hi,

I am from India and am using N900 for sometime. My broadband service provider BSNL has some issues in rendering some sites. Only few sites used to open from my computer. Later after some research I set the MTU to 1400, where as by default it was 1500. Once I did this, the problem got resolved and am able to view all sites.

Now I face the same problem in my N900. I am unable to open many sites via wifi. I can open the same from my cellular network.

Can anyone guide me how to find whats the default MTU for a N900 and how to change it? Will there be any issues if I change the MTU value?

Or is there a different solution altogether?

Please help.

9000 2010-11-24 05:02

Re: Set MTU for N900
 
Last time I check the MTU of gprs0 is 1400:

Code:

root
ifconfig gprs0| grep MTU

Or you want to set other interface?

icebox 2010-11-24 07:45

Re: Set MTU for N900
 
He said that his problem is when connecting to wireless, so not gprs0 is the interface to check...

Chrome 2010-11-24 08:14

Re: Set MTU for N900
 
wlan's MTU is 1500 by default:

Nokia-N900:~# ifconfig wlan0| grep MTU
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

but i've no idea how to change it, hope someone will help.

9000 2010-11-24 09:08

Re: Set MTU for N900
 
Oops my bad, try the following in xterminal in this case:

Code:

echo ifconfig wlan0 mtu 1400 | root
Anyway, mine doesn't work with MTU 1400. :rolleyes:

prabhuferrari 2010-11-25 06:24

Re: Set MTU for N900
 
Quote:

Originally Posted by 9000 (Post 881880)
Oops my bad, try the following in xterminal in this case:

Code:

echo ifconfig wlan0 mtu 1400 | root
Anyway, mine doesn't work with MTU 1400. :rolleyes:

Sorry if I come across as naive. But do I need to root the device? When I try the above command from xterminal I get root not found :(

9000 2010-11-25 06:30

Re: Set MTU for N900
 
Quote:

Originally Posted by prabhuferrari (Post 882690)
Sorry if I come across as naive. But do I need to root the device? When I try the above command from xterminal I get root not found :(

Install rootsh in the application manager.

prabhuferrari 2010-11-25 06:55

Re: Set MTU for N900
 
Quote:

Originally Posted by 9000 (Post 882695)
Install rootsh in the application manager.

Thank you did that. Now am getting the message "user is not in the sudoers file. This incident will be reported."

I did cd .. twice and reached #.

tried the same there. No error. Tried this "ifconfig wlan0 | grep MTU" to figure if it was changed. Its still at 1500.

Any idea whats going on?

9000 2010-11-25 06:57

Re: Set MTU for N900
 
Quote:

Originally Posted by prabhuferrari (Post 882708)
Thank you did that. Now am getting the message "user is not in the sudoers file. This incident will be reported."

I did cd .. twice and reached #.

tried the same there. No error. Tried this "ifconfig wlan0 | grep MTU" to figure if it was changed. Its still at 1500.

Any idea whats going on?

You should not get that error by issuing the following command:

Code:

echo ifconfig wlan0 mtu 1400 | root
Otherwise, you can use the following instead:

Code:

echo ifconfig wlan0 mtu 1400 | sudo gainroot

FrostyZ 2011-02-17 13:19

Re: Set MTU for N900
 
Hi,

For a wifi connection that I frequently use, this "MTU" trick greatly helps.

However, I would like to avoid typing ifconfig wlan0 mtu 1400 as root, after each reboot.

So I've tried to write an upstart script :
- created a file /etc/event.d/fix-mtu
- added the following content to that file :
Code:

start on startup
console output

script
ifconfig wlan0 mtu 1400
end script

When I run it by doing initctl start fix-mtu it works, but after reboot wlan0's MTU is still set to 1500, so it seems that my "fix-mtu" script is executed "too early" at reboot, or not executed at all... Maybe I should change something on the "start on" line ? Any piece of advice would be appreciated :)

Necc 2011-02-17 14:30

Re: Set MTU for N900
 
Quote:

Originally Posted by FrostyZ (Post 948907)
Hi,

For a wifi connection that I frequently use, this "MTU" trick greatly helps.

However, I would like to avoid typing ifconfig wlan0 mtu 1400 as root, after each reboot.

So I've tried to write an upstart script :
- created a file /etc/event.d/fix-mtu
- added the following content to that file :
Code:

start on startup
console output

script
ifconfig wlan0 mtu 1400
end script

When I run it by doing initctl start fix-mtu it works, but after reboot wlan0's MTU is still set to 1500, so it seems that my "fix-mtu" script is executed "too early" at reboot, or not executed at all... Maybe I should change something on the "start on" line ? Any piece of advice would be appreciated :)

Try different startup code, depending on when do you need to run the script.
Example:
Code:

start on started hildon-desktop
Code:

start on started wlancond

FrostyZ 2011-02-17 22:36

Re: Set MTU for N900
 
Necc, many thanks for your quick and accurate answer ! :)
It worked like a charm.


All times are GMT. The time now is 13:17.

vBulletin® Version 3.8.8