Downloads GitHub

Network Shares (SMB)

The Network (SMB) device (smb:) opens shared folders on a Windows PC, a Samba server or a NAS over SMB2 or SMB3. Older servers that only speak SMB1 are opened as Network (SMB1) (smb1:). Shares are listed in a text file, SMB2.CNF. Not yet tested on a console.

What you need
  • A console with a network adapter (or built-in Ethernet) on the same LAN as the server.
  • A shared folder on the server, and an account that can open it.
  • An IP address for the PS2 (Settings > Network), and Legacy Ethernet drivers off.
  • An SMB2.CNF file (below). Settings > Network > SMB shares opens it in the text editor, creating an example file in SYS-CONF when there is none.

How it works

Nothing touches the network until you open the device. The first time, Launchstation starts the network with the address in IPCONFIG.DAT, loads the SMB driver and connects every share for that device in SMB2.CNF. smb:/ then lists one folder per connected share, named by its NAME: smb:/PC, smb:/NAS. smb1:/ is the top of its one share.

A share that does not connect is left out of smb:/, and the browser says why (for example PC (line 7): Could not connect: check the address, share, user name and password). Opening the device again tries the failed shares again, at most every 30 seconds, because an unanswered connect can take that long. When no share is connected, SMB2.CNF is read again first, so a corrected file is used without restarting.

When at least one share connects, the browser and the device card show how many are connected, not which one failed. If a share is missing from smb:/, check its address, share name, user name and password in SMB2.CNF, then open smb: again to retry it. A file changed on a PC while another share is connected is read again after a restart, or after opening it once through Settings > Network; either way a share that is already connected keeps its old address and credentials until the console restarts.

SMB2.CNF

Launchstation uses the first SMB2.CNF it finds:

  1. beside the running ELF (for example mc0:/APPS/SMB2.CNF for mc0:/APPS/BOOT.ELF);
  2. SYS-CONF/SMB2.CNF on the memory card Launchstation was started from;
  3. SYS-CONF/SMB2.CNF on the other memory card.

That is where IPCONFIG.DAT is looked for too. Each line is KEY = value. Each share is the group of keys that ends with its URL, so URL comes last in each group.

KeyValueLongest (bytes)
NAMEThe share’s folder name in smb:/. Required, unique (in any case), no / \ : * ? " < > |31
USERNAMEAn account on the server31
PASSWORDThat account’s password31
VERSION2 (default: SMB2/SMB3, also 3, SMB2, SMB3) or 1 (SMB1, also SMB1, NT1)
PLAINTEXTSMB1 only. 1 lets a server that asks for a clear-text password have it; 0 (default) refuses such a server. See below.
URLsmb://<server>/<share>; for SMB1 smb://<IP address>[:port]/<share>255
# A shared folder "PS2" on a Windows PC, as smb:/PC
NAME = PC
USERNAME = player
PASSWORD = secret
URL = smb://192.168.0.10/PS2

# The "games" share of a NAS, as smb:/NAS
NAME = NAS
USERNAME = ps2
PASSWORD = n4s-pa55word
URL = smb://192.168.0.20/games

# An old server that only speaks SMB1, as smb1:/
NAME = OLDBOX
VERSION = 1
URL = smb://192.168.0.30/PS2SMB

Network (SMB1) appears in the device list only when SMB2.CNF has a VERSION = 1 share. The file is read once at startup, which reads no network.

What you can do

Stack rules

Troubleshooting

  1. “No SMB2.CNF found”. Put the file beside Launchstation or in mc0:/SYS-CONF/, then open the device again.
  2. “Could not connect”. Check the server’s IP address, the share name, the user name and password, that the PS2 is in the server’s subnet, and that the server allows SMB2 (Windows: the share is reached with an account that has a password).
  3. SMB1: “Server does not speak SMB1” or “Server did not answer”. Windows 10 and later turn SMB1 off; use SMB2 (leave VERSION out) unless the server is really SMB1-only.
  4. SMB1: “User name or password refused” also appears when the server only accepts clear-text passwords. Launchstation does not send a password in the clear unless the share has PLAINTEXT = 1. Better: turn on encrypted passwords on the server (Samba: encrypt passwords = yes). With PLAINTEXT = 1, anyone on the network who can see the traffic, or pose as the server, can read the password, so use it only on a network you trust and with a password used nowhere else. A server that takes encrypted passwords still gets the encrypted form.
  5. “The SMB driver could not be loaded”. The IOP may be short of memory with many other drivers loaded; use Tools > Reboot IOP and open the share first.

The smb: device and the SMB2.CNF format come from Ronnie Sahlberg’s work for saildot4k’s upstream launcher, using the SMB2 driver from libsmb2. SMB1 uses jimmikaelkael’s smbman from ps2sdk, with Open-PS2-Loader’s fixes. See Credits.