Beta [wsdd2] Windows Discovery

xyz321

Well-Known Member
When this new package is installed it should help Windows 10 discover the Humax on the network if using samba3 and with SMB1 disabled (it may also help in other situations).

Note: Ideally zeroconf should be used instead but I haven't had much success with that.

This package is not currently in the repositories.
Code:
sha1sum wsdd2_1.8-1_mipsel.opk 
05a847383ccbfa57383f027d50f16c7839f1d784  wsdd2_1.8-1_mipsel.opk

To install, copy onto the box to e.g. /tmp then from a telnet command line...
Code:
opkg install /tmp/wsdd2_1.8-1_mipsel.opk

Edit: Added installation instructions
 

Attachments

  • wsdd2_1.8-1_mipsel.opk
    21.5 KB · Views: 22
Last edited:
Rebooted Humax and PC and noticed that Humax wasn't showing in Windows explorer.
Checked services on Humax and WSDD2 wasn't running and so I started it manually.
No logging from wsdd2 so unable to tell whether it failed to start at boot time or failed later.
 
Whilst playing with this thing interactively, it segfaulted. I thought I'd just take a quick look running it under strace in case it did it again (not yet), but it reveals the true horror of how people write crap code that doesn't cope with errors properly (or possibly at all).
Here are just three examples:
Code:
write(-1, "<14>Jan  4 19:01:50 wsdd2[12394]"..., 44) = -1 EBADF (Bad file descriptor)
munmap(0x40a018, 64)                    = -1 EINVAL (Invalid argument)
ioctl(2147483647, TIOCNXCL, 0x7f93ad08) = -1 EBADF (Bad file descriptor)
None of these should ever have been attempted since they are obviously actions based on assuming success of a previous operation and should have been filtered out.
I've never heard of this one, and neither it seems has big G:
Code:
open("/proc/sys/dev/boot/info", O_RDONLY) = -1 ENOENT (No such file or directory)
Just for the record, I'm not directing this at xyz321, but at the people who originally wrote this rubbish.
 
The write error is generated because it is trying to use the syslog functions (openlog and syslog). I have tried LOG_CONS and LOG_PERROR options to openlog but the error still appears. Probably best to remove these function calls and just write to stderr.

That munmap error is my cock up. I cobbled the source together from various sources at different times and ended up with munmap when it should use free. This would cause a memory leak but is unlikely to cause a segfault on startup.

Not sure where the TIOCNXCL ioctl is coming from - must be some library function.

From the man page for wsdd2:
Code:
FILES
       :
       :
       /proc/sys/dev/boot/info
           A list of key:value entries for WSDD query over HTTP response values.
I don't think this error is important, the key value pairs can be set on the command line and are just sent out in the data messages.
 
Would it not be a good idea to start from 1.8.6 now and then modify as required?
I don't think this error is important, the key value pairs can be set on the command line and are just sent out in the data messages.
I was just curious how it was supposed to be set/used. That dev part of the path is vaguely mentioned on kernel.org's docs. for /proc/sys but with no detail.
 
Back
Top