DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-01-08 14:51:44

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

WDTV Live doesn't work well with samba server

I have seen serveral post on the WDTV en WD forum saying that the SMB client of WDTV Live is crappy. With the DNS-313 it is even worse. I don't have the five minutes intervals, but a completely sludgy play through. Playing from an windows XP computer over SMB shows a smooth movie. Playing the movies from the DNS-313 on my linux or windows rig gives no problems.

So I started checking the connections. Using my linux computer I first uploaded and downloaded two different files over FTP to the NAS(DNS-313). This gave my the following results keeping in mind that my network is 100MBit.
small file: PC -> NAS 6.7 MBytes/S
                NAS -> PC 9.4 MBytes/s
large file: PC -> NAS 5.7 MBytes/S
                NAS -> PC 5.8 MBytes/s
This indicates that there is no problem with the network, also executing the ifconfig command on the NAS gave no collisions only a small number of dropped packs. Using smbclient from the linux computer to the NAS gave even higher speed then the through FTP. Getting in the range of 10MBytes/s.

Then I started seeing if changing the smb.conf file on the NAS was having any effect, but no luck. Until I was playing with the preinstalled bttorrent client (/usr/local/bt) of the NAS (I will make a new post about this client). While the bt client was running and working an a torrent the WDTV Live could stream a video without hiccups from the NAS. The only way I can explain this behaviour is that there is a problem of keeping the network interface up will communicating over SMB with the WDTV Live. I am now using MediaTomb to watch the movies. But I would also like to get the SMB connection working, as it will give me more freedom.

Any thoughts about tweaking the DNS-313 to get a good SMB connection with my WDTV Live.

Offline

 

#2 2010-01-11 11:31:42

scaryman182
New member
Registered: 2009-11-21
Posts: 4

Re: WDTV Live doesn't work well with samba server

I apologize if my english is poor , but i'm a french user

I've got a WDTV with a DNS-313 ( i bought a wdtv before the live version was available ) and i use the NFS server on the NAS to share with my wdtv (with a USB/network adapter and a custom firmware) . My 720p File work fine but i didn't test with a 1080p file because i've a 720p Tv. Try NFS if possible on WDTV live

Offline

 

#3 2010-01-12 12:39:52

denx
Member
Registered: 2009-06-04
Posts: 11

Re: WDTV Live doesn't work well with samba server

Hi Rawnar!

I'm exactly in the same situation. I have a DNS-313 and a WD TV Live with LAN connection.

The SMB share is working in a very strange manner. Sometimes good, sometimes very bad. I've tried it with mediatomb and it was great. But that server application doesn't support the iso, mkv, mka, etc. file formats - out of the box. The standard divx avi files can be played perfectly and started immediately.

The strangest part of the story is when I play something from mediatomb and after that from SMB (both coming from the same DNS-313 NAS) the playback is smooth. I really don't understand the reason, but usually it works. Even with huge HD movies!

Any tips to tune up the smb connection would be appreciated.

Regards:
denx

Last edited by denx (2010-01-12 16:22:34)


DNS-320 - ffp0.7 - 2+0.5 TB

Offline

 

#4 2010-01-12 22:05:23

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

I will try to reproduces the effect of first connecting with MediaTomb and then connecting with SMB.

I have read somewhere that turning of the auto-negotiation off can help with a bad connection with the WDTV Live. Unfortunately one can not set this on a DNS-313 via the web interface, like with the DNS-323 and DNS-343.
So I have compile the 'ethtool' on the DNS-313. Trying to set the auto-negotiation to off didn't have any effect according to the output of 'ethtool egiga0'.

Settings for egiga0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: pumbs
        Wake-on: s
        SecureOn password: 64:00:01:00:01:01
        Current message level: 0x000002cf (719)
        Link detected: yes
Segmentation fault

You can also see that the advertised link modes is empty. Could this be due to the fact that the transciever is external? The DNS-313 uses a Realtek chip for the network connection, while the driver is for the storlink chip SL3516.

SL351x Giga Ethernet driver 0.1.6 built at Dec  2 2008 16:53:42

Maybe it is time to contact D-Link to ask for the option to set the network connect speed.

Last edited by Rawnar (2010-01-12 22:12:22)

Offline

 

#5 2010-01-13 09:40:11

denx
Member
Registered: 2009-06-04
Posts: 11

Re: WDTV Live doesn't work well with samba server

Hi Rawnar!

I haven't tested the ethernet interface like you, but my network is a little bit complex:

(DNS-313) ---
                      (gigabit ethernet HUB) ---
                                                                (DIR-635 router @ 100 Mbps) --- (Cable modem)
                                     (WD TV Live) ---

In this network - I think - all of the devices has auto negotiation capability. The NAS and the HUB communicate at gigabit, while all others at 100 Mbps full duplex.

But during the test I've tried to eliminate the network devices one-by-one without success. I mean the SMB connection remained unstable.

@scary182: The NFS was my first idea, but the WD TV Live doesn't support that - out of the box. And I don't want to hack that with a 3rd party flash...

BR:
denx


DNS-320 - ffp0.7 - 2+0.5 TB

Offline

 

#6 2010-01-13 12:44:30

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

In my case the network is quite plain. Everything is connected to a central switch that supports 10/100 Mbps. The routing is done by the ADSL modem and I don't have any wireless connections.

First connecting through MediaTomb and then trying to view via SMB seems to improve the connection for a short period. The movie starts quickly, but after a 10 seconds it starts to stutter again.

Maybe replacing the switch will improve the connection. Any suggestions for a good 1Gbps 8-port switch?

Offline

 

#7 2010-01-14 12:33:39

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

Looking into the specs of the SL3516 SoC, I found that it only has intergrated hardware for two MACs. Surfing the internet I found out that network hardware consists out of two parts the MAC and the PHY and they communicate trough the MII interface. This means that in the DNS-313 the RealTek RTL8211B functions as the PHY part. Having only the drivers for the sl3516 MACs is okay.

Still trying to turn the autonegotiation off I installed the mii-tool (predecessor of the ethtool). The info for the network interface gave a different result. Mainly it also showed that the network controller supports 1000BaseT/Half  and 1000BaseT/Full. Trying to fix the network link to a fixed link made the NAS unreachable. This was solved after a reboot.

Going deeper into the problem I check the source code of the driver. This is a file called sl351x_gmac.c, which you can find in the GPL tar archive. Here I found out that there is no 'media' variable defined to change the link mode with mii-tool. I also found out that the ethtool output is hardcoded into the driver and only the speed and duplex mode are providing any real results, the other outputs will never change.

I also found a program called miiphy in the firmware. Lets see what I can do with that.

Offline

 

#8 2010-01-16 16:32:29

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

Update on autoneg: trying to change the settings of the PHY with miiphy only got me no network connections. The options of setting a fixed speed is not present in the drivers, so that's it on the auto negotiation part. (I'm not planning on hacking the driver and building a new kernel followed by making a new firmware.)

Getting back to samba. I boosted the log level and changed the log file names, so I would get for every connection a different file with more info. Here I found out that at the start WDTV Live is opening the file as usual, but after a short period the server gets a time-out and closes the connection. Then the WDTV Live has to re-initiate the connection and the server start sending the network packages again. After a short will the server gets a time-out and closes the connection. You get the picture.

Using the first MediaTomb then SMB method I got a good stream. Checking the difference between a bad stream and a good stream, shows no significant difference. Except for the time-outs

Anyone Ideas?

Last edited by Rawnar (2010-01-16 20:36:40)

Offline

 

#9 2010-01-20 14:25:26

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

At the moment I think the main problems lies with the samba implementation on the WDTV Live. If you look at the B-RAD's WDLXTV Live firmware change log, you will see he is talking about a memory leakage in smbtree. Lets wait of an firmware update of WD.

Offline

 

#10 2010-01-27 14:44:35

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

Me again. Still trying to solve the samba problem. I have upgraded my switch, giving me a 15-20MB/s read from the DNS-313 over smb. Last night a windows XP computer was running on my network, this computer is sharing some files over samba. After turning the WDTV Live and DNS-313 on I could stream the movies without any problem from the NAS to the Mediaplayer. After watching a movie that consisted of two files, the windows computer was turn off and the stuttering started again. I am figuringout what can cause this kind of behavior.

Denx could you check your ifconfig output for the amount of drops and errors. I am having a slow rise of drops and errors on the RX site. If you don't have that we could eliminate this as a cause.

Offline

 

#11 2010-02-08 11:31:20

Rawnar
Member
From: Den Haag
Registered: 2009-12-20
Posts: 26

Re: WDTV Live doesn't work well with samba server

I have made a phone call to D-Link,  but they also did not understand what the problems was. So, I bought a new NAS of another brand, and now everything runs smooth. This concludes that my DNS-313 is generating the problem and I think it is a hardware problem. The ifconfig command gives besides the large drops and errors, also frame problems. The latter one is a good indication the the NIC is working improperly. I still have my DNS-313, but maybe I will try to get a new one through RMA.

Offline

 

#12 2011-01-03 12:19:57

denx
Member
Registered: 2009-06-04
Posts: 11

Re: WDTV Live doesn't work well with samba server

Hi Rawnar,

I had no time in the last year, sorry.

I solved the issue in the following way: WD TV LIVE upgraded with b-rad's custom firmware, DNS-313 also upgraded with a custom firmware. User space NFS started on NAS and WD TV LIVE configured to use NFS (http://b-rad.cc/cifs-interceptor).

The result: perfect and smooth playback, movies starting immediately.

BR,
denx


DNS-320 - ffp0.7 - 2+0.5 TB

Offline

 

#13 2011-01-21 14:08:11

L&R
Member
Registered: 2009-11-21
Posts: 11

Re: WDTV Live doesn't work well with samba server

After moving on WDXLTV samba working without problems.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB