1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

    Dismiss Notice
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

wsdd2 from Entware collides with Asuswrt-Merlin 384.12

Discussion in 'Asuswrt-Merlin' started by JACK-THINK, Jun 25, 2019.

  1. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    I installed wsdd2 from Entware on my RT-AC68U with Asuswrt-Merlin 384.12. And I noticed that wsdd2 was also imported into Asuswrt-Merlin 384.12. I disabled everything about samba and wsdd2. Here's the output of command ps. (Attachment ps_state.txt)

    Here is the output of
    Code:
    netstat -nlp
    . (Attachment netstat_state.txt)



    Then, I run
    Code:
    /opt/bin/wsdd2 -W
    and got errors below

    [​IMG]

    Here is the output of
    Code:
    netstat -nlp
    . (Attachment netstat_state_with_opt_bin_wsdd2.txt)



    Then, I run
    Code:
    killall wsdd2
    and
    Code:
    /usr/sbin/wsdd2 -d
    , no error appeared.

    Here is the output of
    Code:
    netstat -nlp
    . (Attachment netstat_state_with_usr_sbin_wsdd2.txt)



    I can hardly find any differences between the outputs. I really don't why wsdd2 from Entware isn't able to run properly on Asuswrt-Merlin 384.12, although it runs perfectly on Asuswrt-Merlin 384.11_2 and Asuswrt 384_45717.


    Comparison between
    Code:
    /opt/bin/wsdd2
    from Entware and
    Code:
    /usr/sbin/wsdd2
    from Asuswrt-Merlin 384.12 is shown below.

    [​IMG]


    How to make
    Code:
    /opt/bin/wsdd2
    from Entware run properly? Is there any solution? Thanks a lot.


    In order to make things more clearly, I make a piece of video here.
     

    Attached Files:

    Last edited: Jun 25, 2019
  2. Swistheater

    Swistheater Very Senior Member

    Joined:
    Jul 8, 2017
    Messages:
    1,248
    Location:
    Florida
    Because the Firmware now Natively supports Wsdd2 and before it didn't. I am sure the Wsdd2 feature that has now been added to the router isn't designed to run along side the one from entware. I do not believe the process is getting completely killed if this is what is happening.
     
    L&LD likes this.
  3. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    I'm sure that there is no process such as wsdd2, smbd, or nmbd before I invoke /opt/bin/wsdd2 -W and get the error, at least I can't find them in the output of ps.

    what's more, after I invoke killall wsdd2, I still get error when I invoke /opt/bin/wsdd2 -W. On contrary, if I invoke killall wsdd2 first and then invoke /usr/sbin/wsdd2 -d, no error will come up.
     
  4. Swistheater

    Swistheater Very Senior Member

    Joined:
    Jul 8, 2017
    Messages:
    1,248
    Location:
    Florida
    could be a premissions issue where it is denying access or the bind address remained bound at the other location.
     
  5. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    I don't know how to check it and how to solve it. Can you offer some plans or test methods? I think perhaps the developers of Asuswrt-Merlin made some tricks in order to preclude anything that can stop /usr/sbin/wsdd2 from starting.
     
  6. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,603
    Location:
    UK
    Sorry, I don't understand why you want to run the Entware version of wsdd2 when there's now one built into the firmware. Why not just uninstall the Entware version and be happy? What am I missing here?
     
    L&LD and dave14305 like this.
  7. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    Reason 1
    I developed a system SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER(https://github.com/JACK-THINK/SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER) which can be deployed on both Asuswrt and Asuswrt Merlin. In this system, there is a samba4 addon. Since there is no wsdd2 in Asuswrt, wsdd2 from Entware is the only option for Asuswrt. As result, if wsdd2 from Entware can't run properly in Asuswrt Merlin, I have to do extra work to make my system fully compliant with Asuswrt Merlin.

    Reason 2
    This issue is really weird. I really want to know what makes things like this.
     
  8. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,131
    Location:
    USA
    SomeWhereOverTheRainBow and L&LD like this.
  9. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,603
    Location:
    UK
  10. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,908
    Yet, you seem to think it is fair to tell the developer what to include in his code though? :)

    Of course, RMerlin will keep wsdd2 updated as he is the one that included it in his fork of Asuswrt.

    I think you need to find a way to make it work with Asuswrt-Merlin or you need to go back to stock Asus firmware where it seems your code works. ;)

    Nobody is confining you. Maybe you can compile a custom version of 384.12_0 without wsdd2 included?
     
  11. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,908
    1. So has RMerlin, for his wider user base. :)
    2. I don't see how this is unfair? Nobody is forcing you to use this firmware. You can ask questions to clarify things, but you seem to be demanding a little too much, IMO. :)
     
  12. dave14305

    dave14305 Part of the Furniture

    Joined:
    May 19, 2018
    Messages:
    2,131
    Location:
    USA
    I'm surprised we've never heard of this script/solution before today, yet it's been around for over a year.
     
    SomeWhereOverTheRainBow and L&LD like this.
  13. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    10,603
    Location:
    UK
    You are making a huge assumption here that Merlin has deliberately done something that stops the Entware version from working properly. Frankly that is insulting. It is clear from the fixes we linked to that he encountered the same problem with his implementation of wsdd2 that the Entware version has.

    You say that Merlin should explicitly state what he doesn't support. This is ridiculous. Merlin has no control over the Entware packages and has no reason to test every single one of them against every release of his firmware. If there's a compatibility issue take it up with the Entware developers.
     
  14. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    10,908
  15. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    Because I'm not a professional developer. I developed this SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER(https://github.com/JACK-THINK/SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER) just for fun. So I didn't advertise it before.
     
  16. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Very Senior Member

    Joined:
    Jun 4, 2019
    Messages:
    642
    This is good to know, awesome job elegantly pointing these out @ColinTaylor and @dave14305
     
    L&LD likes this.
  17. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    I didn't mean to insult anyone. Please don't interpret it in this way. If any words really hurt anybody, I will retract them. I just so curious about why wsdd2 from Entware can run perfectly on Asuswrt-Merlin 384.11_2 and Asuswrt 384_45717 but not on Asuswrt-Merlin 384.12. And on Asuswrt-Merlin 384.12, only wsdd2 from Asuswrt-Merlin can run. Apparently, there must be something added or modified in Asuswrt-Merlin 384.12 specifically blocking wsdd2 from Entware. My aim is only to find a way to make wsdd2 from Entware run on Asuswrt-Merlin 384.12 properly.
     
    dave14305 likes this.
  18. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Very Senior Member

    Joined:
    Jun 4, 2019
    Messages:
    642
    so how well does the asuswrt router handle the entware edition of samba 4 in your script? And does the main script run in another language or could someone who was only fluent in english/german run the script without any problem?
     
  19. SomeWhereOverTheRainBow

    SomeWhereOverTheRainBow Very Senior Member

    Joined:
    Jun 4, 2019
    Messages:
    642
    It was the changes made that @ColinTaylor and @dave14305 pointed to, these changes were made to the 384.12 while it was in alpha phase.
     
  20. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    Samba 4 runs perfectly on my system deployed on both Asuswrt and Asuswrt Merlin. For security reasons, My samba addon only supports SMB2 and above. SMB1 has been disable, which means, I just use smbd (samba server), wsdd2 (for Windows discovery) and avahi (for MacOS and iOS discovery) to run samba service.

    Anybody who understand shell script will understand my samba addon by reading the codes here (https://github.com/JACK-THINK/SCRIP...OUTER/tree/master/script_bootloader/usr/samba)

    All the codes of my system are written in shell with both Chinese and English comments. It's very easy to read and modified.

    You can execute only one line below to deploy my system on both Asuswrt and Asuswrt Merlin with a blank USB flash drive attached to your router.
    Code:
    cd /tmp && wget -O /tmp/install_online --no-check-certificate "https://raw.githubusercontent.com/JACK-THINK/SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER/master/script_bootloader/bin/install_online" && chmod 777 /tmp/install_online && /tmp/install_online