All About Symbian - Nokia (S60) and Sony Ericsson (UIQ) smartphones unwrapped
Prev Previous Post   Next Post Next

  #1  
Old 10-07-2006, 10:19 PM
Telumehtar Telumehtar is offline
Registered User
 
Join Date: May 2006
Posts: 59
Telumehtar is on a distinguished road
Article Nokia N80 Wifi and MTU problem solved

I'm going to tell a bit of a long winded story about a major headache I've been having getting my N80 to talk to a web server on my local WLAN. It's a bit of an obscure problem and it might not affect you even if you're trying to do something very similar to me, but it might be of some interest to geeks and it might help someone one day with the same problem who decides to search here.

I recently set up a little fanless Mini-ITX PC and set it up as a headless Linux server (with Ubuntu Dapper Drake LAMP server). I have all kinds of uses for it, but the most fun was to set up MPD. MPD is Music Player Daemon and it's a network controllable music player. I connected up a big USB hard disk that has all my music on it in lossless FLAC format, and the Mini-ITX board has an SPDIF output that connects nicely to my home-cinema amp to avoid using the rather noisy analogue sound you normally get from a PC.

Next I installed phpMp2 which is a web interface for MPD, so I think you can see where I'm going: I want to control my music from my Nokia phone, the main advantage being I don't have to turn on my big, noisy, main PC when I want to listen to music, and another advantage being that it's really cool to be able to make up a playlist when I'm on the tube and be able to have it already playing when I'm coming through the door!

So I got most of this working when I was at work, installing software by connecting to my little PC by SSH with MidpSSH (a cool Java SSH client for phones) and testing it all out over 3G.

The trouble started when I got home, connected to my server over the local WLAN, and the phone rebooted. I tried everything: installing alternative web interfaces for MPD, adjusting my WLAN security settings, using Opera instead of the built-in browser; using my PSP's web browser instead... Interestingly the PSP's browser just hung there and eventually timed out.

Which was odd, because my main PC connected just fine, even over WiFi. And I could connect just fine over 3G, just not WLAN. And why did it affect the PSP as well? The phone and the PSP can both browse external web sites just fine, the problem only affected the local LAN. Even MidpSSH crashed occasionally when connecting over WLAN. It had to be something about my local LAN.

I tore my hair out for about three days. In the end I found kind of a solution: avoid the local LAN by setting up the web interface on a web site I have hosted in the US. This worked, but it was slow, and sending a message across the atlantic and back when I wanted to skip a track just seemed wrong.

Then tonight I had a brainwave: I remembered about MTU.

MTU is a term that was bandied about a lot when I was hanging out on a broadband forum trying to get the most speed out of my net connection. It stands for maximum transmission unit, and is the maximum number of bytes that a given network medium can transmit in one go. It's important in IP (Internet Protocol) networking because IP packets have to traverse different physical types of network with different MTUs. IP copes by fragmenting big packets up into smaller ones, but this sometimes doesn't work well because a packet that's *just* too big to be sent in one go gets split into a big packet and a small packet, and this can happen over and over again and affect network speed.

Anyway, it just so happens that Ethernet (which is how my Mini-ITX PC is connected to the network) has an MTU of 1500 bytes, and WiFi has an MTU of 1492. This means lots of packet fragmentation. What if this was affecting the phone and the PSP somehow? Both are portable devices and probably have cut down implementations of IP, maybe they're not coping so well with all the fragmentation.

You can easily tell Linux to change the MTU of a particular interface with a command like: "ipconfig eth0 mtu 1492". You can probably do this in Windows too, with an obscure, deeply nested dialogue box somewhere, or regedit.

Anyway, one little command, and suddenly everything worked! Eureka!

I learnt a few lessons: one tiny command in Linux can fix almost any problem, you just have to know the right one; and if a problem gets the better of you, ignore it for a few days and the answer might just pop into your head when you least expect it.

You may not experience this problem because it may be something to do with the particular WiFi router I'm using, or the cables, or the fact that my flat is really untidy, or the weather. Also, I never got round to upgrading my phone firmware, so that might have fixed it, too.

But anyway, I hope that this story is of some interest to someone. If you made it this far, thanks for reading!

Rob.
 

Bookmarks

Tags
mtu, n80, nokia, problem, solved, wifi

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT. The time now is 11:41 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Notes || Contact Us || Privacy Policy