-   Linux - Server (
-   -   Large file transfer over scp or samba crashes wireless connection (

Iskendar 02-03-2010 08:22 AM

Large file transfer over scp or samba crashes wireless connection
Hi all,

I'm setting up a htpc system (Zotac IONITX-F based) based upon a minimal install of ubuntu 9.10, with no GUI other than xbmc. It's connected to my router (d-link dir-615) over a wifi connection configured for static IP (ath9k driver), with the following /etc/network/interfaces:


auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

# Wireless
auto wlan0
#iface wlan0 inet dhcp
iface wlan0 inet static
pre-up /sbin/wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

Network is fine, samba share to the media direction works, until I try to upload a large file to it from my desktop system. Then it downloads a couple of percents at a really nice speed, but then it stalls and the box becomes unpingable (Destination Host Unreachable), even after canceling the transfer, requiring a restart of the network.
Same thing when I scp the file from my desktop system to the htpc, same thing when I ssh into the htpc, and scp the file from there. Occasionally (rarely) the file does pass through, but most of the time the problem repeats itself. Transfer of small text files causes no problems, and the same goes for the fanart downloads done by xbmc.
I tried the solution proposed in this thread, and set mtu to 800 in the interfaces file, but the problem persists. Any ideas on what could cause this problem, and how to solve it?

P.S. If this is more appropriate for the network forum, I'll move it, it seems to be something in between.

kschmitt 02-03-2010 01:03 PM

I had the exact same symptoms before for two different reasons.

Once it was a bum broadcom wireless card in an HP laptop. After much argument HP finally replaced the card, and it was fixed.

Currently I have similar problems with my Asus 1005HA, which also uses the ath9k driver. I'm pretty sure it's a driver issue, because unlike when I had the hardware issue, if I rmmod and then modprobe ath9k, then it's fine again.

One thing I've found helps, but doesn't solve the problem, is to set the rate.

When I check my rate using iwconfig, it shows 0. If I iwconfig it to 54M it's stable longer. I'm tempted to try configing it to 24 or 11, but like you, this only happens when trying a large in that case I want speed!

BTW, if your connection is dying when transferring large numbers of smallish files (say 24G of raw pictures), try rsync. It won't re-send any files that are already complete, so it saves a bit of hassle.

Good luck, and if you find a permanent solution, let me know too!

ucurboy 11-07-2011 09:07 AM

Samba large file upload issue
I experienced similar symptoms. I could copy (> 20GB) files from the Ubuntu (10.04.3 LTS) Samba (3.4.7) server to my Windows 7 laptop. I could copy small (<1GB) files from the Windows 7 laptop to the Ubuntu Samba server. However, when trying to copy a large file (>20GB) from the Windows 7 laptop to the Ubuntu Samba server, the transfer dialog would start as expected with "Calculating...". Eventually, the dialog would be replaced by the error dialog "There is a problem accessing Z:\ Make sure you are connected to the network and try again." The file appears to be the correct size on the server, but it is corrupt. I scoured the message boards and even changed my Reltek NIC driver from r8169 to r8168, but that did not seem to resolve the issue. My issue is that the user created on the server was created with an encrypted home directory. I set up a new user without an encrypted directory and now file transfers (>20GB) can be uploaded/downloaded without corruption.

tmax 02-03-2013 11:52 AM

this config helped me to solve the same problem

auto wlan1
iface wlan1 inet static
        # wireless-* options are implemented by the wireless-tools package
        wpa-driver nl80211
        wpa-ssid mynetwork
        wpa-psk plaintextsecret
        wpa-key-mgmt WPA-PSK
        wpa-pairwise TKIP CCMP
        wpa-group TKIP CCMP
        wpa-proto WPA RSN

I suppose the key is wpa-driver option nl80211 instead of default wext driver.

All times are GMT -5. The time now is 02:11 AM.