Accessing Windows CIFS

(On the Nokia :)
(Undo revision 45765 by 70.135.114.247 (Talk) SPAM)
 
(24 intermediate revisions not shown)
Line 1: Line 1:
-
'''Accessing files on a Windows PC from the Nokia 770'''
+
==Device Support==
-
=Step by Step tutorial for beginners=
+
===N900===
-
''Example situation :''
+
{{wikify|1=http://talk.maemo.org/showthread.php?t=38536}}
 +
The [[Nokia N900|N900]] does not support CIFS/SMB by default but you can add support for CIFS.
-
Your PC is accessible through Wifi -- either it is on a LAN (with a Wifi access point or router), or it can establish an ad-hoc connection (e.g. a laptop). You would like to share files in a directory on that PC with the 770 through the wireless LAN, without having to link them up with the USB cable or extract the MMC.
+
===N800 / N810===
-
What you need to do is...
+
{{ambox|
 +
text=This just works out of the box if you've got a [[Nokia N800|N800]] or a [[Nokia N810|N810]] with a recent OS2008 version (the very first one did not have CIFS/SMB support). Open the File Manager and after a while you will see Shared folders in the tree on the left.}}
 +
 
 +
===770===
 +
 
 +
Accessing files on a Windows PC from the Nokia 770. Your PC is accessible through Wifi—either it is on a LAN (with a Wifi access point or router), or it can establish an ad-hoc connection (e.g. a laptop). You would like to share files in a directory on that PC with the 770 through the wireless LAN, without having to link them up with the USB cable or extract the MMC.
 +
 
 +
==Step by Step tutorial for beginners==
 +
 
 +
{{wikify|1=http://talk.maemo.org/showthread.php?t=38536}}
 +
 
 +
===On the PC===
-
=On the PC : =
 
Find out or configure the PC's network setup. We must have :
Find out or configure the PC's network setup. We must have :
-
# an IP address, existing or invented. Here we will use '''10.10.10.10'''
+
# an IP address, existing or invented. Here we will use <code>10.10.10.10</code>
-
# the name of the workgroup (or domain, on an enterprise LAN) in which the PC participates. Here we will use '''noworknogroup'''
+
# the name of the workgroup (or domain, on an enterprise LAN) in which the PC participates. Here we will use <code>noworknogroup</code>
-
# the name of the user in the active session (generally shown in the start menu). Here we will use '''urbancowboy'''
+
# the name of the user in the active session (generally shown in the start menu). Here we will use <code>urbancowboy</code>
-
# the password for that account, if there is one. Here we will use '''secretpassword'''.
+
# the password for that account, if there is one. Here we will use <code>secretpassword</code>
-
Now we must create a 'network share', ie a directory that will be accessible through the network.
+
Now we must create a 'network share', a directory that will be accessible through the network.
-
Here we create a directory named '''C:\Nokia770'''. Right-click this directory in Explorer and choose ''"Sharing and security"'' (''or something like that, I don't have an English Windows version, please correct if wrong'' !)
+
Here we create a directory named <code>C:\Nokia770</code>. Right-click this directory in Explorer and choose ''"Sharing and security"'' (''or something like that, I don't have an English Windows version, please correct if wrong'' !)
In the "Network share" frame you need to check "Share this directory on the network".
In the "Network share" frame you need to check "Share this directory on the network".
-
Then you will need to enter a name under which the share will appear on the network. It doesn't need to be the same as the directory name. Here we will keep the default '''Nokia770'''.
+
Then you will need to enter a name under which the share will appear on the network. It doesn't need to be the same as the directory name. Here we will keep the default <code>Nokia770</code>.
There is also a checkbox that specifies if the share will be 'read-only' from the network or if other machines will also be allowed to write to your PC. The choice is yours...
There is also a checkbox that specifies if the share will be 'read-only' from the network or if other machines will also be allowed to write to your PC. The choice is yours...
Line 29: Line 40:
After you confirm the dialog box the icon for the directory in Explorer will change to show that it is "served". Now we are ready on the PC side.
After you confirm the dialog box the icon for the directory in Explorer will change to show that it is "served". Now we are ready on the PC side.
-
=In between : =
+
===In between===
-
We are going to add a small bit of software to the tablet, made available by ITT user 'fanoush' at the following address :
+
-
[http://handhelds.org/~fanoush/maemo/cifs.1.2006.26-8.tar.gz  N770, first IT2006 release]
+
We are going to add a small bit of software to the tablet, made available by itT user 'fanoush' at the following address:
-
[http://handhelds.org/~fanoush/maemo/cifs.2.2006.39-14.tar.gz N770 second IT2006 release]
+
* [http://handhelds.org/~fanoush/maemo/cifs.1.2006.26-8.tar.gz  770 first OS2006 release]
-
 
+
* [http://handhelds.org/~fanoush/maemo/cifs.2.2006.39-14.tar.gz 770 second OS2006 release]
-
[http://handhelds.org/~fanoush/maemo/cifs.N800.2.2006.51-6.tar.gz N800 second IT2007 release]
+
* [http://handhelds.org/~fanoush/maemo/cifs.N800.2.2006.51-6.tar.gz N800 second OS2007 release]
In case of problems I have also made it available on my own site :
In case of problems I have also made it available on my own site :
-
[http://fredp.lautre.net/770/cifs.tgz  for first IT2006 release]
+
* [http://fredp.lautre.net/770/cifs.tgz  for first OS2006 release]
-
It is not a fast server but is unrestricted and the file is small (105 KB).
+
It is not a fast server but is unrestricted and the file is small (105 kB).
Either way we will suppose that the file ends up in the usual '''Documents''' directory that you see in the Maemo File Manager.
Either way we will suppose that the file ends up in the usual '''Documents''' directory that you see in the Maemo File Manager.
-
=On the Nokia : =
+
===On the Nokia===
-
You must have Xterm installed and some way to become "root" (and not flinch at typing Linux command lines...).
+
 
 +
You must have Xterm installed and some way to become "root" (and not flinch at the command line...).
Establish the Wifi link between Nokia and network or PC.
Establish the Wifi link between Nokia and network or PC.
Line 53: Line 64:
As root in xterm we must now :
As root in xterm we must now :
-
<p>'''1'''. go to the actual directory that shows up as 'Documents' : <br>
+
<ol>
-
:'''cd /home/users/MyDocs/.documents'''
+
<li>
-
</p>  
+
Go to the actual directory that shows up as 'Documents':
-
<p>'''2'''. create a directory in which we will "see" the network share. <br>
+
<pre>
-
:Here we use : <br>
+
cd /home/users/MyDocs/.documents
-
:'''mkdir myPC''' </p>
+
</pre>
-
<p>'''3'''. extract the contents of cifs.tgz : <br>
+
</li>
-
:'''tar xvzf cifs.tgz'''</p>
+
<li>
-
:This creates the file '''cifs.ko''' in the current directory (you can check by typing '''ls''').
+
Create a directory in which we will "see" the network share:
-
:All of the above needs to be done only once. Now comes the fun part of actually connecting the two machines, which takes two commands :
+
<pre>
-
<p>'''4'''. The first one loads the cifs.ko kernel module, "teaching" the system how to understand this kind of network share : <br>
+
mkdir myPC
-
:'''insmod ./cifs.ko'''</p>
+
</pre>
-
 
+
</li>
-
This should yield a message like "Now using cifs.ko".
+
<li>
-
 
+
Extract the contents of <code>cifs.tgz</code>, which creates the file <code>cifs.ko</code> in the current directory (you can check by typing <code>ls</code>).
-
<p>'''5'''. If there is no error, we can proceed to "mount" the network share into our guest directory, so that the files on our PC will appear to be also on our tablet. This is a long, detailed command and all the pieces need to be just right, so double-check it :</p>
+
<pre>
-
 
+
tar xvzf cifs.tgz
-
mount -t cifs //_10.10.10.10/''Nokia770_ myPC -o domain=noworknogroup,user=urbancowboy,password=secretpassword **
+
</pre>
-
 
+
</li>
-
(replace the italic parts with your own details of course - type as one single line)
+
<li>
-
 
+
All of the above needs to be done only once. Now comes the fun part of actually connecting the two machines, which takes two commands. The first one loads the cifs.ko kernel module, "teaching" the system how to understand this kind of network share, this should yield a message like "Now using cifs.ko":
-
Again, if there is no error message, you can type **ls myPC''' to check if your PC's files appear on the tablet. Success ! :-)
+
<pre>
-
 
+
insmod ./cifs.ko
-
If the mount command does not respond, check that any firewall on your PC allows devices on the local network to access it. With ZoneAlarm, for example, you'll need to add the IP number of the 770, or your whole DHCP number range, to your "trusted" zone. With M$ XP's build-in Internet Connection Firewall, for another example, you can add port 445 (TCP) for cifs.
+
</pre>
 +
</li>
 +
<li>
 +
If there is no error, we can proceed to "mount" the network share into our guest directory, so that the files on our PC will appear to be also on our tablet. This is a long, detailed command and all the pieces need to be just right, so double-check it, again, if there is no error message, you can type:
 +
<pre>
 +
ls myPC
 +
</pre>
 +
to check if your PC's files appear on the tablet. (replace the italic parts with your own details of course - type as one single line.)
 +
<pre>
 +
mount -t cifs //_10.10.10.10/''Nokia770_ myPC -o domain=noworknogroup,user=urbancowboy,password=secretpassword
 +
</pre>
 +
</li>
 +
</ol>
-
Now your share will appear as the '''myPC''' directory under '''Documents''' in the Maemo File Manager.
+
If the mount command does not respond, check that any firewall on your PC allows devices on the local network to access it. With ZoneAlarm, for example, you'll need to add the IP number of the 770, or your whole DHCP number range, to your "trusted" zone. With MS XP's build-in Internet Connection Firewall, for another example, you can add port 445 (TCP) for cifs.
-
Note : these last two commands will need to be issued again each and every time you reboot your tablet. If you are going to use this often it might pay to read a Linux tutorial and learn how these two commands can be saved to a two-line script, to save future typing...
+
Now your share will appear as the <code>myPC</code> directory under <code>Documents</code> in the Maemo File Manager.
-
Note : If you are in a network, if you do "smbtree" you will see all sharing hosts, if you need to connect to it (and you want to use cifs) you will type "smbtree -d 3" and read at the line where: "Connection to xx.xx.xx.xx" and this is the wanted ip.
+
''Note'': these last two commands will need to be issued again each and every time you reboot your tablet. If you are going to use this often it might pay to read a Linux tutorial and learn how these two commands can be saved to a two-line script, to save future typing...
 +
''Note'': If you are in a network, if you do <code>smbtree</code> you will see all sharing hosts, if you need to connect to it (and you want to use cifs) you will type <code>smbtree -d 3</code> and read at the line where: "Connection to xx.xx.xx.xx" and this is the wanted ip.
-
[[Category:HowTos]]
+
[[Category:Connectivity]]
 +
[[Category:Power users]]
 +
[[Category:N900]]

Latest revision as of 02:44, 22 November 2011

Contents

[edit] Device Support

[edit] N900

This article should include information from this external resource. Please help to copy the relevant information to the wiki.

The N900 does not support CIFS/SMB by default but you can add support for CIFS.

[edit] N800 / N810

Image:Ambox_notice.png
This just works out of the box if you've got a N800 or a N810 with a recent OS2008 version (the very first one did not have CIFS/SMB support). Open the File Manager and after a while you will see Shared folders in the tree on the left.

[edit] 770

Accessing files on a Windows PC from the Nokia 770. Your PC is accessible through Wifi—either it is on a LAN (with a Wifi access point or router), or it can establish an ad-hoc connection (e.g. a laptop). You would like to share files in a directory on that PC with the 770 through the wireless LAN, without having to link them up with the USB cable or extract the MMC.

[edit] Step by Step tutorial for beginners

This article should include information from this external resource. Please help to copy the relevant information to the wiki.


[edit] On the PC

Find out or configure the PC's network setup. We must have :

  1. an IP address, existing or invented. Here we will use 10.10.10.10
  2. the name of the workgroup (or domain, on an enterprise LAN) in which the PC participates. Here we will use noworknogroup
  3. the name of the user in the active session (generally shown in the start menu). Here we will use urbancowboy
  4. the password for that account, if there is one. Here we will use secretpassword

Now we must create a 'network share', a directory that will be accessible through the network.

Here we create a directory named C:\Nokia770. Right-click this directory in Explorer and choose "Sharing and security" (or something like that, I don't have an English Windows version, please correct if wrong !)

In the "Network share" frame you need to check "Share this directory on the network".

Then you will need to enter a name under which the share will appear on the network. It doesn't need to be the same as the directory name. Here we will keep the default Nokia770.

There is also a checkbox that specifies if the share will be 'read-only' from the network or if other machines will also be allowed to write to your PC. The choice is yours...

After you confirm the dialog box the icon for the directory in Explorer will change to show that it is "served". Now we are ready on the PC side.

[edit] In between

We are going to add a small bit of software to the tablet, made available by itT user 'fanoush' at the following address:

In case of problems I have also made it available on my own site :

It is not a fast server but is unrestricted and the file is small (105 kB).

Either way we will suppose that the file ends up in the usual Documents directory that you see in the Maemo File Manager.

[edit] On the Nokia

You must have Xterm installed and some way to become "root" (and not flinch at the command line...).

Establish the Wifi link between Nokia and network or PC.

As root in xterm we must now :

  1. Go to the actual directory that shows up as 'Documents':
    cd /home/users/MyDocs/.documents
    
  2. Create a directory in which we will "see" the network share:
    mkdir myPC
    
  3. Extract the contents of cifs.tgz, which creates the file cifs.ko in the current directory (you can check by typing ls).
    tar xvzf cifs.tgz
    
  4. All of the above needs to be done only once. Now comes the fun part of actually connecting the two machines, which takes two commands. The first one loads the cifs.ko kernel module, "teaching" the system how to understand this kind of network share, this should yield a message like "Now using cifs.ko":
    insmod ./cifs.ko
    
  5. If there is no error, we can proceed to "mount" the network share into our guest directory, so that the files on our PC will appear to be also on our tablet. This is a long, detailed command and all the pieces need to be just right, so double-check it, again, if there is no error message, you can type:
    ls myPC
    

    to check if your PC's files appear on the tablet. (replace the italic parts with your own details of course - type as one single line.)

    mount -t cifs //_10.10.10.10/''Nokia770_ myPC -o domain=noworknogroup,user=urbancowboy,password=secretpassword
    

If the mount command does not respond, check that any firewall on your PC allows devices on the local network to access it. With ZoneAlarm, for example, you'll need to add the IP number of the 770, or your whole DHCP number range, to your "trusted" zone. With MS XP's build-in Internet Connection Firewall, for another example, you can add port 445 (TCP) for cifs.

Now your share will appear as the myPC directory under Documents in the Maemo File Manager.

Note: these last two commands will need to be issued again each and every time you reboot your tablet. If you are going to use this often it might pay to read a Linux tutorial and learn how these two commands can be saved to a two-line script, to save future typing...

Note: If you are in a network, if you do smbtree you will see all sharing hosts, if you need to connect to it (and you want to use cifs) you will type smbtree -d 3 and read at the line where: "Connection to xx.xx.xx.xx" and this is the wanted ip.