I know this is old but might as well add some answer to this question for future use...

Make sure you can connect

telnet thehostname 445

Or on linux

 nc -v -w3 thehostname 445
 Connection to test-ws1 445 port [tcp/microsoft-ds] succeeded!

Make sure something is listening

C:\Users\Administrator>netstat -ao | find "445"
  TCP    0.0.0.0:445            thehostname:0             LISTENING       4
  TCP    [::]:445               thehostname:0             LISTENING       4

Make sure file and printer sharing is enabled on that interface

enter image description here

The last one got me