Configuring & Adding SMB/Samba Network shares
#16
In Windows open Powershell making to Run as Administrator then use the command:

Get-SmbConnection

Image

This will show all SMB shares the PC can see. Then Dialect coloum will tell the SMB version being used, for example all mine show 3.1.1

If Dialect is anything other than 3.1.1 then your Qnap is not correctly setup.

On Qnap Control Panel -> Win/MAC/NFS go to Microsoft Networking aand select Advanced Options

Make sure Enable WS-Discovery is selected.
Set Highest SMB Version to SMB 3
Lowest SMB version to SMB 2

Image

Image
Reply
#17
(2022-11-01, 17:03)hmaurer Wrote: I can mount the QNAP smb shares

Btw what do you mean by mount exactly? Make sure to use to use Windows network (SMB) option in Browse for new share

Image
Reply
#18
First, thank you very much!

I can add the share this way, but it will not stay connected if I either shut down or wait without using for 5-10 minutes. I notice in may of the instructions that Kodi version 19 will not hold on to SMB network shares. Is this true, and if so, what are my options?
Reply
#19
Not true as I have zero problems with SMB shares.

The reason I asked what you meant by mounted shares, is that problems can be experinced if you done Map Network Drive in the Windows File Explorer. For example G is mapped to //nas/some_nas_share and you add G as local drive in Kodi, DO NOT DO THIS. However if you are adding the shares using the Kodi SMB option as you seem to be doing then there should be no issue with staying connected.
Reply
#20
This has resolved. Thank you for the tech information in the settings. The major issue was finally that Nord VPN was interfering somehow with the static address I had for the NAS, so I change the static address set up the defaults and everything is working perfectly now.
Reply
#21
Is there any advantage of doing all this over simply mapping a network drive? That's what I did, and have no issues. But now I'm wondering if there is something I'm missing with Kodi by mapping drives.
Reply
#22
Anybody have a list of tips and tweaks to maximize the performance of SMB shares in Windows 10? I want to make sure settings are optimized to its max potential, especially for WiFi devices running Kodi.
My Theater: JVC X790R + Peerless PRG-UNV | 120" CineWhite UHD-B Screen | KODI Nexus + PreShow Experience | mpv | madVR 204 RTX 2070S | Panasonic UB420 | Denon X3600H @ 5.2.4 | 4 x ADX Maximus w/ Dayton Audio SA230 | 3 x Totem Tribe LCR + Mission M30 Surrounds + SVS PC2000 + Monolith 15 | 40" HDTV w/ Z83 + MoviePosterApp | 40TB Win10 SMB Server over Gigabit Ethernet
Reply
#23
There are always unwritten "rules" for using SMB that I have found out the hard way over the years.

First, set a static IP for your server. Second, ALWAYS reference the source by it's IP address, ie. smb://192.168.1.23/Movies NOT smb://My Server/Movies. Third, if you have a Windows server, ALWAYS point your client machine's first DNS entry to that Windows server and the second should point to your router. Fourth, turn off any and all power saving settings on the server, ESPECIALLY letting the network card go to sleep. Fifth, if you're using MacOS, look into SMB version conflicts, as there were some versions that didn't properly support SMB (even though Apple would never admit it). Updating to the latest release of your OS or installing SAMBA4 will help with that.

Here's the "why those specific rules": MicroCrap uses an "elected browse master" to sort out it's computer network names. This means that the computer that has been on first, is usually the "master" for name resolutions (converting computer names into their IP address on the network). However, if you reboot that computer or it's off-line long enough, that computer will no longer be the master, because another one has been "promoted" and becomes the new "browse master" on your network. IF this worked all the time, it would be fine. However, MS has NEVER gotten it to work 100% of the time, and they been playing at it since Windows 95/NT 3.1. I've seen several networks where several masters existed, all pointing to different IP addresses!

By setting a static IP on your server, you KNOW where it's always going to be sitting on your network. If you tell Kodi to use the IP address instead of the computer's  NETBIOS/DNS name, you're bypassing all the name lookup stuff and going directly to the source. This is ESPECIALLY true if you're using a Windows server and a MacOS client, as Kodi has NEVER been able to browser SMB/Windows networks from a Mac. Personally, I add my server into Files->SMB and manually type in the IP address so it shows up as a source. Then, I add Videos by selecting the server from the sources list, then the folder I want (my Movies and TV Shows are in two separate folders).

In my setup, I have a Windows 2019 servers, acting as both a DNS and file server for my network. I had a DICKENS of a time getting Kodi to see my media server 100% of the time, spending a few months chasing phantoms when it would suddenly stop working. One desperate day, I did the "hail mary" of computers: set everything up as differently as you can, instead of just running through the "normal" setup. I had my router as my client's first DNS entry and my server as the second. I flipped the two around and VOILA! Now my computers all see each other without any problems. I have no good explanation as to why, other than MS must not be checking the second DNS for it's own networking protocols (which sounds like them).

Hope this helps!
Reply
#24
Personally I like to keep to hostname, if there's issues with name translation then simply add an entry to the hosts file.
Reply
#25
Sorry, yet another "can't connect to my computer via SMB" post. First and foremost, I did read this thread as well as numerous others here, as well as Redditt and the other usual places with no luck, so hopefully someone can help.

Here is my setup
PC: Windows 11 Home
Media Player: Shield TV 
Kodi Version: Nexus 20.5
Kodi SMB Settings: Tried Min 0/Max 3 and Min 2/Max 3 then even tried Mix 1/Max 1 with Use Legacy Security checked. No luck

I just set up my new Windows 11 PC after my old Windows 7 PC died. I set up all the sharing on the new PC and Kodi was able to connect to it and it was working fine for 2 days. Then I was watching a TV show episode file that I was streaming from a share on my PC. When the episode was over, I stopped it and tried to watch an episode of a different show. I got a warning that the episode did not exist and did I want to remove it. I said no, went to Settings --> Library --> Videos and started checking all my shared sources. All said Operation not permitted followed by Couldn't connect to network server. I don't know how that could possibly have happened in the 10 seconds it took me to switch from one show to another. 

Here are the share settings in Advanced sharing settings on my PC.
Image

Here is a snippet of my debug log when I try to add a new source via Settings --> File Manager (I replaced the IP with Xs but the correct IP for my PC is being populated)

2024-03-19 19:57:28.165 T:16264   error <general>: GetDirectory - Error getting xxx.xxx.x.xxx
2024-03-19 19:57:28.166 T:16264    info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2024-03-19 19:57:46.627 T:16264    info <general>: Loading skin file: FileBrowser.xml, load type: KEEP_IN_MEMORY
2024-03-19 19:57:51.173 T:16264   error <general>: SMBDirectory->GetDirectory: Unable to open directory : 'smb://[email protected]/'
                                                   unix_err:'1' error : 'Operation not permitted'
2024-03-19 19:57:51.173 T:16264    info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2024-03-19 19:57:52.439 T:16264   error <general>: GetDirectory - Error getting smb://JUNITO-PC/
2024-03-19 19:57:52.440 T:16264   error <general>: CGUIDialogFileBrowser::GetDirectory(smb://JUNITO-PC/) failed
2024-03-19 19:58:04.801 T:16264    info <general>: Loading skin file: SettingsCategory.xml, load type: KEEP_IN_MEMORY

Also, just to add, my PC is definitely discoverable on my network because I have X-plorer installed on my Shield as well, and it can find my PC, all the shared folders and files, and can play them.

Thanks in advance for any help. I am desperate here.
Reply
#26
Actually this can be disregarded. Per this post: https://forum.kodi.tv/showthread.php?tid...pid3152507

I enabled SMB 1 on my PC then on Kodi set SMB Min and Max both to 1 and checked off use legacy security. Rebooted everything after that and all my shares and libraries were visible on Kodi again. Apparently SMB 1 is less secure that SMB 2 or 3 and I still find it very weird that X-plorer can connect to all the PC folders using SMB 2 from the same NVidia Shield, but at this point I'm just happy to have all my libraries back on my painstakingly set up Kodi GUI. Watching stuff on VLC via a plain old file explorer is not nearly as satisfying.
Reply

Logout Mark Read Team Forum Stats Members Help
Configuring & Adding SMB/Samba Network shares0