Kodi Community Forum

Full Version: Frodo SMB client on OS X 10.6.8 not working ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

Now that I have two XBMC machines (a Mac Mini running 10.6.8 and now a Raspberry Pi running Raspbmc) I'm trying to get file sharing working reliably between them so that they can both play each others movie libraries over the network.

In the direction from Mac Mini to Pi it works perfectly - the Movies folder of the Mac is shared over SMB using built in windows file sharing in Snow Leopard, the Pi connects to the share on the Mac Mini using the SMB browser built into XBMC - eg smb://MAC-MINI/Movies etc. It connects 100% reliably, movies stream without problems and most importantly, if the Mac Mini is turned off it doesn't interfere with the normal use of the Pi in any way other than not being able to access those files hosted on the Mini - no annoying popup errors etc, and next time the Mac Mini is turned on those files are accessible again without doing anything special. No complaints. Smile

In the other direction things are not so rosy. Sad

The Raspberry Pi is running an SMB server sharing its local Movie folder, I can connect to this share absolutely perfectly from a Windows 7 laptop, and also browse to it through the network browser in windows as well as connecting directly by name - eg name resolution is working properly.

Not so on the Mac Mini. If I try to use the built in SMB browser in XBMC on the Mac it occasionally will find the network name of the Pi, but usually not. Even if I enable a share on the Windows 7 machine it will occasionally see that but more often that not it will not even see that, so I believe the problem is at the Mac end not the Pi end.

If I try to manually enter the name of the PC and share with the correct syntax - smb://PCNAME/Share etc, this too fails to connect, to either Pi or Windows 7 PC.

Neither Raspberry Pi nor the Windows laptop with an active share show up automatically in the Finder sidebar as they should, either.

The only workaround I have found is this:

1) Manually connect to the Pi share through the Go To->Server menu option in the finder, using the correct syntax as above, this will connect to the Pi's SMB share 100% reliably.
2) Drag the mounted drive on the desktop to the Login Items so that it will be "launched" automatically on login, thus triggering the share to be mounted.
3) Add a Video source which points to the mount point of the mounted network share. ( /Volumes/Pi )

This allows me to access the PI share on the Mac through XBMC and play content across the network however there are many drawbacks to this approach:

1) Even if you set it not to open a window at login in the login items, a window for the share will open when the Mac boots just before XBMC launches. XBMC will launch over the top of it and hide it but if you alt-tab to other apps later you have an extra window cluttering things up.
2) If the Pi is off when the Mac boots it will display a connection error window which WILL obscure XBMC and require a mouse to dismiss.
3) If the Pi is off when the Mac boots and the Pi is later turned on there is no way from XBMC to force it to attempt to remount the remote share, so you have to fiddle around in the finder with a mouse to restore the network connection - not good for a media centre primarily controlled with an IR remote.
4) Like 2, if the Pi is turned off or rebooted while the Mac is running the same connection error window will appear over top of XBMC and require a mouse to dismiss.
5) There is no easy way that I'm aware of to control the mount point the Mac uses for the remote network volume. Because the remote share name is Pi it mounts it at /Volumes/Pi - if you have two Raspberry Pi's with the same share name that you want to mount at the same time, tough luck. I'm guessing it may rename one mount point slightly but then there will be no consistent mapping between mount points and remote Raspberry Pi's which could confuse XBMC.

I'm aware that there were some problems with the built in SMB client in XBMC with OS X Lion and later, but I was under the impression it should work ok in Snow Leopard ?

My ideal solution would be to find out why the built in SMB client in XBMC is not able to either browse computer names, nor connect to them even if entered manually, and get that working, thus avoiding the ugly workarounds in the finder described above.

Anyone have any suggestions ? The SMB client in XBMC seems to work fine in both Windows and Linux (Raspbmc)
try with ip instead of netbios name - also ensure to put the credentials in the smb url if needed (smb://username:password@ip/share)
Thanks! I've got it working now after a bit of experimentation, I had tried connecting by IP address before unsuccessfully, as soon as you said remember to enter the credentials I realised that through the finder and from the windows PC I had been logging into the SMB share using pi and raspberry for login and password, not logging in as a guest...

However, experimenting with different ways to connect has left me with more questions than answers! Confused

The first thing I discovered is that it doesn't seem to be possible to enter login credentials through the GUI ? If you create a new connection then instead of browsing, manually enter smb://pi:[email protected]/ in the text entry field, as soon as you ok it and go back to the dialogue where you can name the connection the username and password are stripped out, saying just smb://192.168.0.10/ and it also fails to connect Sad Going back in to edit the text field shows the full string with username and password. Most confusing.

I thought about entering the string directly in the config files, but before that I made another discovery - if I included the share name (pi) it does connect! So the string that worked is smb://192.168.0.10/pi. So it seems that it's not enough to specify a PC name, you have to specify a specific share - eg xbmc is unable to enumerate the share names as virtual directories...

The next puzzling thing is that I found connecting directly to the share name doesn't require any user credentials! Thinking that maybe it was using credentials cached in keychain manager I deleted the saved password from the keychain that the finder had been using, rebooting but xbmc still connected fine with read/write access with no credentials.

Through the finder I found that I could not connect (using Go->Connect to Server) to either smb://192.168.0.10 or smb://192.168.0.10/pi as a guest - both required username pi password raspberry to connect, yet somehow xbmc is able to connect to smb://192.168.0.10/pi without any credentials.

I'll have to have a poke about in the SMB server config on the Pi later to understand what's happening.

Name resolution doesn't seem to work at all - smb://raspbmc/pi doesn't work (also doesn't work in the finder, but DOES work in windows 7) and smb://raspbmc.local/pi doesn't work either. (it does work in the finder, I think due to bonjour name services running on the pi)

So anyone trying to do this, manually connect by ip address and remember to include the share name in the string or it won't work. I'm still unsure if it will work on a share that genuinely does require user credentials. At least its working for me - seems to be 100% reliable and avoids all the drawbacks I listed in my original post of doing it through the finder. Smile
Well there are a lot of issues when mixing Windows SMB servers with Linux SMB servers in the same network. Those might influence each other because there is an election in the network which decides which is the master netbios server. Thats why name resolution gets wonky and we tend to not recommend using name resolution. This has nothing to do with bonjour - it is just a windows thing with their stupid netbios behaviour.

Also depending on the server there is a possibility to enter credentials in XBMC. On some servers XBMC even knows that it gets an access denied and will ask the user for entering username and password. Also smb://ip/ without share is never a valid URL. smb:// might be - dependend on the network again. For me if i add a source and browse "Windows Shares (SMB)" i get a list of all workgroups in my network - in there a list with all servers in that workgroup - and in there a list of all shares. Once again - this highly depends on the number of servers and if you mix real Windows with SAMBA servers (i have a linux samba only environment and it works fine).

But whatever - as long as its working for you now the reason for the wonkyness doesn't really matter. I just always feel to defend XBMC here because the whole SMB stuff is totally crap imo Wink