Router - TG582N - USB port: Difference between revisions
(Describe setting up and using the FTP content sharing server) |
m (clean up, typos fixed: the the → the) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
* plugging in a USB printer, which can allow a printer sharing server to share the printer |
* plugging in a USB printer, which can allow a printer sharing server to share the printer |
||
= [[ |
= [[Router - TG582N - 3G|3G broadband]] = |
||
= Content Sharing = |
= Content Sharing = |
||
Content sharing provides a way to share the contents of a USB storage device to machines on the LAN (or further afield). It provides some rudimentary |
|||
⚫ | |||
network attached storage. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
View the IP which content sharing has on the web interface: - Home Network - Interfaces - Local Network: |
View the IP which content sharing has on the web interface: - Home Network - Interfaces - Local Network: |
||
Line 29: | Line 32: | ||
* FTP server |
* FTP server |
||
The TG582n can use a USB storage device with |
The TG582n can use a USB storage device with partitions formatted as FAT32 or EXT2/3/4. There are some restrictions - with the following disk |
||
Device Boot Start End Sectors Size Id Type |
|||
/dev/sdb1 63 65529134 65529072 31.3G c W95 FAT32 (LBA) |
|||
/dev/sdb2 65529135 229376069 163846935 78.1G 7 HPFS/NTFS/exFAT |
|||
/dev/sdb3 229376070 397148229 167772160 80G 83 Linux |
|||
/dev/sdb4 397148230 625142447 227994218 108.7G 83 Linux |
|||
content sharing sees all partitions except the NTFS one (/dev/sdb2), but doesn't correctly read the EXT4 partition (/dev/sdb4). Whether this |
|||
is because of partition size, or start sector, or EXT4-ness, is TBD. (/dev/sdb3 is EXT3). |
|||
== CIFS server == |
== CIFS server == |
||
Line 58: | Line 68: | ||
although on Linux ''/sbin/mount.cifs'' might be more useful than ''smbclient''. |
although on Linux ''/sbin/mount.cifs'' might be more useful than ''smbclient''. |
||
Note that the share named above 'Disk_a1' is the share available if the disk/partition is not a 'Managed partition' (see below). |
|||
If the disk/partition is a 'Managed partition' the available share names change (to 'Shared' and 'Media') and the root directory of the |
|||
partition is no longer accessible from content sharing. |
|||
== UPNP AV server == |
== UPNP AV server == |
||
Line 73: | Line 87: | ||
- select View - Playlist - Local Network - Universal Plug'n'Play - Technicolor TG582n (unless one has changed the default name). |
- select View - Playlist - Local Network - Universal Plug'n'Play - Technicolor TG582n (unless one has changed the default name). |
||
Now it just needs some media files added in |
Now it just needs some media files added in the 'Media/Pictures', 'Media/Music' or 'Media/Movies' directories. |
||
== FTP server == |
== FTP server == |
||
Line 79: | Line 93: | ||
Enable with: |
Enable with: |
||
:contentsharing ftp config state=enabled |
:contentsharing ftp config state=enabled |
||
The FTP server is only of use if the disk/partition is a managed partition (see above). If the disk/partition is |
|||
not a managed partition, then there's no home directory available for the FTP server and login fails. |
|||
FTP to the content sharing IP address, and login with router username/password (the Administrator credentials work OK). |
FTP to the content sharing IP address, and login with router username/password (the Administrator credentials work OK). |
||
The root directory of the FTP server is the share named 'Shared' - whereas the shared media files for the UPNP AV server |
The root directory of the FTP server is the share named 'Shared' - whereas the shared media files for the UPNP AV server |
||
are under a share named 'Media'. |
are under a share named 'Media'. |
||
== File system structure == |
|||
On a USB storage device which has (at some point) been a managed partition, the file system comprises directories |
|||
named |
|||
* Settings |
|||
* Shared |
|||
* Media |
|||
* Media/Pictures |
|||
* Media/Music |
|||
* Media/Movies |
|||
There's a file 'Settings/manageddisk_marker' which contains a date/time string. The presence/absence/contents of this file doesn't accurately reflect the 'managed disk' status of the disk - the status has to be changed via the web UI. |
|||
= Printer Sharing = |
= Printer Sharing = |
||
Line 93: | Line 123: | ||
:printersharing LPD queue menu |
:printersharing LPD queue menu |
||
=Other pages regarding this router= |
|||
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1 showfirst=1>Category:Router TG582N</ncl> |
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1 showfirst=1>Category:Router TG582N</ncl> |
||
[[Category:Router TG582N]] |
[[Category:Router TG582N|USB]] |
||
[[Category:Router]] |
Latest revision as of 00:04, 15 March 2017
The TG582n router has a USB port towards the back of the left-hand side. There are 3 different uses for this:
- plugging in a 3G mobile broadband dongle, which can add 3G connectivity
- plugging in a USB storage device, which can allow content sharing server(s) to share its contents
- plugging in a USB printer, which can allow a printer sharing server to share the printer
3G broadband
Content Sharing
Content sharing provides a way to share the contents of a USB storage device to machines on the LAN (or further afield). It provides some rudimentary network attached storage.
The content sharing server uses a separate 'virtual' interface, which grabs its IP via DHCP. It will use the first DHCP address it can, this can be fairly catastrophic with a /30 (see image below) - it's possible to add an extra DHCP pool which just serves 10.0.0.137 (for example) for the content server.
View the IP which content sharing has on the web interface: - Home Network - Interfaces - Local Network:
To view the list of interfaces:
:eth bridge list
To remove this interface, and therefore to stop it grabbing an IP:
:eth bridge ifdetach intf virt brname bridge :eth bridge ifdelete intf virt brname bridge :saveall
If one wishes to use content sharing, the available servers are:
- CIFS server (aka SMB, Samba)
- UPNP AV server
- FTP server
The TG582n can use a USB storage device with partitions formatted as FAT32 or EXT2/3/4. There are some restrictions - with the following disk
Device Boot Start End Sectors Size Id Type /dev/sdb1 63 65529134 65529072 31.3G c W95 FAT32 (LBA) /dev/sdb2 65529135 229376069 163846935 78.1G 7 HPFS/NTFS/exFAT /dev/sdb3 229376070 397148229 167772160 80G 83 Linux /dev/sdb4 397148230 625142447 227994218 108.7G 83 Linux
content sharing sees all partitions except the NTFS one (/dev/sdb2), but doesn't correctly read the EXT4 partition (/dev/sdb4). Whether this is because of partition size, or start sector, or EXT4-ness, is TBD. (/dev/sdb3 is EXT3).
CIFS server
The current config can be seen with
:contentsharing cifs list
If one enables the CIFS server with
:contentsharing cifs config state=enabled
then it's possible to connect to the CIFS server on the previously found IP address in any of the usual CIFS ways. Note that the CIFS server uses old LANMAN authentication - so Samba users may need to add something like:
# Be able to connect to old servers (e.g. TG582n content sharing) client lanman auth = yes client ntlmv2 auth = no
to smb.conf. It's then possible to authenticate with a router username/password - at least, the Administrator account credentials work OK.
For example, with the content sharing server on 192.168.1.32:
$ smbclient -U Administrator //192.168.1.32/Disk_a1 Enter Administrator's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.12] smb: \> dir . D 0 Tue Jan 20 16:12:42 2015 .. D 0 Tue Jan 20 15:05:02 2015 HDR_FOX_T2_upgrade.hdf A 24108401 Wed Jul 2 17:41:50 2014 why_I_love_aaisp.pdf A 359760 Tue Jan 20 16:12:05 2015 61543 blocks of size 32768. 60796 blocks available smb: \>
although on Linux /sbin/mount.cifs might be more useful than smbclient.
Note that the share named above 'Disk_a1' is the share available if the disk/partition is not a 'Managed partition' (see below). If the disk/partition is a 'Managed partition' the available share names change (to 'Shared' and 'Media') and the root directory of the partition is no longer accessible from content sharing.
UPNP AV server
UPNP AV is a media server to facilitate playing media files across a network (usually a LAN). It can be enabled by:
:contentsharing upnpav config state=enabled
Then the content on the USB storage device can be shared. The USB storage device has to be setup to have the required directory structure - it appears this has to be done on the web interface - select Toolbox - Content Sharing - Configure and make the disk/partition a 'Managed partition'. Note that performing this step changes the share names served from the USB storage device (to 'Shared' and 'Media').
One can then browse the media server with a suitable client. For example, on Linux one can use vlc - select View - Playlist - Local Network - Universal Plug'n'Play - Technicolor TG582n (unless one has changed the default name).
Now it just needs some media files added in the 'Media/Pictures', 'Media/Music' or 'Media/Movies' directories.
FTP server
Enable with:
:contentsharing ftp config state=enabled
The FTP server is only of use if the disk/partition is a managed partition (see above). If the disk/partition is not a managed partition, then there's no home directory available for the FTP server and login fails.
FTP to the content sharing IP address, and login with router username/password (the Administrator credentials work OK). The root directory of the FTP server is the share named 'Shared' - whereas the shared media files for the UPNP AV server are under a share named 'Media'.
File system structure
On a USB storage device which has (at some point) been a managed partition, the file system comprises directories named
- Settings
- Shared
- Media
- Media/Pictures
- Media/Music
- Media/Movies
There's a file 'Settings/manageddisk_marker' which contains a date/time string. The presence/absence/contents of this file doesn't accurately reflect the 'managed disk' status of the disk - the status has to be changed via the web UI.
Printer Sharing
Your author doesn't have a printer with a USB connection, so can't offer much guidance. The command to enable printer sharing would be:
:printersharing LPD config state=enabled
And you'd need to add a queue, a good place to start is:
:printersharing LPD queue menu
Other pages regarding this router
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1 showfirst=1>Category:Router TG582N</ncl>