[Solved] Connecting network storage on Huawei Router hg556a

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

[Solved] Connecting network storage on Huawei Router hg556a

Post by Laugh2 »

Hi, I'm trying to connect LM17.1 64bit MATE to a USB hardrive connected to a router (Huawei hg556a). The goal is to automate backups to this drive for all devices connected to this router.

What works
Following the handbook's instructions for windows I can successfully connect/map to the drive from Windows 8 in VMWare Player hosted by LM17.1 on this laptop . The address used is "\\192.168.1.1\Share". I want to connect to USB drive directly from LM17.1 i.e. not requiring Win8/VMWare Player.

What doesn't work
I've tried "Caja/File/Connect to server" using parameters: Type=Windows Share, Server=//192.168.1.1/share, Folder=/USBDisk_1. (Share and USBDisk_1 are functions of the router and work with Win8 as described above.) The error message is:
  • The folder "/USBDrive_1" cannot be opened on "//192.168.1.1/share".
The error message remains the same for the different variations of capital letters, etc. I have tried.

Ports
The local port configuration is (refer http://ubuntuforums.org/archive/index.p ... 34064.html):

Code: Select all

sudo nmap -sS -sU -T4 192.168.1.3
[sudo] password for xxxx: 

Starting Nmap 6.40 ( http://nmap.org ) at 2015-05-22 20:16 NZST
Nmap scan report for 192.168.1.3
Host is up (0.000025s latency).
Not shown: 1992 closed ports
PORT     STATE         SERVICE
139/tcp  open          netbios-ssn
445/tcp  open          microsoft-ds
902/tcp  open          iss-realsecure
68/udp   open|filtered dhcpc
137/udp  open          netbios-ns
138/udp  open|filtered netbios-dgm
631/udp  open|filtered ipp
5353/udp open|filtered zeroconf

Nmap done: 1 IP address (1 host up) scanned in 5.51 seconds
The router port configuration is:

Code: Select all

sudo nmap -sS -sU -T4 192.168.1.1
[sudo] password for richard: 

Starting Nmap 6.40 ( http://nmap.org ) at 2015-05-22 20:16 NZST
Warning: 192.168.1.1 giving up on port because retransmission cap hit (6).
Nmap scan report for 192.168.1.1
Host is up (0.0010s latency).
Not shown: 1979 closed ports
PORT      STATE         SERVICE
23/tcp    open          telnet
53/tcp    open          domain
80/tcp    open          http
139/tcp   open          netbios-ssn
53/udp    open          domain
67/udp    open|filtered dhcps
138/udp   open|filtered netbios-dgm
161/udp   open|filtered snmp
162/udp   open|filtered snmptrap
1060/udp  open|filtered polestar
1719/udp  open|filtered h323gatestat
1900/udp  open|filtered upnp
6001/udp  open|filtered X11:1
16918/udp open|filtered unknown
18113/udp open|filtered unknown
20129/udp open|filtered unknown
22105/udp open|filtered unknown
24511/udp open|filtered unknown
28493/udp open|filtered unknown
32774/udp open|filtered sometimes-rpc12
61961/udp open|filtered unknown
MAC Address: 64:16:F0:EA:3E:32 (Shehzhen Huawei Communication Technologies Co.)

Nmap done: 1 IP address (1 host up) scanned in 978.70 seconds
Since this configuration works with Win8 in VMWare Player shouldn't the router configuration be OK for LM17.1 too?

Can anyone help?

Equipment
  • Linux Mint 17.1 Rebecca, 64bit, MATE
    Dell Latitude D630 laptop with 4MB RAM (Core2 Duo CPU)
    nVidia Quadro NVS 135M graphics
    Dell PR01X docking station
    Windows 8.0 in VMWare Player 6.0.6 build-2700073 (hosted by LM17.1)
    Vodafone Huawei hg556a Router
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

It's always a treat to diagnose problems with these embedded samba servers in routers. It would be great if they used a more current version of samba when they did this and even better if they would design them to work with Apple products....

What happens when you access the share directly in a terminal:

Code: Select all

caja smb://192.168.1.1/share
Note: "192.168.1.1" is the server and "share" is the actual share on the server. USBDisk_1 is a folder on that share.

Does it open caja and show you the USBDisk_1 folder?

Anyhoo, What's interesting are these quotes from the HowTo you referenced:
For Windows users there are three different methods to access the files stored on a portable device, you can choose from mapping a network drive, via Samba or via FTP.
If you use the Apple Mac operating system , then it is not currently possible to use Finder to "Connect to Server..." in order to map the network drive.
"Apple Mac operating system" via "Connect to Server" uses samba by default to access remote shares so I don't know what to make of that comment. For OSX they advise ftp instead of samba so you can try that:

Code: Select all

caja ftp://192.168.1.1
It could be that Linux ( and OSX ) would have to "dumb down" the security protocol it uses to connect which will mean a manual mount of the share. Something like this:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o username=some-user-name,password=some-password,uid=1000,sec=ntlm,nounix
You would have to install the cifs-utils package and create the /media/mountpoint directory.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Thank you for a few things to try. Here are the LM17.1 responses:
  • 1) "caja smb://192.168.1.1/share"
    returns an error message:
    • Could not display "smb://192.168.1.1/share/".

      Error: Failed to mount Windows share: Connection timed out
      Please select another viewer and try again.
    2) caja ftp://192.168.1.1
    returns a similar but slightly different error message:
    • Could not display "ftp://192.168.1.1/".

      Error: Could not connect to 192.168.1.1: Connection refused
      Please select another viewer and try again.
    ... which perhaps suggests permission problems? Since no passwords or similar are set for the USB drive on the router there should be no permission problems.

    3) sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o username=some-user-name,password=some-password,uid=1000,sec=ntlm,nounix
    Since there (should) be no permission issues I tried the above command as-is after creating /media/mountpoint. It returned the following:
    • mount error(5): Input/output error
      Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    I then tried substituting the username and password for the router for normal users instead of "some-user-name" and "some-password" respectively, followed by substituting the administrator's username and password. Both attempts responded with the same error message as with "some-user-name" and "some-password".

    4) caja ftp://192.168.1.1/share
    I tried this and got a different response. In the terminal I got the following message approx. 30 times repeated:
    • (caja:28151): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Permission denied. dconf will not work properly.
    and also the now familiar error message in a window:
    • Could not display "ftp://192.168.1.1/share".

      Error: Could not connect to 192.168.1.1: Connection refused
      Please select another viewer and try again.
Perhaps these messages point in a useful direction?

PS: I didn't have to install anything for my LM17.1 to recognise the cifs function. I presume I would get a message requesting cifs-util if a further cifs package had to be installed?
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

Since no passwords or similar are set for the USB drive on the router there should be no permission problems.
Samba is a temperamental thing so specify guest in the command:

Code: Select all

caja smb://guest@192.168.1.1/share
Or:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix
Just in case something is messed up in your config fie you might want to post the output of this command:

Code: Select all

testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Taking your suggestions in reverse order:

1) testparm -s
This gave:

Code: Select all

testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	server string = %h server (Samba, Linux Mint)
	server role = standalone server
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	print ok = Yes
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
2) sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix
  • This gave an error message similar to before:
    • "mount error(5): Input/output error
      Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)"
3) caja smb://guest@192.168.1.1/share
  • This command seems to be making progress, however, currently with unpleasant results:
    a) firstly an error message in a windows and reminiscent of Windows groups and mentioning "WORKGROUP" (presumably due to manufacturer's assumptions). It asked for a password, if I remember correctly. (Due to problems described below I can't reproduce it.)

    b) after selecting Cancel all system responses became increasingly sluggish although the CPU was only at 20%. The memory usage increased to 99% and then the swap memory steadily filled. Logging out didn't solve this (but returned an error message regarding the "MATE Settings daemon") and a reboot was necessary.
4) caja smb://Vodafone@192.168.1.1/share
(Note: "Vodafone" is the username for basic access to the router.)
  • a) This didn't return an error message, however, Caja is now useless.
    b) Rebooting results in 12 instances of Caja occurring with the tile for the 12th instance flashing. Repeated rebooting doesn't help. It appears that the Samba mapping is partially complete but has encountered an error.
Can you help return Caja to a useful state?
Also, perhaps a solution is near now with just a password entry or other simple addition necessary?

PS: "sudo umount /192.168.1.1/share" doesn't help, returning "umount: /192.168.1.1/share: not found".
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

If I put all these errors together:
caja:28151): dconf-CRITICAL **: unable to create file '/run/user/1000/dconf/user': Permission denied. dconf will not work properly.
And whatever the hell happened here:
4) caja smb://Vodafone@192.168.1.1/share
(Note: "Vodafone" is the username for basic access to the router.)

a) This didn't return an error message, however, Caja is now useless.
b) Rebooting results in 12 instances of Caja occurring with the tile for the 12th instance flashing. Repeated rebooting doesn't help. It appears that the Samba mapping is partially complete but has encountered an error.
I will tell you what I would do:

Boot into the install DVD for Mint and access either with the caja command or with the "mount -t cifs" command the share on the router. If that works then there is something fundamentally wrong with your install.

Running "caja smb://.... cannot possibly create the symptoms you are experiencing unless something very basic is wrong with your install.

If you have 12 instances of caja running the only thing I can think of is killing them. Menu > System Tools > system monitor > processes tab.

Shutting down for the day I'm afraid. I will check back tomorrow.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Thanks, altair4. See you tomorrow?

System Monitor doesn't show any instances of Caja. So I removed Caja using Synaptics, rebooted, and reinstalled Caja. Two reboots later the system is normal. Phew! :D (This installation has run for 18 months without major hiccups.)

Booting from a Live USB gave the same/similar responses:
  • 1) "sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix"
    • Replies with:
      • "Couldn't chdir to /media/mountpoint: No such file or directory"
    2) caja smb://guest@192.168.1.1/share
    • As above, the reply is reminiscent of a Windows workgroup. A window appears with the first line "Password required for share share on192.168.1.1" and fields Domain and Password. The Domain field already contains the word "WORKGROUP" and the password field is empty. All passwords I tried returned the following error message:
      • "Could not display "smb://guest@192.168.1.1/share/".

        Error: Failed to mount Windows share: Connection timed out
        Please select another viewer and try again."
Since there shouldn't be any usernames/passwords I wonder what password should be provided.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

Booting from a Live USB gave the same/similar responses:

1) "sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix"
Replies with:
"Couldn't chdir to /media/mountpoint: No such file or directory"
You need to create the /media/mountpoint folder first in the live session.
2) caja smb://guest@192.168.1.1/share

As above, the reply is reminiscent of a Windows workgroup. A window appears with the first line "Password required for share share on192.168.1.1" and fields Domain and Password. The Domain field already contains the word "WORKGROUP" and the password field is empty. All passwords I tried returned the following error message:
"Could not display "smb://guest@192.168.1.1/share/".

Error: Failed to mount Windows share: Connection timed out
Please select another viewer and try again."
When you get prompted for the password just hit enter. It will pass a null password.

Your best bet is with the manual mount ( mount -t cifs....) but I'm beginning to think this is all academic because of this statement in your link:
If you use the Apple Mac operating system , then it is not currently possible to use Finder to "Connect to Server..." in order to map the network drive.
Linux has far more in common with Apple's OSX then it does with Windows. If they actually designed this thing to be accessible only to Windows ( and I have no idea why or even how you would do that ) there's not much you can do.

The second line in the link talks about using ftp on OSX:
However you can use an FTP client to access the files stored on the USB devices attached to your HG556a router.
I'd stay away from using caja to do this since there are apparently issues with it. I'd go with something old like gftp:

Code: Select all

sudo apt-get install gftp
Then it will be at Menu > Internet > gFTP

Then follow the instruction they posted for Apple:
Using your choice of FTP client you will require the following settings:
ftp://192.168.1.1
Username: vodafone
Password: vodafone
Port: 21
So:
Host: 192.168.1.1
Port: 21
User: vodafone
Pass: vodafone
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

1) Live USB
Oops, I had forgotten to create /media/mountpoint when booting from the Live USB. So I repeated the exercise and got the same error message"

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix

mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
2) caja smb://guest@192.168.1.1/share
Both a null password and "vodafone " return the same message:
  • "Could not display "smb://guest@192.168.1.1/share/".

    Error: Failed to mount Windows share: Connection timed out
    Please select another viewer and try again."
... this is all academic because ...
Yes, Wikipedia has a nice graphic showing Mac's OSX to be an early fork off Research Linux (refer http://en.wikipedia.org/wiki/Linux). So Mac's OSX is actually a Linux OS (and not Windows).

Perhaps the problems lie in the port configuration - can "Connection timed out" be caused by ports being closed? ? In my first post I gave the port configuration for both my LM17.1 and the router. The link referred to i.e. http://ubuntuforums.org/archive/index.p ... 34064.html, states:
  • "... but you need the following ports open on both Ubuntu and WinXP in order for samba and smb to communicate:

    PORT STATE SERVICE
    139/tcp open netbios-ssn
    445/tcp open microsoft-ds
    137/udp open netbios-ns
    138/udp open|filtered netbios-dgm
    ..."
In my case the router has a different port configuration:

Code: Select all

sudo nmap -sS -sU -T4 192.168.1.1
[sudo] password for xxx:

Starting Nmap 6.40 ( http://nmap.org ) at 2015-05-22 20:16 NZST
Warning: 192.168.1.1 giving up on port because retransmission cap hit (6).
Nmap scan report for 192.168.1.1
Host is up (0.0010s latency).
Not shown: 1979 closed ports
PORT      STATE         SERVICE
23/tcp    open          telnet
53/tcp    open          domain
80/tcp    open          http
139/tcp   open          netbios-ssn
53/udp    open          domain
67/udp    open|filtered dhcps
138/udp   open|filtered netbios-dgm
161/udp   open|filtered snmp
162/udp   open|filtered snmptrap
1060/udp  open|filtered polestar
1719/udp  open|filtered h323gatestat
1900/udp  open|filtered upnp
6001/udp  open|filtered X11:1
16918/udp open|filtered unknown
18113/udp open|filtered unknown
20129/udp open|filtered unknown
22105/udp open|filtered unknown
24511/udp open|filtered unknown
28493/udp open|filtered unknown
32774/udp open|filtered sometimes-rpc12
61961/udp open|filtered unknown
MAC Address: 64:16:F0:EA:3E:32 (Shehzhen Huawei Communication Technologies Co.)

Nmap done: 1 IP address (1 host up) scanned in 978.70 seconds
If this is a hot line of investigation I can try to open ports 445, 137, and 138 in addition to 139, which is already open on the router i.e. the Huawei hg556a. What do you think?

Amongst other settings the router has "NAT -- Port Triggering Setup" described as follows:
  • "Some applications require that specific ports in the Router's firewall be opened for access by the remote parties. Port Trigger dynamically opens up the 'Open Ports' in the firewall when an application on the LAN initiates a TCP/UDP connection to a remote party using the 'Triggering Ports'. The Router allows the remote party from the WAN side to establish new connections back to the application on the LAN side using the 'Open Ports'. A maximum 32 entries can be configured.

    You must reboot the router to make the new configuration effective."
Would this be a good place to open up these ports?

Use of FTP or other connection types could an option, but would reduce the effectiveness of automated backups for each of the devices on the network, I think.
Last edited by Laugh2 on Sun May 24, 2015 4:31 am, edited 2 times in total.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

Since you are using ip addresses to contact the server all the netbios ports are nice but the important one is 445. That's the actual samba port in a modern smb / samba server.

And there is no MacOS. Hasn't been for a decade. OSX is more linked to BSD since that's where some of the components came from. OSX is not a LinuxOS and you run the risk of being haunted by the ghost of Steve Jobs for the rest of eternity for even suggesting it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

I've been playing around with a theory the last few hours based on the assumption that:

*** The samba server ( if in fact it is a samba server ) on the router was state of the art when Win98 was king.

Back then there was no port 445. Now a cifs mount today occurs across port 445 and if that's not open it tries against the old 139. The samba server in turn is set up to switch between the two if necessary. But if there is no 445 then it might be rejected by the server ( router ) outright and never get to 139.

So as a test of this theory I set up a samba server to listen only to port 139 and set the mount to use only 445 and of course I got an Input/output error.

But if I change the cifs mount to only use port 139 it does works. The mount command would look something like this:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix,port=139
Here's the problem though. I did all this on my normal desktop system which is Xubuntu 14.04 (kernel=3.13.0-53).

When I try this on Mint Cinnamon or Mate 17.1 ( kernel=3.13.0-37) it fails with an input / output error. And I think the problem is a kernel issue. Xubuntu updates the kernel - every damn day for about a week lately - whereas Mint does not and there seems to have been a bug in the kernel at one point: mount.cifs gives input/output error when connecting to port 139

You don't by any chance have Xubuntu, Ubuntu, or any of the other 'buntu's at the 14.04 level lying about do you?

Updating the kernel on Mint is not something that's recommended here.

Need sleep. So long for the day.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Hmm, a few good points there. I've spent a bit of time on this today too.

1) I've corrected my abbreviation of Wikipedia's "Mac OS X" away from MacOS in my posting above. Thanks for correction. (We wouldn't want Steve Jobs resting unhappily.)

2) Your thoughts re: Port 139 vs. 445 correspond to the port configuration of the router i.e. 139 is open and 445 closed. Win8 can therefore map without 445, presumably using 139. Btw, the router's handbook refers to Windows XP rather than Win98.

I can test this using Mint 13 tomorrow i.e. Ubuntu 12.04 and kernel 3.2+.

3) Very interestingly GeekZone has postings complaining that transfer rates are very slow from a USB drive on this router i.e. Huawei hg556a ! Refer http://www.geekzone.co.nz/forums.asp?fo ... cid=113073.

To test this myself, I tried some large transfers to/from the USB disk on the router with Win8 on VMWare Player. It was indeed extremely slow and kept crashing early in the transfer. Windows Vista couldn't map to the drive at all (dual boot LM17.1 and Vista). Perhaps the tardy transfer rates and crashes are caused by Win8 not liking transfers via Port 139 alone?


A central drive would be preferable and useful for file transfers. so I'd prefer this solution if possible. Perhaps Mint can perform better? (Plan B would be a USB drive on each device, probably using old IDE drives after dusting off. Not so good)
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

Your thoughts re: Port 139 vs. 445 correspond to the port configuration of the router i.e. 139 is open and 445 closed.
If my theory about the samba server on the router is correct it's not so much that the firewall blocks 445 as it is that the samba server isn't listening for smb traffic on port 445. Even if you opened 445 on the firewall it may have no affect on the server. It does tie out nicely with it's OSX incompatibility though since OSX uses 445 not 139.

On a modern samba server it will switch automatically but even if it didn't you can force which port it will use with a "smb ports = 445" in it's smb.conf. For a samba server to listen only at port 139 it would have to be running samba at the 2.x. level not the current 4.x level.

There is another hint to the vintage of things on the router and it's this line in your link:
Storage devices that are formatted with the FAT32 file system support both read and write access when connected to the router so you will be able to read, copy, edit files and also delete files. However, storage devices that are formatted with the NTFS file system only support read access, so you cannot transfer, copy, edit or delete files to/from the disk, you will only be able to read the files already stored there.
NTFS has been read/writable since 2006 so this router is running either Linux or more likely BSD from a long time ago.

Side note and caution: I am not suggesting for a moment that you or any other Mint user do this since it's not recommended here. I run Mint as VBox guests so I can quickly make a clone and do terrible things to it without affecting my daily work:

I have updated Mint Cinnamon 17.1 to the kernel level present in my Xubuntu 14.04 and the cifs mount command that includes the "port=139" option now runs without error. There’s no way for me to determine if this would solve your issue since I don't have your router but it does confirm the bug report.

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

LM13 Maya 64bit
No success with LM13. The error responses generally said "no response" or "no reply" or similar. Perhaps this sounds like samba found the server and send a request which was unanswered? LM13 has perhaps a comparable vintage to WinXP (albeit much better)?

Xubuntu 14.04 - Live USB
I made and booted a Live USB of Xubuntu 14.04. The version is:

Code: Select all

uname -a
Linux ubuntu 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:45:15 UTC 2015 i686 i686 i686 GNU/Linux
After creating /media/mountpoint I executed the following in a terminal:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix,port=139
(refer your above post 24 May). Since there was no error message nor request for further info this may have worked. I've never used Xubuntu. In File Manager I tried to connect to variations of "smb://192.168.1.1/Share" but only got error messages. Browsing found WORKGROUP and also the LM13 device mentioned above, which is also connected to this server, but didn't find the USB storage on 192.168.1.1. Perhaps I should be trying something else to test whether it worked?

Xubuntu 14.04 - VMWare
I installed and updated Xubuntu 14.04 onto VMWare Player so it's easier to play with. After creating /media/mountpoint I executed the same command as for the Live USB:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o guest,uid=1000,sec=ntlm,nounix,port=139
mount: wrong fs type, bad option, bad superblock on //192.168.1.1/share/USBDisk_1,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
The response suggests an incorrect file system ("fs")? I formatted the disk in LM17.1 as "Compatible with all systems and devices (MBS/DOS)". GPart identifies the format as FAT32.

Opeining File Manager/Go/Open Location and inserting "smb://user@192.168.1.1/share" into the address bar opens the same windows we saw with LM17.1 with Domain "WORKGROUP" and requesting a password. The null password replies:
  • "Failed to open "File System".
    Failed to mount Windows share: Connection timed out."
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

Observations:

*** You need to install cifs-utils in the 'buntu's for a manual cifs mount to work. That's the "fs" error it's referring to.

*** There is no way to replicate something like a "port=139" option using the gvfsd-smb mechanism that Nemo, Nautilus, Caja, and Thunar use so it will always fail if that parameter is required.

*** Browsing for host names on the network rather than using ip addresses is a completely different issue. And it's not likely to resolve this particular issue.

You can try using some other olde tyme things in the mount command like:
servernetbiosname=arg
Specify the server netbios name (RFC1001 name) to use when attempting to setup a session to the server. Although rarely
needed for mounting to newer servers, this option is needed for mounting to some older servers (such as OS/2 or Windows
98 and Windows ME) since when connecting over port 139 they, unlike most newer servers, do not support a default server
name. A server name can be up to 15 characters long and is usually uppercased.
And what the bug report mentioned:
netbiosname=arg
When mounting to servers via port 139, specifies the RFC1001 source name to use to represent the client netbios machine
name when doing the RFC1001 netbios session initialize.
But there's a limit to what you can do on the client end of this so I would suggest you ask your question in the router's forum.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Cifs-utils was already installed on the LM17.1 system. For Xubuntu/VMWare Player I found "Smb4K" in the Ubuntu Software Centre and it fixed the fs error.

Your theory about Port 139 does fit what's known. The server i.e. router, has port 139 open but not port 445. So if Caja in LM17.1 and Thunar in Xubuntu can't use the mapped drive, then:
  • 1) is there a File Manager/browser which can use the mapped drive via port 139 alone? How could this be determined?
    2) presumably backup utilities won't write directly to the mapped drive.
    3) Could large files be copied to the mapped drive via the command line i.e. without a GUI? If so, perhaps a workaround is for automated backups to be created locally then copied to the mapped drive by command (or a script)?
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Connecting to network storage on Huawei Router hg556a

Post by altair4 »

1) is there a File Manager/browser which can use the mapped drive via port 139 alone? How could this be determined?
I do not know.
3) Could large files be copied to the mapped drive via the command line i.e. without a GUI?
It depends on how you want to look at it:

*** A manual mount of the remote share creates a "view" of that share on your local mount point and that's what you are trying to achieve here.

*** You could use gvfs itself at the command line level but that won't do you any good since gvfs is what the file manager is using.

*** You could go old school and use smbclient which sets up a com link much the same way ftp did back in the day. So if I wanted to make a connection to a guest share I have on my server:
Here I make the connection:
tester1@vxub1404:~$ smbclient -U guest //192.168.0.100/downloads
Enter guest's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.6-Ubuntu]
Here I copy a file from the server to my home directory:
smb: \> get nm-txt
getting file \nm-txt of size 149 as nm-txt (48.5 KiloBytes/sec) (average 48.5 KiloBytes/sec)
Here I copy a file from my home directory to the server's share:
smb: \> put client-test.txt
putting file client-test.txt as \client-test.txt (0.0 kb/s) (average 0.0 kb/s)
And here I close the connection:
smb: \> exit
tester1@vxub1404:~$
As much fun as this has been what insight have you received from your queries on the routers or vodafone forum.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

I'll post the results here when I get an answer form the Vodafone community. Meanwhile I tried FTP, which worked immediately and reliably :D : To test the ftp connection I transferred 4 subdirectories containing 244 files totalling 1.5GB at 1.2MiB/s, which is probably OK for a oldish, 100Mbps router. A 4.6GB compressed backup file takes about an hour i.e. 1.2MiB/s. [ADDED LATER] On the other hand, the same 4.6GB file takes 6min (13MiB/s) to store onto the same drive when directly attached i.e. 10 times as fast. This slowness can be expected for a 10/100 Mb/s router compared to max.480Mb/s for USB2 i.e. 5x difference. BTW Errors were found in the copied 4.6GB file, which was probably too big for the FAT32 partition.

Real transfer rates for are less than max. rates e.g. "Due to bus access constraints, the effective throughput of the High Speed signalling rate is limited to 35 MB/s or 280 Mbit/s" (from http://en.wikipedia.org/wiki/USB#USB_2.0).

This'll be Plan B if the Samba connection won't work. It is slow but with incremental backups probably OK. Thanks for your help!
Last edited by Laugh2 on Thu May 28, 2015 2:15 am, edited 6 times in total.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

I looked for backup programs which can use FTP, after all automated backups is the goal. There are indeed several e.g. TimeDrive. There are also synchronising programs using FTP e.g. FTPSync.

I'll investigate these since the samba solution is not so easy on this router and post my experiences. In any case, FTP might be a better and more efficient connection. Thanks again for your help.
Laugh2
Level 4
Level 4
Posts: 275
Joined: Fri Aug 16, 2013 4:01 am

Re: Connecting to network storage on Huawei Router hg556a

Post by Laugh2 »

Hi altair4, the problem appears to be a kernel bug. The following error message referred to above:

Code: Select all

sudo mount -t cifs //192.168.1.1/share/USBDisk_1 /media/mountpoint -o username=some-user-name,password=some-password,uid=1000,sec=ntlm,nounix

    mount error(5): Input/output error
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
is discussed in: The temporary fix appears to be to regress from kernel 3.13.0-37-generic to 3.13.0-35-generic (not 3.13.0-36-generic). There is also a helpful tutorial at:
Locked

Return to “Hardware Support”