Skip to main content

Hi,

Things are driving me crazy. Literally spend days digging through many online fora.

This is my set-up:

  • Simple router from ISP (Nokia Fiber Router)
  • Every device on LAN can talk to every other device, no restrictions
  • Raspberry Pi, with latest OS version (Bookworm), Lite (no desktop) version, not exposed to the internet
  • External SSD mounted and visible, has all my music files
  • SAMBA file server installed, latest version (Version 4.17.12-Debian), with settings:
    • security = user
    • NTLM auth = yes
    • server min protocol = NT1
    • client min protocol = NT1
    • user “sonos” created, with password
  • Sonos devices:
    • Connect Amp, GEN1, wired
    • Connect, GEN1, SonosNet
    • 3 x Play:1, GEN2, SonosNet

This is the issue:

I can add the library to the app, I can see in the app (iPhone and laptops) all album art, and I can play music on all GEN2 devices. Unfortunately, no music on the GEN1 devices. There’s a big HOWEVER though:

When I group GEN1 and GEN2 devices together, on of each is enough, the GEN1 devices can play the music!

When I change the settings of the SAMBA server to only use SMBv1 (I know, very unsafe, but my GEN1 devices need it, but the Raspberry Pi is not exposed to the internet) ...

  • server protocol = NT1
  • client protocol = NT1

… then no connection possible, unable to add the library.

Setting both the following also results in no connection possible, unable to add the library:

  • server max protocol = NT1
  • client max protocol = NT1

So in order to get GEN1 devices to work, I have to use the “server/client min protocol” parameters AND I have to group the GEN1 devices with at least 1 GEN2 device.

My questions are:

  1. Is it possible to have a mix of GEN1 and GEN2 Sonos devices in one Sonos setup and have them all work with SMBv1?
  2. For the server experts: how to setup the SAMBA server that it talks to different devices with different protocol versions? (I thought I did it right with specifying a minimum protocol...)

Any help here is greatly appreciated.

Many thanks in advance.

With kind regard,

Sjoerd

 

Some Sonos devices do have generations but they also have a name that needs to be given so you know which device the generation is applied to.

  • Sonos devices:
    • Connect Amp, GEN1, (there is a Connect Amp Gen 1 and Gen 2)
    • Connect, GEN1, (there is a Connect Gen 1 and Gen 2)
    • 3 x Play:1, GEN2, (can’t see a gen 2 Play listed anywhere)

Are you possibly confusing the generation of the device with the operating system it is running? S1 or S2?

https://support.sonos.com/en-us/article/sonos-app-version-compatibility?language=en_US

 

I see you mention NT1 SMB v1 is only supported on S1 devices.

Any S2 devices will not use it, they need SMB 2.

 

Here is my Raspberry Pi SMB v1 config file for Sonos S1 devices:

pglobal]
# enable v1 authentication for Sonos access
ntlm auth=yes

pmusic]
Comment = Pi shared folder
Path = /mnt/music
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0555
directory mask = 0555
Public = yes
Guest ok = yes 

 

And for Sonos S2 devices

# enable v1 authentication for Sonos S1 access and maybe uncorrupted S2 indexing?
ntlm auth=yes

# enable v2 authentication
min protocol = SMB2
# Do not use, limits S2 to SMB2_10
#protocol = SMB2
 

music]                                                                                 
Comment = Pi shared folder                                                              
Path = /mnt/ssd-music                                                                   
Browseable = yes                                                                        
Writeable = Yes                                                                         
only guest = no                                                                         
create mask = 0555                                                                      
directory mask = 0555                                                                   
Public = yes                                                                            
Guest ok = yes 
vfs objects = catia
catia:mappings = 0x3a:0xf7
 

I don’t see that there would be an issue with one Samba server offering up both SMB v1 and v2 or even v3 connections, I just haven’t tried that.

Have you considered putting all your Sonos on the same operation system? Looks like they would all do S1 with no problems, then you’d not have the SMB issues and you could use them all as one system, playing together.


Hi Stanley,

Thank you for your detailed comments.

Your comment regarding the Play:1 devices: I think your correct, they use OS version S1. Unfortunately, I can’t bring them all to S2 (the play:1 can be set to S2) since my connects are from 2012, years before GEN2 was introduced.

Your comment “I don’t see … haven’t tried that.” is precisely what I hoped a SMB server would do when setting a minimum. If a device connects using the minimum, it would respond with that protocol version, if a device uses something newer, no problem. I hoped that setting it to NT1 would allow all Sonos devices to communicate using their respective versions. I’m asking around at some other fora to see whether the SMB server on a Raspberry Pi can or can’t do that, No answers yet.

In you response, you have two oglobal] sections for your smb.conf file. Is this one config file for both? Or do you specify two different config files? If so, do you specify each Sonos device using “include = /home/samba/etc/smb.conf.%m” ? And I see that for S2 you added two “catia” lines. What do they do, or are those specific for your set-up?

My global settings looks like this:

 

tglobal]

   workgroup = WORKGROUP

   ntlm auth = yes

   server min protocol = NT1

   client min protocol = NT1

   log file = /var/log/samba/log.%m

   max log size = 1000

   logging = file

   panic action = /usr/share/samba/panic-action %d

   server role = standalone server

   obey pam restrictions = yes

   unix password sync = yes

 

My share (share is called SONOS) specific section in smb.conf:

SONOS]

   comment = Sonos share for storing music files

   path = /data/sonos

   browseable = yes

   writeable = yes

   only guest = no

   create mask = 0777

   directory mask = 0777

   public = yes

   quest ok = yes

 

Again, thank you for your response and time spend, much appreciated.

With kind regards,

Sjoerd

 


The two global sections are from different Pi, one serving S1 and one S2. I don’t have any S1 settings on my current .conf as I have no S1 devices left.

I too was curious about that catia stuff, I remember putting it there but not why. Had to search up the answer. The remapping applies to everything, not just catia files.

vfs objects = catia
catia:mappings = 0x3a:0xf7

 

https://www.samba.org/samba/docs/4.17/man-html/vfs_catia.8.html

The Catia CAD package commonly creates filenames that use characters that are illegal in CIFS filenames. The vfs_catia VFS module implements a character mapping so that these files can be shared with CIFS clients.

 

So I’m remapping 0x3a (:) to 0xf7 (÷) might not be needed today, these were done long ago.

 

That last line “quest ok = yes” maybe a typo, try “guest ok = yes”


Reply