Android Question SMB Upload fails

MrKim

Well-Known Member
Licensed User
Longtime User
I have two tablets. 1 a 2 year old Nexus. The other a brand new Insignia. Both are running android 6.0.1. Both are connected to the same network. Both connect to my SQL server database OK. Both are running the same code,
I am uploading a file to a windows PC.
B4X:
        U = smgr.GetString("UserName")
        PW = smgr.GetString("Password")

        SMB1.Initialize(FInfo.RetSub)
        SMB1.SetCredentials(U, PW, "")

        If FInfo.WD.StartsWith("smb:") = False Then FInfo.WD = "smb:" & FInfo.WD
        SMB1.UploadFile(FInfo.LD, FInfo.LF, FInfo.WD, FInfo.WF)

The Nexus works just fine. The Insignia fails with the following error:
B4X:
j
jcifs.smb.SmbException: Failed to connect: KIMSHPENVY<20>/192.168.1.70
jcifs.util.transport.TransportException: Connection timeout
    at jcifs.util.transport.Transport.connect(Transport.java:174)
    at jcifs.smb.SmbTransport.connect(SmbTransport.java:307)
    at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
    at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
    at jcifs.smb.SmbFile.connect(SmbFile.java:954)
    at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
    at jcifs.smb.SmbFile.open0(SmbFile.java:972)
    at jcifs.smb.SmbFile.open(SmbFile.java:1006)
    at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
    at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
    at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:67)
    at jcifs.smb.SmbFile.getOutputStream(SmbFile.java:2853)
    at anywheresoftware.b4a.objects.SMB$2.run(SMB.java:161)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at java.lang.Thread.run(Thread.java:818)

Any body have any ideas?

Two differences in the tablets that I can see:
1. I have a user set up on the Nexus but not the Insignia. I can't see where that should make any difference since I am passing the UN and PW.
2. The Insignia is Encrypted - evidently ships that way, can't undo it. The nexus is not encrypted.

Thanks for your help.
 
Last edited:

MrKim

Well-Known Member
Licensed User
Longtime User
Sigh, solved it by turning off my firewall. Now I just have to figure out why that works....
 
Upvote 0
Top