Android Question SMB not connecting

Nickelgrass

Active Member
Licensed User
Longtime User
Hello,
I am trying to connect to a Samba server setup on a raspberry pi. It works accessing the share from windows. The share is password protected.

SMB:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
     If FirstTime Then
        SMB1.SetCredentials("pi", "passwd", "")
        SMB1.Initialize("SMB1")
    End If
End Sub

Sub Activity_Resume
    Log("Activity_Resume")
    SMB1.ListFiles("smb://RASPBERRYPI/share", "")
End Sub

Sub SMB1_ListCompleted(Url As String, Success As Boolean, Entries() As SMBFile)
    Log("ListCompleted")
    If Not(Success) Then
        Log("ListFiles failed : " & LastException)
    Else
        For i = 0 To Entries.Length - 1
            Log("*****************")
            Log(Entries(i).Name)
            Log(Entries(i).Directory)
            Log(DateTime.Date(Entries(i).LastModified))
            Log(Entries(i).Parent)
            Log(Entries(i).Size)
        Next
    End If
End Sub

But it always says failed to connect with "jcifs.util.transport.TransportException: Connection in error". If I change the RASPBERRYPI with the pi's IP address it says "Connection refused".
Edit: it seems now that I get the error "jcifs.smb.SmbException: This client does not support the negotiated dialect.". Are the versions incompatible?

So what do I actually have to enter for domain in the setcredentials and what may be the problem here?

Thanks
 
Last edited:

Nickelgrass

Active Member
Licensed User
Longtime User
Solved: in case anyone is interestet the solution was to add "min ptotocol=NT1" in the file /etc/samba/smb.conf on the raspberry pi.
 
Upvote 0
Top