Open black-ish opened 8 months ago
That seems great!
That would make the device to appear under Network in File explorer I presume?
==> I answered myself by looking at the wsdd.py
file.
What do you think if you fork the repo, add a section about "Make it Windows discoverable", and then create a pull request to merge back?
That would be so awesome as it would complete the project representation on how to use "branching" strategy. It is not the main focus, not at all, but it would be nice. I don't know if you did explore the branches, but it is a story on how to pursue even if it fails a lot of time. Also, it gives you directly the credit for that part and it gives me the opportunity to comment if needed.
Yes that is the purpose of it, making it discoverable under Network in Windows Explorer.
I have never done a pull request or something like that, if I have time I'll try that. Idc about credit though.
Alternatively, and in order to avoid Python >3.4 headaches, it’s advisable to opt for wsdd2 instead (specifically 1.8.3.2, which works flawlessly on our aging DNS323).
Here's a quick and (not so) dirty recipe - let's gather the essential tools:
apt install make gcc
Download wsdd2-1832 and compile it with a make wsdd2
- once done with no errors (note: tested with freexian repositories enabled) just move wsdd2 to /usr/bin
Fire up your editor of choice and create a wsdd2.service file in /etc/systemd/system containing the following
[Unit]
Description=wsdd2
[Service]
Type=oneshot
ExecStart=/usr/bin/wsdd2
[Install]
WantedBy=multi-user.target
Save it and after a systemctl enable wsdd2
/ systemctl start wsdd2
you're good as gold.
Note: in the event you're using a firewall, don't forget to allow 3702 and 5355.
@0b1001101 Thank you so much to participate here again!
@black-ish What do you think about this other option?
I tested wsdd2 and it works fine.
One thing I would change in the systemd service for wsdd2 would be to change type=oneshot
to type=simple
otherwise it seemed to close after the initial run and wouldn't show up in the running services list.
It's certainly easier to build however it doesn't get any updates anymore it seems.
Hey,
As we don't use SMB1 anymore as of Windows 10 we need another method of discovery for the NAS which can be supplied via the WSD method where we can use wsdd.
Though Debian Jessie can only supply python 3.4 which doesn't work as wsdd needs python 3.7. So an additional step after could be added which would allow for WSD network discovery.
For some of the steps I used from here: https://www.linuxcapable.com/how-to-install-python-3-7-on-ubuntu-linux/
Using those steps until this part:
./configure --enable-optimizations --enable-shared
I changed to./configure --enable-shared
as those optimizations take more than 2 days to finish when compiled on the NAS.After finishing up with that grabbing wsdd from
https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py
via wget or something else and then putting it into/usr/bin
. Alsochmod +x
after is needed of course.There needs to be a small change in it, as we don't have a proper symlink from
python3
topython3.7
, change the first line#!/usr/bin/env python3
>#!/usr/bin/env python3.7
.Next step grab
https://raw.githubusercontent.com/christgau/wsdd/master/etc/systemd/wsdd.service
again via wget or something else. Put it into/etc/systemd/system
.We need to edit that file though.
Edit steps:
ExecStart=/usr/bin/wsdd --shortlog --chroot=/run/wsdd $WSDD_PARAMS
>ExecStart=/usr/local/bin/python3.7 /usr/bin/wsdd.py --shortlog $WSDD_PARAMS
DynamicUser=yes
ANDAmbientCapabilities=CAP_SYS_CHROOT
, as our systemd is too old for that, afaik.And we need to grab the config/environment file from here:
https://raw.githubusercontent.com/christgau/wsdd/master/etc/systemd/wsdd.defaults
, again via wget or something else and put into/etc/default
and rename it fromwsdd.defaults
>wsdd
This file needs to be edited a bit too:
WSDD_PARAMS=""
>WSDD_PARAMS="-i eth0 -4"
, IPv6 sometimes has issues hence only IPv4.If everything is correct now we can do:
systemctl enable wsdd.service
andsystemctl start wsdd.service
.It should now be discoverable from Windows 8 onwards. Maybe even 7 but I haven't tested that.