With latest versions of Kodi, SMB protocol is not as easy to set up as once was. I spent a day trying to figure out how to make sharing over SMB work with Kodi. I have seen advises saying that the SMB version should be changed to SMB v1 in settings but that was not necessary in my case - default settings works. There are many reasons that could prevent file sharing over SMB and I'm no expert, but I will show the steps I took in order to make things work.
Following steps are also useful for when a wireless printer is not accessible by a wired computer.
Contents
- Router AP Isolation
- Sharing files in Windows 10
- Viewing shared folders in Network Explorer
- Using the Private Network profile
- Third-party app SMB confirmation
- Assigning a Static IP
- Accessing shared folders over SMB in Kodi
- Configuring TV remote to work with Kodi on Android TV
Router AP Isolation
If you have a NAS or simply use a Windows PC to share files using SMB, you first need to make sure that the wired devices can communicate with wireless ones. AP isolation is a feature that prevents your wireless devices from connecting to other networks. It can protect your network from other wireless networks and also protect it from infected devices. This can be disabled in the router settings. In my case I have an ONT router type so I had to contact the ISP and ask them to disable this separation.
Weird router behavior
With my ONT Fiberhome router provided by my ISP Digi there is one more thing to keep in mind. After the router is rebooted, the AP isolation is re-activated. What I have to do then is, turn off the router, unplug the fiber optic cable, turn on the router, wait for the red led to blink and then with the router on, plug the cable back on. Perhaps this setting is removed from memory and when the above steps are made, the setting is reloaded from ISP server.
Check if AP Isolation is off
I use two methods to verify if devices can see each other. First, make sure
that the wireless device used is using the local wireless AP to access the
internet and not the mobile data.
#1 - Wireless printer: if you have a wireless printer that works on wireless devices, turn it on and get its IP from router LAN - DHCP clients list. With my Brother printer I can connect to it using the IP address in a browser. If the wireless printer web page can be accessed from a wireless device, the printer works. If cannot be accessed from wired device such as a PC, the AP isolation is on.
#2 - Using Snapdrop: if you don't have a wireless printer you can use Snapdrop. Open the link in browser on a wireless device and on a wired one. Say on a phone and a PC. If you can send a text message between them then AP Isolation is off.
Sharing files in Windows 10
To share a folder in Windows, simply right click on it and open the Properties window. In the Sharing tab click Share... In the share section you can add another account or just write Everyone then click Add.
To remove a shared folder use Advanced Sharing and
uncheck Share this folder.
Next click on Network and Sharing Center and for Private network Turn on network discovery and check Turn on automatic setup of network connected devices.
Finally in All Networks there are the following settings:
- Public folder sharing (optional)
- Media streaming: I have not used this
- Password protected sharing: if on you must provide the account password when using SMB sharing. I turned of the password here.
Viewing shared folders in Network Explorer
Before checking the shared folders in Kodi, we need to make sure they appear in Windows Explorer under Network.
There should be something like this. If not click refresh and wait around 20 seconds to see if the computer name appears. If not press windows key, type Services and open it from the results. There look for Function Discovery Provider Host and Function Discovery Resource Publication. Make sure both are running and set to Automatic.
If they are running select Function Discovery Resource Publication and in the left-hand side click on Restart. Now the computer name should appear in the Network Explorer. If not you can try other troubleshooting methods mentioned here: https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/cannot-access-shared-folder-file-explorer.
Using the Private Network profile
This next step is to ensure that you are using a Private network profile by right clicking on the Network icon in the right-hand corner and selecting Open Network and Internet Settings.
There should say Ethernet - Private network.
Otherwise switch to a private profile using the Ethernet menu, then click on Network and in the Network page select Private profile.
Third-party app SMB confirmation
An easy way to check if SMB sharing works is by using an app on Android phone called File Manager by Lufick. There, in the top left corner open the menu and under the Network section open Lan (SMB 2.0). In the bottom right corner tap on the 3 dots then on Start Scan. If everything is set up properly, the computer name and local IP should appear.
Assigning a Static IP
For the final step to work, the PC must have a static IP address on the LAN. For example, my router address is 192.168.1.1 in the Local Area Network so for my PC I have allocated the address 192.168.1.100 because it's easier to remember. This step is router dependent so I cannot show a step-by-step guide. The idea is that you need to find your MAC address of your PC and on the router you associate this MAC address with the desired static IP.
The computer MAC address can be found in Windows Settings - Network & Internet - Ethernet - Network - Properties - Physical address (MAC).
On the router look for DHCP Static Leases or if your router is different
search online on where is this feature located.
Accessing shared folders over SMB in Kodi
Using Kodi is out of the scope of this tutorial, so I will not go in to too many details about the interface. That being said, let's add the shared folder in Kodi by browsing for the video source.
In my case, using Windows network (SMB) didn't show up the shared computer name so i had to use Add network location option. Windows network (SMB) option only worked when Kodi was installed on the same computer.
In the Add network location window put your IP address of the server/PC, the username that has access to the shared folders (in my case is Everyone) and the password associated with the user name account. If the account has no password or the password sharing is off, you still need to write something in the password field. I put 1234. It can be anything. After clicking OK, the source should now be ready to use.
After selecting it, you can give it a name.
To add source to library, open the source and right click on the shared folder to bring up the context menu where you can use Scan to library.
Configuring TV remote to work with Kodi on Android TV
Initially on my TV, the remote controller didn't work with Kodi which was asking to configure it but I couldn't since it didn't work thus, to configure the remote I used an USB mouse.
To attach a controller in Kodi, go to Settings - System - Input - Configure attached controllers.
As a controller profile I have used Kodi for the TV remote. There is a profile named TV Remote using the Get more... button but it didn't have all the functions I needed. Here is how I mapped the Kodi profile to buttons on the TV remote:
- A - center button (the one surrounded by arrows on remote)
- B - back button
- X - menu (used to access contextual menu on Kodi)
- Up, Down, Left, Right - to same buttons on the remote
That's it. Share if you found this helpful.