1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
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!

entware wsdd2 not working?

Discussion in 'Asuswrt-Merlin' started by zd59, Jun 20, 2019.

Tags:
  1. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    43
    Installed entware Samba4 & wsdd2 on Asus RT-AC86U.

    net view on a windows machine do not show router samba share.
    I must provide IP of a router for a share to appear:
    net view \\10.10.10.1 will show shares.
    wsdd2 service is running (ps show a service)
     
  2. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,194
    Location:
    Canada
    I don't think net view supports WSD. Explorer shows my router and reports discovering it through WSD, but net view doesn't show anything but my PC itself.
     
    L&LD likes this.
  3. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    9,461
    Location:
    UK
    This is my understanding as well. net view shows the NetBIOS devices not the WSD devices.
     
    L&LD likes this.
  4. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    43
    Raspberry PI, Slackware both are visible in Windows Explorer with shown shares.
    Asus is shown in Windows Explorer, but after click on it, the error appear. See attached picture.
    smb.conf - "browseable = yes" in global and share section.
     

    Attached Files:

  5. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,194
    Location:
    Canada
    Where did that "Asus" name came from? Is it really your router's hostname?
     
  6. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    9,461
    Location:
    UK
    The problem is when you do not specify the server IP address. e.g.:
    Code:
    net view
     
  7. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    You get the point! I'm so sorry for I didn't catch it before.
     
  8. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    43
    Yes Asus is a routers NETBIOS name:

    Code:
    [email protected]:/tmp/home/root# cat /opt/etc/samba/smb.conf
    [global]
    browseable = yes
    dns proxy = no
    workgroup = doma
    netbios name = Asus
    server string = Asus
    
    Code:
    C:\Users\zd>net view \\Asus
    System error 53 has occurred.
    
    The network path was not found.
    
    C:\Users\zd>net view \\10.200.200.1
    Shared resources at \\10.200.200.1
    
    Asus
    
    Share name  Type  Used as  Comment
    
    -------------------------------------------------------------------------------
    bck         Disk  Z:
    The command completed successfully.
    
    
    
    I have a Linux machine also with Samba, and net view reply with shown samba share.
    Interesting: ping asus (this router) - no reply, ping linux machine - reply.
    ping by IP number, both reply.
    I do not have any data in hosts file on Windows machine where I'm testing connectivity.
     
  9. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    9,461
    Location:
    UK
    My guess would be that you don't have DNS configured correctly on the client or wsdd2 is not working. What is the exact error message you get from the failing ping?
     
    Last edited: Jun 26, 2019
  10. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    43
    The first ping is to my linux box, the second one is Asus RT-AC86U by name, the last by IP.

    The machine where ping was executed is Windows 10 Ent. (VPN from work) with empty hosts file:


    I get the same results on home network (local LAN).
    This points to Asus, not else, as linux machine is visible by name.
     
  11. ColinTaylor

    ColinTaylor Part of the Furniture

    Joined:
    Mar 31, 2014
    Messages:
    9,461
    Location:
    UK
    That seems to confirm that your Windows client cannot resolve the name "Asus" by any of its methods. The post I linked to shows that Entware's wsdd2 is currently broken so I suggest that you wait for that to be updated at then try again. In the meantime you might want to investigate why the "Asus" hostname is not being resolved by your DNS server.

    EDIT: In the absence of other methods (e.g. hosts file, NetBIOS, DNS, etc.) Windows will use LLMNR to resolve names. The default install of Entware's wsdd2 only enables WSDD (which is not a name resolver AFAIK). To enable name resolution with wsdd2 you need to add the "-l" parameter to /opt/etc/init.d/S99wsdd2 or remove the "-w".
     
    Last edited: Jun 27, 2019
  12. JACK-THINK

    JACK-THINK Occasional Visitor

    Joined:
    Jun 25, 2019
    Messages:
    20
    I have tested it a lot of time and here's the conclusion.

    wsdd2 from Asuswrt-Merlin just broadcasts the value of 'nvram get computer_name' without fetching any value from /etc/smb.conf or /opt/etc/samba/smb.conf, even there is no /etc/smb.conf.

    wsdd2 from Entware will fetch "netbios name = " value from /opt/etc/samba/smb.conf.


    As I stated here (https://www.snbforums.com/threads/w...suswrt-merlin-384-12.57270/page-2#post-500869), in order to make wsdd2 from Entware or Asuswrt-Merlin run properly, You MUST run 'nvram get computer_name' and paste the value you get on the right of "netbios name = " in /etc/smb.conf or /opt/etc/samba/smb.conf. If you don't set it like this, you can still discover the share with the netbios name you set, but you can never connect to it successfully from Network Neighbour in Windows 10.


    I set "netbios name = RT-AC86U-0EF0", then I get things below

    Microsoft Windows [版本 10.0.17763.557]
    (c) 2018 Microsoft Corporation。保留所有权利。
    C:\Users\SM-SERVER>ping RT-AC86U-0EF0
    正在 Ping RT-AC86U-0EF0.local [192.168.1.1] 具有 32 字节的数据:
    来自 192.168.1.1 的回复: 字节=32 时间<1ms TTL=64
    来自 192.168.1.1 的回复: 字节=32 时间<1ms TTL=64
    来自 192.168.1.1 的回复: 字节=32 时间<1ms TTL=64
    来自 192.168.1.1 的回复: 字节=32 时间<1ms TTL=64
    192.168.1.1 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
    往返行程的估计时间(以毫秒为单位):
    最短 = 0ms,最长 = 0ms,平均 = 0ms
    C:\Users\SM-SERVER>
     
    Last edited: Jun 27, 2019
  13. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,194
    Location:
    Canada
    That is incorrect. Nvram is not used:

    Code:
    void get_smbinfo(struct endpoint *ep)
    {
    #define __FUNCTION__    "get_smbinfo"
        char buf[256];
        FILE *fp;
    
        if (!netbiosname)
            netbiosname = malloc(HOST_NAME_MAX + 1);
        if (!workgroup)
            workgroup = malloc(15);
    
        strcpy(netbiosname, "");
        strcpy(workgroup, "");
    
            if (!(fp = fopen("/etc/smb.conf","r"))) {
            ep->_errno = errno;
            ep->errstr = __FUNCTION__ ": Can't access smb.conf";
            goto exit;
            }
    
        while (fgets(buf, sizeof(buf), fp) && (!*netbiosname || !*workgroup)) {
            if (!*workgroup)
                sscanf(buf, "workgroup = %14[^\n]s", workgroup);
            if (!*netbiosname)
                sscanf(buf, "netbios name = %16[^\n]s", netbiosname);
        }
        fclose(fp);
    
    exit:
        /* Set defaults if needed */
        if (!*netbiosname)
            strncpy(netbiosname, hostname, 16);
        if (!*workgroup)
            strcpy(workgroup, "WORKGROUP");
    #undef __FUNCTION__
    }
    
     
  14. zd59

    zd59 Occasional Visitor

    Joined:
    Feb 13, 2017
    Messages:
    43
    and

    As of above, all is set correct and wsdd2 running from entware.