smbLaunchELF

PS2 smbLaunchELF fork by Ronnie Sahlberg -

jolek

Senior Member
smbLaunchELF is a fork of wLaunchELF made by @sahlberg:
https://github.com/sahlberg/wLaunchELF/tree/smb2.

It has support for SMB2/3.
It can connect to Windows/Samba/Azure file shares and supports up to version 3.1.1 of SMB.
The main purpose for this version is just to copy files to/from SMB2/3 file servers to avoid having to use clunky FTP.
Code:
# You can specify SMB2 servers and shares in either of the files:
# mc0:/SYS-CONF/SMB2.CNF or mass:/SYS-CONF/SMB2.CNF
#
# The format of this file is:
NAME = Home-NAS
USERNAME = user
PASSWORD = password
URL = smb://192.168.0.1/Share
#
# For each such entry an new subdirectory will appear under the smb2:
# device at the root in the file manager.
# It can copy files to/from smb2 shares and the ps2.

Currently this test version does not launch ELF binaries...
https://github.com/ps2homebrew/wLaunchELF/issues/44#issuecomment-687723843.

If you have any additional issues or ideas please post them here.

Additionally try to add permissions in security tab:
security-tab-in-windows-7.png


For Windows 7 please use version "SMB2FM_v2" or newer.

The latest version called NETFS supports SMB2/3 and NFS3/4.0:
https://www.psx-place.com/threads/smblaunchelf.32434/page-2#post-309771.

Changelog:
Code:
SMB2FM v1:
 - initial release
 - supports SMB2/3

SMB2FM v2:
 - compatible with Windows 7

SMB2FM v3:
 - can launch an ELF file from a local storage (mc0, mass, hdd0...) without crashing\hanging.
 - cannot launch an ELF file directly from the smb2 share, because it needs to shut down the network before it can launch the ELF.
 - as a workaround you have to copy the ELF from smb2 to a local storage, e.g. mc0: or mass, and then launch the ELF from there. 

NETFS v1:
 - supports NFS3/4.0
 

Attachments

Last edited:
Thanks for compiling this :)
Has anyone here had any success with getting an SMB connection from this fork?

From the file browser there is no smb2: entry. I am not sure if this only displays if the connection is successful or whether this should show before a connection is attempted by hitting ok.

I set SMB to log debug on my samba server and I am not getting any connection attempts in the logs. I know that SMBV1 works from OPL connections and I know SMBv311 works from my win10 laptop.

I am a little perplexed as to what the problem is. I suspect it's either configuration issue or may an issue with smbLaunchELF. But if other people here are having success then it's unlikely the later.
 
@sahlberg compiled and made this version not me.
Anyway, you have to create "SMB2.CNF" manually and edit it.
Instruction are in the 1st post or in here (at source):
https://github.com/sahlberg/wLaunchELF/blob/smb2/README.md.

Oh right i could only find the source and compile instructions on github so assume someone else might have compiled it.
Anyway I configured my SMB2.CNF as per the example in @sahlberg's docs on github
https://github.com/sahlberg/wLaunchELF/blob/master/docs/SMB2.CNF
I spent hours yesterday reading instructions and testing to no avail.
I might post an issue to github and report any findings back here. Thanks for your help @jolek
 
Did you at least get this type of an error:
ssmb.png


Did you copy "SMB2.CNF" into "mc0:/SYS-CONF/"?
 
keep in mind that libsmb2 requires a SMB host running v2 or v3, so for example you can't connect to a Windows XP host (smb v1)

also, libsmb2 doesn't play well with "guest" or "anonymous" accounts with no password... they're actually deprecated and I never could make it work.
But it does work great when you connect using a regular user+pass account. When I was doing the PS3 port, I created a "ps3/ps3" account on a Win7, and shared some folders without issues.
 
It finally worked, thanks to @sahlberg and his help.

I additionally needed to add permissions in "Security" tab (a replacement photo):
security-tab-in-windows-7.png


It even works with guest account:
Access-1a.png


Here is my share:
Victoria-2.png


So I do not need an additional account or to create a password.
 
Last edited:
i can connect to the folder but cant list any item. its the same share i use with OPL. here is a error i see with wireshark.

upload_2021-2-15_19-49-11.png


host: Microsoft Windows [version 10.0.19042.804]
 
Which version did you try? If "SMB2FM" try "SMB2FM_v2".
Did you use regular or a guest account?
Did you enable all options in "Security" tab:
security-tab-in-windows-7.png
 
A new version can be downloaded from the attachment.

Now you can launch an ELF file from a local storage (mc0, mass, hdd0...) without crashing\hanging.

You cannot launch an ELF file directly from the smb2 share,
because it needs to shut down the network before it can launch the ELF.

As a workaround you have to copy the ELF from smb2 to a local storage,
e.g. mc0: or mass, and then launch the ELF from there.
 

Attachments

Soo, I'm just catching up here since my original posts. I must not of had notifications turned on since i joined!

So GOOD news @jolek I managed to solve my problem after seeing your photo of SMB verbose output as I realised mine was different (below.)

QGfSMJp.jpg


I have a 128mb MC in mc0 for all my game saves. Now my FMCB 8mb MC lives in mc1 slot. All my utilities BOOT/OPL/ULE/SYS-CONF all live on mc1. My SMB2.CNF in mc1:SYS-CONF was not being picked up. It was looking for the file in mc0:SYS-CONF

The workaround solution was to obviously place SMB2.CONF in mc0 until I can figure out a way to get ULE to read it from mc1.

But the good news is it works!

I was originally hoping that I could mount VMC's over SMB to transfer game saves between SMB-VMC and physical MC. Anyone else been able to get this work? I'm guessing it needs some kind of local storage to copy the data too in order to mount. Unless it can potentially 'stream' mount it without out copying.
 
The workaround solution was to obviously place SMB2.CONF in mc0 until I can figure out a way to get ULE to read it from mc1.

You gave me an idea.
I will ask @sahlberg is there is a chance to load SMB2.CNF also from mc1:/,
or even to add mc?:/

I was originally hoping that I could mount VMC's over SMB to transfer game saves between SMB-VMC and physical MC. Anyone else been able to get this work? I'm guessing it needs some kind of local storage to copy the data too in order to mount. Unless it can potentially 'stream' mount it without out copying.

I will also ask about it.

Best regards.

@mrlb can you test this build.
It should has support for "SMB2.CNF" for both ports.
 

Attachments

Last edited:
You gave me an idea.
I will ask @sahlberg is there is a chance to load SMB2.CNF also from mc1:/,
or even to add mc?:/

Yes OR I think perhaps smbLaunchELF needs to be self-aware where it was launched from.. If launched from mc1 then load SYS-CONF from mc1 and if from mc0 then SYS-CONF from mc0. Obviously this would be better then hard coding it in the app.

I will also ask about it.

Thank you! If we could mount VMC over SMB it would be very seemless to move files between VMC and MC physical cards.
Otherwise the process would be,
- Insert USB / Or had HDD
- Copy VMC from SMB to USB/HDD
- Mount VMC from USB/HDD
- Copy files between Physical MC and VMC
- Delete original VMC on SMB
- Copy the modified VMC from USB/HDD back to SMB

@mrlb can you test this build.
It should has support for "SMB2.CNF" for both ports.

I love how fast you move!
So i forgot to remove the SMB2.CNF from SYS-CONF and when i tested 'v4_test' it hung as it said "Mounted share..." - it never followed through with "init_smb2"

UeG314z.jpg


But when i deleted SMB2.CNF from mc0 SYS-CONF it all worked well and loaded SMB2.CNF from mc1
 
Yes OR I think perhaps smbLaunchELF needs to be self-aware where it was launched from.. If launched from mc1 then load SYS-CONF from mc1 and if from mc0 then SYS-CONF from mc0. Obviously this would be better then hard coding it in the app.

Almost the same system works for OPL, however 1st memory card always has the higher priority.
1. Check memory cards.
2. If config could be loaded, try the device that OPL was booted from (supported devices only).
3. If config could not be loaded, try all supported devices.
4. Default to memory card, if no config file could be loaded.

Although OPL also supports a config from USB and HDD...

Thank you! If we could mount VMC over SMB it would be very seemless to move files between VMC and MC physical cards.
Otherwise the process would be,
- Insert USB / Or had HDD
- Copy VMC from SMB to USB/HDD
- Mount VMC from USB/HDD
- Copy files between Physical MC and VMC
- Delete original VMC on SMB
- Copy the modified VMC from USB/HDD back to SMB

OK.

So i forgot to remove the SMB2.CNF from SYS-CONF and when i tested 'v4_test' it hung as it said "Mounted share..." - it never followed through with "init_smb2"

UeG314z.jpg


But when i deleted SMB2.CNF from mc0 SYS-CONF it all worked well and loaded SMB2.CNF from mc1

I have the same issue, yesterday I sent it to @sahlberg.
Thanks for your tests and ideas.

@mrlb can you test this build.

It should look for SMB2.CNF in this particular order:
mc0:/ -> mc1:/ -> mass:/

Currently supported paths:
mc0:/SYS-CONF/SMB2.CNF
mc1:/SYS-CONF/SMB2.CNF
mass:/SYS-CONF/SMB2.CNF

If you can copy SMB2.CNF to all supported devices that will be also cool.

EDIT: From my tests SMB2.CNF does not work from mass:/SYS-CONF/SMB2.CNF.
 

Attachments

Last edited:
Does smbLaunchELF have the "Debug-Info"-Screen/Function?

I ask because of THIS remark!
Yes OR I think perhaps smbLaunchELF needs to be self-aware where it was launched from..
The original project (wLE) IS self aware!

It's rather the code which looks for the config not being adapted, to search on the "start-device" first!
 
Yes it is the main repo.
I can ask for the source code for a new release after a fix for searching

EDIT: Added into resources.
 
Last edited:
Is there source code for this fork i.e for v4b? I'm asking because last change in https://github.com/sahlberg/wLaunchELF is dated for 24 days ago.

Sorry for late reply. I had just forgot to push to the repo. It should be pushed now.
One of the issues is that I never managed to build and get libsmb2 to work ans an IRX and run on the IOP for wlaunchelf.
So, my port of wlaunchelf is a very crude hack and slash where I ripped out everything network related from wlaunchelf and then added libsmb2 running on EE as well as LWIP running on EE.
That is why features were removed. I just couldn't get it to work on IOP.


That said, I DO have a version of libsmb2 now that can be built as an IRX and does run on IOP.
I can get that IRX to work and browse files from for example OPL. I.e. A hacked up version of OPL that uses smb2man.irx instead of smbman.irx can browse the list of games off a server and even show the box art.

So in some sense the smb2man.irx works, but I never managed to get it working or even activate the network when I tried to use it with wlaunchelf. Debugging irx and iop is very difficult for me so eventually I just had to give up.
I am sure there is only some weird initialization somewhere that is missing and it might just magically work but I ran out of ideas.

IF we got it to work with smb2 as an irx, we would not have to give up any of the other features in wle and we might even be in a stage where we could merge the smb2 support into upstream and remove my fork.
 
Thanks! So the last commit was from 2 months ago, right?

Would You like to name "smbLaunchELF v4b.elf" or "smbLaunchELF v4 test2.elf"? I have binary with "4b" but don't remember now where this comes from. Attached by Jolek is "v4 test2", both are identical (the same checksum) so I'm not sure.
 

Similar threads

Back
Top